Add optional version_label to sync configs - #756
Draft
rkistner wants to merge 3 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: e8e135c The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 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 |
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.
With a single replication stream being able to handle multiple sync configs, the current diagnostic tooling does not distinguish between the sync configs properly. For example, the PowerSync Cloud dashboard only shows replication stream names, with no identifier for sync configs.
An additional issue is that it can be difficult to correlate what is deployed with what is active or processing, without comparing the full contents.
This adds a new config field
sync_config.version_labelin the main config YAML. When sync config is updated, that label is persisted with the config. If only the label itself is updated, that is also treated as a sync config change.The main purpose of this field is to track sync config versions when using automated tooling, such as the powersync cloud environment. It can be managed manually, but there is no check to enforce that it is updated or unique.
Note that the version_label is not part of the sync config file itself, but rather the root config, to simplify management by of the value by tooling, while the user writes the actual sync config file.
The behavior of label change triggering a sync config change can be used instead of the old "add comment/whitespace in sync config" recommendation to reload the config.
For Postgres storage, this requires adding a new column in a migration. On MongoDB storage, it is a new field, but no migration required.
AI Usage
Used Codex gpt-5.6 to implement.