Skip to content

Conversation

@snej
Copy link
Contributor

@snej snej commented Oct 24, 2025

Also updated CBL dependency to 1.0.0-5

@snej snej requested a review from borrrden October 24, 2025 19:05
@snej snej changed the title JS Server: Implemented snapshot, verify, maintenance JS Server: Implemented snapshot, verify, maintenance, update blobs Oct 24, 2025
@borrrden
Copy link
Member

In the future there is not a real need to update this specifically since the jenkins job will fill in the version it wants when it runs jobs.

for (const updates of update.updatedProperties) {
for (const key of Object.getOwnPropertyNames(updates)) {
if (!KeyPathCache.path(key).write(doc, updates[key])) {
//???
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure to write? Should be some kind of 500 level error right?

@borrrden borrrden force-pushed the feature/js-snapshots branch from 6296fad to 9d8028f Compare October 24, 2025 23:08
snej and others added 3 commits October 24, 2025 16:21
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)
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

Redocly preview

API

snej and others added 16 commits October 27, 2025 16:46
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.
1. Normalize collection name in replicator config
2. Correct blob base URL
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"
- 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>`.
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.
Needs two empty collections to be compatible with SGW's setup
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)
Their functions are different signatures so a premade CreateFilter is not possible
@borrrden borrrden self-requested a review October 29, 2025 21:15
Since JS has no access to that information :(
@snej snej merged commit d9dc369 into main Oct 29, 2025
7 checks passed
@snej snej deleted the feature/js-snapshots branch October 29, 2025 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants