Open
Conversation
🦋 Changeset detectedLatest commit: d92e125 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merged
e5df237 to
72f2187
Compare
c2182ab to
256a104
Compare
0b39392 to
87270e9
Compare
87270e9 to
c31d72d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync configurations derived from the new compiler have a stable serialized format, meaning that we can store them as JSON data in bucket storage and retrieve it from there instead of recompiling every time the replicator starts. This allows us to evolve the compiler without breaking existing sync plans (which would have been the case before since the parameter format needs to match exactly between replication and the querier).
When deploying a sync config from YAML, it will get parsed and passed through
updateSyncRulesFromParsedwhich attaches a sync plan if possible. When reading sync configurations (inPersistedSyncRulesContent.parsed(), we now take the sync plan into account and prefer to deserialize instead of re-compiling).Testing
I've tested this locally with the both mongo and Postgres storage implementations. First, I've deployed this sync config:
After deploying that, I've stopped the sync service and applied this patch to prevent the service from properly compiling new streams:
After restarting the sync service, I've connected with the supabase todolist sync streams client to ensure data is there. If the service had re-compiled sync streams for the querier, I would not have seen any data since no streams would be available with that patch.