-
Notifications
You must be signed in to change notification settings - Fork 4
Support snapshot reference #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Member
Author
|
Should we handle the case that sentinel key is a snapshot reference? |
jimmyca15
reviewed
Nov 12, 2025
jimmyca15
reviewed
Nov 13, 2025
jimmyca15
reviewed
Nov 13, 2025
zhiyuanliang-ms
commented
Nov 13, 2025
1785813 to
90d0727
Compare
jimmyca15
reviewed
Nov 13, 2025
jimmyca15
approved these changes
Nov 18, 2025
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.
Snapshot Reference
A snapshot reference is a configuration setting that references a snapshot in the same App Configuration store. When loaded, the provider resolves it and adds all key-values from that snapshot. Using snapshot references enables switching between snapshots at runtime, unlike using a snapshot selector, which requires code changes and/or restarts to switch to a new snapshot.
The content type of a snapshot reference is:
"application/json; profile=\"https://azconfig.io/mime-profiles/snapshot-ref\"; charset=utf-8";Behavior difference from .NET provider
Different from PR #689
The snapshot api design in JS provider is different from .NET provider.
In JS provider, keyvalue and feature flag are fully decoupled. The load and refresh operations for key values and feature flags are performed separatedly. The selector for key value will not load feature flags, vice versa. You must explicitly specify selectors for them.
To load key value or feature flag from snapshot, you must use a snapshot selector i.e.
SettingSelector.snapshotName. When you specify a snapshot selector for key values, even if there is any feature flag in that snapshot, the feature flag will not be loaded when loading key values. You must also specify the same snapshot selector inFeatureFlagOptions.It is a library level choice. We won't break it. So, when resolving a snapshot reference, feature flags in the snapshot will be ignored.
Note: This PR is not ready for review yet. It depends on the Azure JS SDK adding support for snapshot reference types. After that update, I’ll replace all existing helper functions with the SDK ones.