Commit Graph

94 Commits

Author SHA1 Message Date
Chris Masone 4f073aee3d Validate type of new Root in root/ POST handler
In the server side of the Remote Databse, the handler for
UpdateRoot now verifies that the new proposed Root is of a
legal type: empty map OR Map<String, Ref<Commit-like>>

Fixes #2116
2016-08-01 16:05:37 -07:00
cmasone-attic 55025ee801 Add caching layer to demo-server (#2228)
This patch creates a new kind of chunks.Factory that demo-server
uses to vend ChunkStore instances that all share the same
MemoryStore-based Chunk cache. This cache _will_ grow without bound,
but the current RAM/data ratio on demo.noms.io means that, in practice,
we will be fine for a bit.

This will need to be removed in favor of a real solution in Issue #2227

Fixes #2009
2016-08-01 11:55:16 -07:00
Mike Gray b42733e982 changing order of args to match JS and be more logical (#2223) 2016-08-01 11:17:59 -07:00
Erik Arvidsson 619a07298f Splore: Use demo.noms.io as the default database (#2219)
Changes the default database to `https://demo.noms.io/cli-tour`

Fixes #2217
2016-08-01 09:16:06 -07:00
Mike Gray 93916c5139 exposing StructData, updating tour (#2214) 2016-08-01 12:09:02 -04:00
Adam Leventhal e920c12c1c Fix cyclic type nondeterminism (#2147) (#2148) 2016-07-29 21:35:17 -07:00
Erik Arvidsson ed0364cc19 Switch to gnuflag (#2206)
This is to support:
- shorthands
- Putting commands anywhere (after positional arguments too)
2016-07-29 18:08:23 -07:00
Ben Kalman 467bdc9bc1 Let csv-importer take the metadata date as a flag (#2196) 2016-07-29 10:44:08 -07:00
Chris Masone b0112ba52b Remove NewSerializer
NewSerializer spun up a goroutine within itself. We've decided
this is an anti-pattern. Furthermore, we were using this inside
our remote database handler code, and a panic inside that goroutine
could take down the server. The callsites now use Serialize() directly.

Fixes #2169
2016-07-28 16:05:03 -07:00
Erik Arvidsson 7a4436e9b5 Remove Type name property (#2161)
Only struct types have a name property and this was left over from
an earlier refactoring.
2016-07-26 15:31:43 -07:00
Erik Arvidsson 97093afa8c Rename csv StringToType to StringToValue (#2154) 2016-07-25 14:46:11 -07:00
Rafael Weinstein b57377c1ed Chunk over value (non-type) serialization bytes (#2130)
Chunk over value (non-type) serialization bytes
2016-07-25 11:02:26 -07:00
Aaron Boodman a23052a1dd csv-import: add flexibility to handling of numbers and booleans (#2141)
* Default empty csv cells to reasonable values.

It would probably be better to have more control over this, or even
better, some kind of 'null' value. But I think this is perfectly
reasonable initial behavior, and much more compatible with other
code.

* Support more spellings of "true" and "false"

* csv-import: provide more helpful value parse errors
2016-07-23 23:01:38 -07:00
Ben Kalman 270ba908cd Introduce samples/go/blob-get, utility which downloads a noms blob (#2127)
... from a noms database. Right now it's very slow (< 100kb/s).
2016-07-22 17:50:33 -07:00
Erik Arvidsson cb8d44b3f9 Merge pull request #2120 from arv/commit-no-meta
Commit type should always have a meta field
2016-07-21 18:29:45 -07:00
Erik Arvidsson 68e92092e5 Commit type: Inner parents struct should also have meta
This changes so that all commit struct types have a meta field
(which might be an empty struct).

Increment the serialization version since the old data does not
necessarily have the meta field.

Fixes ##2112
2016-07-21 18:25:17 -07:00
Aaron Boodman 521e120c74 Fix double-escaping in csv.Read. (#2122)
Fixes #2109
2016-07-21 15:33:35 -07:00
Rafael Weinstein 717745f2fc Refactor sequence_chunker.Done() (#2076)
Go SequenceChunker Refactor
2016-07-21 14:51:32 -07:00
Dan Willhite 137e39d683 Add meta information to commits in cvs-import and url-fetch.
Add "meta" field to commit.
Change noms_log to print meta information when it exists.
Fixes #2012.
2016-07-20 17:18:21 -07:00
Erik Arvidsson 984fef226f Change dataset CommitWithParents to Commit with options (#2095)
The new API is `ds.Commit(value, CommitOptions{Parents: p})`

Related to #2012
2016-07-19 14:30:59 -07:00
Aaron Boodman b968b27b93 Make clear samples/go/url-fetch supports local files (#2055) 2016-07-15 14:43:27 -07:00
Aaron Boodman 3d39d2b713 Add -skip-lines flag to csv-import (#2050) 2016-07-13 17:18:07 -07:00
Ben Kalman d992b1c352 More informative url-fetch error checking (#2049) 2016-07-13 16:36:04 -07:00
Rafael Weinstein 890433e864 Reland js type cache (#2032)
Reland js type cache (#2032)
2016-07-13 15:23:23 -07:00
Dan Willhite d811fc1aac Merge pull request #1904 from willhite/work
Add CORS code to demo-server and noms-serve.
2016-07-12 16:42:07 -07:00
Dan Willhite ff5876349a Add CORS code to demo-server and noms-serve.
This is necessary to handle x-noms-vers header from browsers.
Adds x-noms-vers header to all responses from demo-server and 'noms serve'.
Fixes #1984. Fixes #1991.
2016-07-12 16:25:21 -07:00
Erik Arvidsson b830762f49 Fix some copyright headers (#2026) 2016-07-12 16:02:32 -07:00
Erik Arvidsson 1507b8dd8f Go: Change hash function to sha512 2016-07-12 13:59:08 -07:00
Mike Gray 7c9ad898de use column-type from original csv file column order (#2013)
* use column-type from original csv file column order, not the one after map/struct field name reordering
* use column-type from original csv file column order (part 2)
2016-07-12 11:33:01 -07:00
Rafael Weinstein 94a27139c7 bump noms npm version & update codec-perf-rig numbers (#2016) 2016-07-11 16:54:12 -07:00
Mike Gray b6f19dfea5 number encoding (#1845)
Moved to encoding Values of type Number as 2 varints.
2016-07-11 12:08:56 -07:00
Erik Arvidsson abff0f247f Make go test ./... and go build ./... work with integration tests (#2005)
For go build we need a dummy go file or go build fails

For go test we now make sure we run npm install so that the test
passes
2016-07-11 11:01:51 -07:00
Erik Arvidsson 410a1664ba Create symlinks from npm i (#1996) 2016-07-08 13:47:00 -07:00
Erik Arvidsson 899ed35e55 Symlinks needed by other heaps of peeps (#1995) 2016-07-08 13:40:19 -07:00
Erik Arvidsson 96ed40bbb5 Setup symlinks again (#1994) 2016-07-08 13:33:01 -07:00
Erik Arvidsson 88fd487f00 Splore deployment (#1992)
Make sure we run npm install in js first
2016-07-08 11:46:10 -07:00
Ben Kalman 68e16f338e Fix noms browser fetch and splore layout (#1989) 2016-07-07 18:19:18 -07:00
Rafael Weinstein ee5c0f3a72 MakeStructType and NewStructWithType now takes slices rather than maps (#1945)
NewStructType and NewStructWithType now takes slices rather than maps
2016-07-07 16:36:48 -07:00
Rafael Weinstein c38c884810 Checking last codec perf numbers (#1986) 2016-07-07 15:18:28 -07:00
Ben Kalman eb9b67d571 csv-importer can accept a noms path as a source (#1981) 2016-07-07 15:10:13 -07:00
Erik Arvidsson fb4c8624a0 JS integration tests for samples/js/{counter,fs} (#1951)
This adds some a basic integration tests for sample/js/{counter,fs}.

It work pretty much like this:

- Run `npm install`
- Do setup (good place to initialize the database) (optional).
- Start a http store from go.
- Run `node . <args...>`. The IntegrationTestSuite has convenience
  methods to get the spec.
- Do teardown, which is a good time to check the output and the current state of the db (optional).

Towards #1888
2016-07-07 14:00:32 -07:00
Erik Arvidsson 4e4cbd323c Update samples/js/**/README (#1979) 2016-07-06 14:20:05 -07:00
Erik Arvidsson c0bd2c90d4 More tweaks to tools/run-all-js-tests.py (#1974)
* Update Splore build.py

* path

* Setup the bin symlinks in preinstall

* Link entire node_modules instead
2016-07-06 13:44:11 -07:00
Mike Gray a7f29a716d noms as one command line application, with version and help (#1874) 2016-07-06 15:38:25 -04:00
Aaron Boodman 1d752e3101 Update license: Noms will be copyright Attic Labs. (#1976) 2016-07-05 22:07:42 -07:00
Erik Arvidsson 983fa59090 Samples js shared 2 (#1973)
* Revert "Revert "Share node_modules for samples/js" (#1967)"

This reverts commit 7bb1623e99.

* Add parent directory to the PATH

* Change run-all-js-tests to run samples/js before samples/js/**

* Fix a temporary comment
2016-07-05 16:25:21 -07:00
Erik Arvidsson 7bb1623e99 Revert "Share node_modules for samples/js" (#1967) 2016-07-05 14:44:21 -07:00
Erik Arvidsson b0ab909e4f Share node_modules between samples/js (#1955)
This is so that we do not need to do npm install 10 times in the
samples directory. Instead we do it once inside samples/js and let
all the sub directories have no dependencies. This works because
nodejs searches the parent directories when looking for a module.

Towards #1888
2016-07-05 13:55:36 -07:00
Mike Gray b2a4aa62b7 removing runtime.GOMAXPROCS calls (#1947) 2016-07-01 17:42:46 -04:00
Aaron Boodman 2921ca343c Part 2: Move things that are not samples out of samples/go (#1944) 2016-07-01 11:58:26 -07:00