Commit Graph

3298 Commits

Author SHA1 Message Date
Ben Kalman
8d0cd2c109 Noms JS version 69.3.0 (#3125) 2017-01-27 16:54:23 -08:00
Ben Kalman
3528196f53 Pass the fetchOptions to writeBatch in HttpBatchStore (#3124)
This allows JS to make authenticated writes to Noms.
2017-01-27 16:32:39 -08:00
Erik Arvidsson
04ecdaa311 Revert "Update run_pr_builder.sh" (#3119)
This reverts commit 6b5e8dad0d.

Still happening...
2017-01-27 10:18:46 -08:00
Erik Arvidsson
6b5e8dad0d Update run_pr_builder.sh
Testing again
2017-01-27 09:56:57 -08:00
Erik Arvidsson
59ecc40c6e publish-to-npm: Fix python call (#3117) 2017-01-26 11:58:32 -08:00
Erik Arvidsson
2ba3a3e129 Update publish-to-npm.py for yarn (#3116) 2017-01-26 11:18:40 -08:00
Erik Arvidsson
076b88134a Integration test: Just disable samples/js/fs
samples/js/fs fails with

```
+ go test -v github.com/attic-labs/noms/samples/js/fs
=== RUN   TestIntegration
== Calling npmInstall
yarn install v0.19.1
$ cp ../../../js/noms/.babelrc ../.eslintrc.js ../../../js/noms/.flowconfig .
[1/4] Resolving packages...
success Already up-to-date.
$ yarn run build
yarn run v0.19.1
$ BABEL_ENV=production babel -d dist src 
Build step 'Execute shell' marked build as failure
```

We also have:

```
+ ls -al /var/workspace/src/github.com/attic-labs/noms/samples/js/fs
total 124
drwxrwxrwx 3 112 116  4096 Jan 26 04:08 .
drwxrwxrwx 8 112 116  4096 Jan 26 04:08 ..
-rw-rw-rw- 1 112 116    59 Jan 26 04:08 .gitignore
-rw-rw-rw- 1 112 116   244 Jan 26 04:08 dummy.go
-rw-rw-rw- 1 112 116  1162 Jan 26 04:08 integration_test.go
-rw-rw-rw- 1 112 116   666 Jan 26 04:08 package.json
drwxrwxrwx 2 112 116  4096 Jan 26 04:08 src
-rw-rw-rw- 1 112 116    13 Jan 26 04:08 test-data.txt
-rw-rw-rw- 1 112 116 93335 Jan 26 04:08 yarn.lock
```

But it is not clear why this is different than the other samples.
2017-01-25 20:14:56 -08:00
Erik Arvidsson
361ae3a77e Integration test: Debugging... 2017-01-25 20:07:42 -08:00
Erik Arvidsson
a1df010524 Integration tests: Output yarn to stdout/stderr (#3115) 2017-01-25 18:02:13 -08:00
Erik Arvidsson
6a800f6518 Integration test saga: Add -v to go test 2017-01-25 16:33:47 -08:00
Erik Arvidsson
e6bc8c9054 Manually list the integration tests (#3114) 2017-01-25 15:55:56 -08:00
Erik Arvidsson
c7db32037e Moar logging for integrations test (#3113) 2017-01-25 15:09:16 -08:00
Rafael Weinstein
a34a444f42 Fix cache/value store caching (#3111)
* Fixes a long standing bug in which the RemoteBatchStore is accidentally caching all chunks
* ValueStore's value cache now stores `Promise<?Value>` so that concurrent `readValues` of the same value can share a single decoding
* Removes the debug-only chunk hash check which keeps tripping up perf investigations
2017-01-25 14:41:15 -08:00
Erik Arvidsson
9689248028 Add more logging info for test runners (#3112) 2017-01-25 13:49:14 -08:00
Rafael Weinstein
edf8b55f26 dont use read ahead for map.first/last (#3110) 2017-01-24 13:12:09 -08:00
cmasone-attic
e72ab4a097 NBS UpdateRoot() returns false when last != nbs.Root() (#3109)
This code initially panicked in this case, because there didn't used
to be a reasonable way that a caller might wind up trying to update
away from a Root that didn't match NomsBlockStore's internal
bookkeeping. Now, given the new Flush() behavior there is. So, just
return false and allow the caller to take appropriate action.

Towards #3089
2017-01-24 11:00:21 -08:00
Rafael Weinstein
85d43b2fcd Update README.md 2017-01-24 10:13:58 -08:00
Rafael Weinstein
aaa66ea86f Update README.md 2017-01-23 16:24:43 -08:00
Aaron Boodman
7e5af655e7 bump version because of format version change (#3107) 2017-01-23 15:50:32 -08:00
Rafael Weinstein
08d9d5f4aa Introduce walk.WalkDifferentStructs (#3104)
This patch adds a static function which can walk graphs looking for (and diffing) two structs. It uses type information to avoid traversing sub-values which can't contain structs. It also uses a similar approach as sync to avoid visiting common sub-chunk-graphs.
2017-01-23 15:21:41 -08:00
Rafael Weinstein
d890a35b92 Update README.md 2017-01-23 15:19:31 -08:00
Rafael Weinstein
77a24a0730 Update README.md 2017-01-23 15:17:58 -08:00
cmasone-attic
cfa109f502 Switch Map/Set Diff to use top-down by default (#3106)
The only thing that wants what we used to call the "best" diff
algorithm is the command-line tools. Non-interactive programs all want
the algorithm that finishes up fastest, which is top-down.

Fixes https://github.com/attic-labs/attic/issues/627
2017-01-23 15:08:50 -08:00
Mike Gray
c7ae4b31fe Fix warning of unmet peer dependency (#3105) 2017-01-23 17:39:46 -05:00
cmasone-attic
d809bb2a09 Increase Chunk locality when writing Values through ValueStore (#3064)
Readahead + NBS benefit greatly when "related" Chunks are close to
each other. The current code did a good job of writing siblings in the
Chunk graph next to each other, but "cousins" (that is, children whose
parents are siblings) might wind up spread quite far apart.  This
patch makes WriteValue hold onto novel Chunks until it sees a
_grandparent_ come through the pipeline. All of that Chunk's queued
grandchildren will be Put at that time.

Additionally, ValueStore.Flush() now takes a Hash and flushes all
Chunks that are reachable from the Chunk with that Hash, as opposed
to simply flushing all Chunks to the BatchStore. This means that
there's now no supported way to write orphaned Chunks/Values to a
Database.

Fixes #3051


* More logging for TestStreamingMap2
2017-01-23 12:16:55 -08:00
cmasone-attic
6e72c137a2 Make database root a Map<String, Ref<Value>> (#3093)
Since the head of each dataset can have an arbitrarily complex
type, type accretion leads the Datasets map at the root of the
DB to become very large. This type info isn't really very useful
at that level either. So, get rid of it by making this map be
from String -> Ref<Value>.

Fixes #2869
2017-01-22 11:17:17 -08:00
Rafael Weinstein
da22039017 add 1-year Cache-Contro: max-age to /getBlob/ urls (#3098) 2017-01-22 09:33:07 -08:00
Erik Arvidsson
d4132e9e6c Use cp instead of ln (#3100) 2017-01-20 18:41:56 -08:00
cmasone-attic
5801bd9d2a Retry NomsBlockStore.Flush() with exponential backoff (#3094)
* Vendor in small backoff library

* Retry NomsBlockStore.Flush() with exponential backoff

Fixes #3089
2017-01-20 13:25:49 -08:00
Erik Arvidsson
e90bfcbd2a Switch to Yarn (#3092)
brew install yarn
2017-01-20 11:42:32 -08:00
Erik Arvidsson
6fd186d060 Update to a newer documentationjs (#3088) 2017-01-19 11:38:16 -08:00
Mike Gray
d7c8c816f4 Remove old go samples. They are no longer needed. (#3087) 2017-01-19 12:39:00 -05:00
Aaron Boodman
801dde854a Remove all the old js samples. They are no longer needed. (#3086) 2017-01-18 21:24:34 -08:00
Aaron Boodman
a5a11f5345 Bump Noms JS SDK version to 68.3.0 for perf improvements (#3085) 2017-01-18 17:40:05 -08:00
Rafael Weinstein
7397fbbb1a Add /getBlob/ endpoint (#3082)
Add /getBlob/ endpoint
2017-01-17 18:25:33 -08:00
Erik Arvidsson
f6a6283ee5 Add DateTime util struct (#3073)
This allows us to consistently marshal back and forth between time.Time
and a Noms struct.

Fixes #2970
2017-01-17 15:47:16 -08:00
Rafael Weinstein
86e812a5db (JS) Don't preload iterators (#3078)
dont preload iterators
2017-01-17 13:49:22 -08:00
Erik Arvidsson
2dfb4040b7 Update to Flow 0.36 (#3079) 2017-01-17 11:56:20 -08:00
Rafael Weinstein
759c36c96f Walk avoids blobs (#3074) 2017-01-13 16:32:40 -08:00
Eric Halpern
930e54cb6d Fix race conditions marshal.typeDecoders (#3072)
When constructing a recursive decoder (e.g, mapDecoder, arrayDecoder, setDecoder),
the new decoder is placed in the cache before its element decoders are created to
avoid a cycle.

If another go routine finds the new decoder in the cache, it can use it before it's
fully initialized.

Use a RWMutex to guard against this. Take the write lock out before adding the decoder
to the cache and release after the element decoders have been initialized.

Use a read lock in the decoder to function go ensure that it blocks until initialization
is complete.

toward: #3071
2017-01-13 13:11:27 -08:00
Rafael Weinstein
760e7f9945 (JS) Implement parallel walk io (#3070)
(JS) Implement parallel walk io
2017-01-12 15:57:02 -08:00
Rafael Weinstein
3b3835492c paralleize the io of walk (#3067) 2017-01-12 11:53:49 -08:00
Erik Arvidsson
554d4da885 Upgrade to use latest webpack-config (#3066) 2017-01-11 18:47:22 -08:00
Erik Arvidsson
15f188ac2c webpack-config: Pick up noms version next (#3065)
Make sure we replace process.env.NOMS_VERSION_NEXT for webpack builds
2017-01-11 17:58:23 -08:00
cmasone-attic
bac5f2ab5d Only request remaining hashes in httpBatchStore.GetMany() (#3062)
In httpBatchStore.GetMany(), we check our unwritten
puts to see if any of the requested chunks already
exist locally. If any do, we're _supposed_ to remove
their hashes from the set slated to be requested from
the server. That logic was borked.

Towards https://github.com/attic-labs/attic/issues/503

* Add zero check

Also Fixes #3063
2017-01-11 15:57:03 -08:00
Erik Arvidsson
2f6f760658 Work around environment variable issue. (#3061)
We are using babel-plugin-transform-inline-environment-variables which
replaces `process.env.FOO` with the value of the `FOO` environment
variable at compile time.

However, due to our pipeline we end with something like:

```js
var NAME = 'NOMS_VERSION_NEXT';
process.env[NAME]
```

which does not get replaced in development mode. If it was a const the
transformer could replace it but var bindings can change.
2017-01-11 15:08:04 -08:00
Rafael Weinstein
89cd026c46 Fix bug in read ahead for sequence.iter (#3060)
fix bug in read ahead for sequence.iter
2017-01-11 14:28:28 -08:00
Rafael Weinstein
d0bf8ddc55 fix bug in ReadManyValues (#3059) 2017-01-11 11:54:01 -08:00
Aaron Boodman
c885ace18f Bump js package again. (#3056)
I had already used 66 in a previous commit that was reverted.
2017-01-10 18:09:50 -08:00
Aaron Boodman
377e730bd2 Bump js package version because of noms format change. (#3055) 2017-01-10 15:53:22 -08:00