-
Notifications
You must be signed in to change notification settings - Fork 3
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
Draft
zhiyuanliang-ms
wants to merge
47
commits into
main
Choose a base branch
from
zhiyuanliang/snapshot-reference
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
Merge main to preview
Merge main to preview
Merge main to preview
…ScriptProvider into zhiyuanliang/merge-main-to-preview
* zhiyuanliang/remove-allocation-id-from-main (#176) * version bump 2.0.1 (#178) * Add express example (#154) * add express example * update * use middleware * use token credential * update * update * update * update * update * update * update * update * make client manager endpoint readonly (#179) * revert revert allocation id change * fix indent (#181)
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
Merge main to preview
Merge pull request #201 from Azure/zhiyuanliang/remove-comment
Merge main to preview
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
…age (#213) Centralize error message
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
…avaScriptProvider into merge-main-to-preview
Add browser test
…ScriptProvider into merge-main-to-preview
* Merge pull request #226 from Azure/dependabot/npm_and_yarn/vite-7.1.5 Bump vite from 7.1.4 to 7.1.5 * Bug fix: Provider should continue to refresh when previous refresh operation didn't complete (#225) * fix refresh all failure bug * add testcase --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ScriptProvider into merge-main-to-preview
Merge main to preview
…ScriptProvider into merge-main-to-preview
Merge main to preview
…Azure/AppConfiguration-JavaScriptProvider into zhiyuanliang/snapshot-reference
…ScriptProvider into merge-main-to-preview
…ScriptProvider into zhiyuanliang/snapshot-reference
…ScriptProvider into merge-main-to-preview
Member
Author
|
Should we handle the case that sentinel key is a snapshot reference? |
Merge main to preview
Merge main to preview
…avaScriptProvider into zhiyuanliang/snapshot-reference
…ScriptProvider into zhiyuanliang/snapshot-reference
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.