Commit d9dc369
JS Server work
* JS Server: Implemented snapshot & verify
Also updated CBL dependency to 1.0.0-5
* JS Server: Implemented blobs for /updateDatabase
* JS Server: Normalize collection names everywhere
i.e. convert `_default._default` to `_default`
* JS Server: Actually save doc after updating it
* Disable more JS tests and a few more test server fixes
1. Make it an error to have a snapshot update to a document that doesn't exist in a snapshot
2. Only return result.document if the snapshot update type is an update (not delete or purge)
3. Sometimes we make a snapshot of a document that does not exist in the DB in order to verify that it didn't get pulled unintentionally, so check that (it will show up as an entry with an "undefined" value)
4. updateDatabase should be allowed to create documents
5. Bug in update remove properties handling (it was iterating the actual strings and sending them one character at a time)
* Fix API spec for conflict resolvers and run query test
* JS Server: Added auth support for replicator
* JS Server: Implemented conflict resolvers
* JS Server: Throw error when updating keypath fails
* JS Server: Implemented push/pull filters
* JS Server: Resolve relative blob URLs
* JS Server: support updatedBlobs in /verifyDocuments
* JS Server: Just prettified tdkSchema.ts
* JS Server: Fixed transaction error in /updateDatabase
Updating a blob would trigger an exception because it's illegal to
make non-database async calls within a transaction.
So use Collection.updateMultiple() instead.
NOTE: This assumes that a /updateDatabase request does not list the
same document multiple times! If so, this will probably fail.
* A few small fixes
1. Normalize collection name in replicator config
2. Correct blob base URL
* Correct snapshot tests and behavior
Only update verifications (not delete or purge) return the document. Also, there is a distinction between null and missing for snapshot entries: null means "I want to verify this later, but it doesn't exist right now". undefined is "Not included in the snapshot and ineligible for verification"
* Further correct Snapshot
- Spurious `!` on line 40 messes up the test for undefined
- I accidentally used `!!` (Kotlin syntax) instead of `!` on line 59
- Using `T | null` in DocumentMap is incorrect; nulls are handled in
the declaration of #documents, which is
`DocumentMap<cbl.CBLDocument | null>`.
* Correct and error code and prettify message
The TDK expects an HTTP 400 when a nonexistent blob is requested. Remove "self" from error message since it results in it being printed twice, and make the error message "returned XXX" not weirdly formatted.
* Update travel JS dataset
Needs two empty collections to be compatible with SGW's setup
* Switch SGW certificate strategy
The cert is now issued by a CA that can easily be trusted in python, as well as browser. Existing SDK cert pinning should still be fine as well. Also only copy prerelease RPM if it's not already on the remote machine (uploads are slow)
* Emit "transport: ws" for Javascript topology setups
* Need to separate push and pull filter
Their functions are different signatures so a premade CreateFilter is not possible
* Relax smoke test requirements for error on connection failure
Since JS has no access to that information :(
---------
Co-authored-by: Jim Borden <jim.borden@couchbase.com>1 parent b1ee16d commit d9dc369
42 files changed
Lines changed: 1362 additions & 372 deletions
File tree
- client
- smoke_tests
- src/cbltest
- api
- dataset/server/dbs/js/travel
- environment/aws
- common
- lb_setup
- logslurp_setup
- sgw_setup
- cert
- topology_setup
- servers/javascript
- src
- spec/api
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
14 | 10 | | |
15 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | | - | |
24 | | - | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 37 | + | |
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
22 | 57 | | |
23 | 58 | | |
24 | 59 | | |
| |||
344 | 379 | | |
345 | 380 | | |
346 | 381 | | |
347 | | - | |
| 382 | + | |
348 | 383 | | |
349 | 384 | | |
350 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
0 commit comments