Commit Graph

3107 Commits

Author SHA1 Message Date
Ben Kalman
cc13253c45 Add --subdir argument to roll.py (#2782)
If you want to roll just the go/ directory of noms, you can do:

$ roll.py https://github.com/attic-labs/noms --incl go

If you want to roll the AWS SDK without the tests, you can do:

$ roll.py https://github.com/aws/aws-sdk-go --excl awstesting

This works with nested directories too, for example --incl go/util

--excl is evaluated after --incl, so you could exclude the perf/
directory of go/ if you really wanted:

$ roll.py https://github.com/attic-labs/noms --incl go --excl go/perf
2016-11-11 15:53:16 -08:00
Ben Kalman
13a188cc89 Change publish-to-npm to work relative to GOPATH not pwd (#2821)
Jenkins is now running from a different pwd. This changes fixes that and
makes it immune to future changes.
2016-11-10 17:10:56 -08:00
Ben Kalman
401a878478 Add auth parameter to Splore (#2820) 2016-11-10 16:14:03 -08:00
Ben Kalman
0ee6d105bb Export HttpError and SpecOptions to Noms JS API (#2819)
I renamed HTTPError to HttpError for consistency with HttpBatchStore
(and XMLHttpRequest).
2016-11-10 15:46:21 -08:00
Erik Arvidsson
257520c287 Sync photo-set-iterator.js between repos (#2818) 2016-11-10 15:45:04 -08:00
zcstarr
3afbd11578 Remove dependency on bash shell from package (#2817) 2016-11-10 14:38:42 -08:00
Erik Arvidsson
db4aedaeaf Use the latest version of documentation.js (#2805)
To pick up links into github for methods
2016-11-10 13:00:49 -08:00
Ben Kalman
cdfbee1b3d Remove spec GetDataset/GetDatabase/GetPath, update all clients (#2815)
These are now ForDataset/ForDatabase/ForPath.
2016-11-09 17:34:39 -08:00
Erik Arvidsson
45a36a46e9 Change to use interface instead of declare (#2816) 2016-11-09 15:38:58 -08:00
Dan Willhite
b6b1389c30 Danloader (#2794)
* Downloader

* Review changes
2016-11-08 16:46:55 -08:00
Aaron Boodman
a0f489bc1c Remove temporary time-based dedup from webui (#2814) 2016-11-08 14:59:03 -08:00
Ben Kalman
172b991ac1 Port new Spec API to Go from JS (#2807)
This is a side-by-side port, taking inspiration from the old dataspec.go
code. Notably:

- LDB support has been added in Go. It wasn't needed in JS.
- There is an Href() method on Spec now.
- Go now handles IPV6.
- Go no longer treats access_token specially.
- Go now has Pin.
- I found some issues in the JS while doing this, I'll fix later.

I've also updated the config code to use the new API so that basically
all the Go samples use the code, even if they don't really change.
2016-11-08 14:18:47 -08:00
Aaron Boodman
1f773a1c18 fix timezone in coffeebot (#2811) 2016-11-07 20:40:58 -08:00
Aaron Boodman
508a4dd3b5 coffeebot: remove secret url (#2810) 2016-11-07 17:36:28 -08:00
Aaron Boodman
f51da13e44 Add coffee bot (#2809)
* Add coffee bot

* fix order
2016-11-07 17:25:58 -08:00
Ben Kalman
5ab12777f6 Remove the demo server and receipt code (again) (#2808) 2016-11-07 15:13:28 -08:00
Erik Arvidsson
1775c3805a Update to Flow 0.34 (#2803) 2016-11-07 08:32:24 -08:00
cmasone-attic
7dc5867142 Close and destroy databases being left open during tests (#2806)
There were several tests in the Database suites that were failing to
close test Databases that had orderedChunkCaches in them (backed by
levelDBs). Close them.

I was ALSO failing to destroy the cache used in LocalDatabase
instances only while testing Pull(). That's cleared up now as well.
2016-11-04 16:25:53 -07:00
cmasone-attic
12ddb66fc5 Clobber ValueStore cache entry on WriteValue (#2804)
ValueStore caches Values that are read out of it, but it doesn't
do the same for Values that are written. This is because we expect
that reading Values shortly after writing them is an uncommon usage
pattern, and because the Chunks that make up novel Values are
generally efficiently retrievable from the BatchStore that backs
a ValueStore. The problem discovered in issue #2802 is that ValueStore
caches non-existence as well as existence of read Values. So, reading
a Value that doesn't exist in the DB would result in the ValueStore
permanently returning nil for that Value -- even if you then go and
write it to the DB.

This patch drops the cache entry for a Value whenever it's written.

Fixes #2802
2016-11-04 15:53:26 -07:00
cmasone-attic
0400b0cf3f Don't use invalid Root in bad version test (#2800)
The httpBatchStore test TestVersionMismatch() expects a panic,
but the test was actually potentially causing MULTIPLE panics.
One due to the version mismatch, and another due to using an
invalid root.
2016-11-03 15:48:18 -07:00
Dan Willhite
46586ee928 Remove msg args from d.PanicIfTrue and d.PanicIfFalse. (#2757)
Should discourage people from writing code that does unnecessary work
to generate a msg every time that an error condition is checked. Fixes #2741
2016-11-03 11:43:57 -07:00
Eric Halpern
74df877747 Don't print warning unless -v (#2799) 2016-11-03 11:05:02 -07:00
Eric Halpern
11cc65ca7c Add jobs for grouping similar photos in PhotoGroups (#2789)
* Add jobs for grouping similar photos in PhotoGroups

Outline:
- The first photo-dhash job adds a dhash field to each photo. The dhash is a 128 bit
  downsampled representation of the photo that works well for visual similarity comparisions.
- The second photo-dedup job groups photos that have similar dhash's into PhotoGroups.

fixes: #2787
2016-11-02 12:06:54 -07:00
Ben Kalman
50c48be4b8 Noms, demo-server, and photos UI changes to support auth (#2793)
The big change here is adding a new Spec class in spec.js. This replaces
DatabaseSpec/DatasetSpec/PathSpec in specs.js, but I'm leaving those in
and moving code over in a later patch. For now, only photos UI.

The photos UI change is to plumb through the authorization token through
the Spec code. For now, it's reading it from a URL parameter, but soon
I'll make it session based (probably localStorage).

The demo-server change is to add the Authorization header into CORS.
2016-11-02 11:57:07 -07:00
Ben Kalman
bbfc27d7fe Revert "Remove demo-server and receipts code" (#2791) 2016-10-31 17:10:17 -07:00
Ben Kalman
ba5e309c84 Remove demo-server and receipts code (#2790)
They're in attic now: https://github.com/attic-labs/attic
2016-10-31 17:08:18 -07:00
Ben Kalman
26391d9d57 Implement private databases for the demo server (#2772)
Private databases begin with "/p/" - for example, "/kalman" is not
private, but "/p/kalman" is private. They are not the same database.

The bulk of this work is the receipt infrastructure.

A receipt is form data that gives access to a database, encrypted using
secretbox. For example, "Database=/p/kalman&Date=12345678" might encrypt
to "SFH5bcIJ3_XgEbtmi_AdCKTItW20fl90czVl5_pF5PAXhNQ366U1yOpYGAjT".

* A new tool receiptkey generates random receipt (secretbox) keys.
* A new tool receipttool generates receipts for databases.
* demo-server has been updated to check for a receipt in the
  Authorization header to access private databases.

receipttool and demo-server must be given the same receipt key.
2016-10-31 10:58:33 -07:00
Mike Gray
8b198cc71b Nomsfs working with FUSE for Mac 3.5.2
Only changes were in vendor
2016-10-30 18:57:55 -04:00
Dan Willhite
82f2a1218b Add resources field to find-photo's Photo object (#2778) 2016-10-30 14:21:35 -07:00
Dan Willhite
1cd34e0ebd Add Append() method to types.Path (#2783) 2016-10-29 12:37:50 -07:00
Erik Arvidsson
3a4e0dbd75 Remove publish-js-sdk.py (#2786)
This file was renamed to publish-to-npm.py
2016-10-28 18:04:38 -07:00
Erik Arvidsson
9a3a119e60 Update build scripts to use the installed node (#2781) 2016-10-28 18:01:07 -07:00
Erik Arvidsson
37ede2373e Rename publish-js-sdk to publish-to-npm (#2785)
I'm doing this in two steps to allow the builders to continue to work.
2016-10-28 17:54:06 -07:00
Erik Arvidsson
817af58a5b Add omitempty to Go marshal (#2784)
If you provide an omitempty tag and the Go value is the zero/empty value
then we do not include that field in the resulting Noms struct.

Towards #2376
2016-10-28 17:36:02 -07:00
Erik Arvidsson
9dafe3da6c Make publish-js-sdk.py publish all packages (#2777) 2016-10-28 16:36:25 -07:00
Erik Arvidsson
2bd617ade8 Add delete field to structs (#2779) 2016-10-28 15:22:37 -07:00
Erik Arvidsson
7983e61afc Use babel-preset-noms (#2780) 2016-10-28 15:04:20 -07:00
Erik Arvidsson
0029b81ab4 Fix babel-preset-noms (#2776)
It wasn't working on the code coverage tests. Now I restored this
to what it was before these changes (minus removing some features
that chrome and node now supports out of the box)
2016-10-28 12:10:00 -07:00
Aaron Boodman
bfaad752f8 Remove old noms-merge command from autobuild binaries list (#2775) 2016-10-27 17:57:55 -07:00
Erik Arvidsson
bbea22b395 Mark non standalone packages as private (#2773)
This prevents us from doing npm publish on them.

https://docs.npmjs.com/files/package.json#private
2016-10-27 17:05:21 -07:00
Erik Arvidsson
529d796ad4 Fix syntax error in package.json (#2774) 2016-10-27 16:27:31 -07:00
Erik Arvidsson
7be17c5dfd Add a babel-preset-react module (#2770)
This simplifies dependency handling
2016-10-27 16:24:03 -07:00
Ben Kalman
2e27fd9815 Add vendor/golang.org/x/crypto (#2771) 2016-10-27 16:15:20 -07:00
cmasone-attic
f2ca3d6e8e Add noms merge (#2768)
Add optional merging functionality to noms commit.
noms merge <database> <left-dataset-name> <right-dataset-name> <output-dataset-name>

The command above will look in the given Database for the two named
Datasets and, if possible, merge their HeadValue()s and commit the
result back to <output-dataset-name>.

Fixes #2535
2016-10-27 15:27:36 -07:00
Dan Willhite
8bd980553b Make pin return unchanged spec if it's already pinned (#2769) 2016-10-27 15:17:53 -07:00
Erik Arvidsson
8320cb6d28 Use the eslint-config-noms instead (#2767) 2016-10-27 13:28:26 -07:00
cmasone-attic
e954427903 Go: add heuristic merge option to db.Commit() (#2759)
This patch adds an optional MergePolicy field to CommitOptions. It's a
callback. If the caller sets it, then the commit code will look for a
common ancestor between the Dataset HEAD and the provided Commit. If
the caller-provided Commit descends from HEAD, then Commit proceeds as
normal.
If it does not, but there is a common ancestor, the code runs
merge.ThreeWay() on the values of the provided Commit, HEAD, and the
common ancestor, invoking the MergePolicy callback to resolve
conflicts. If merge succeeds, a merge Commit is created that descends
from both HEAD and the caller-provided Commit. This becomes the new
HEAD of the Dataset.

Fixes #2534
2016-10-27 11:52:46 -07:00
Erik Arvidsson
b9db5d1bc2 Make our eslint setup less hacky (#2766)
Rename the package to eslint-config-noms as documented on the eslint
site.

This allows other npm modules to use and `extends: 'noms'` in their
eslint rc file.
2016-10-27 11:51:55 -07:00
Vinicius Baggio Fuentes
b0d51997fa go/marshal: allow any struct names while unmarshaling. (#2761) 2016-10-26 17:56:52 -07:00
Erik Arvidsson
3be4130a03 Export BatchStoreAdaptor (#2760) 2016-10-26 14:58:51 -07:00