Skip to content
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

Support load snapshot #140

Open
wants to merge 6 commits into
base: release/v2
Choose a base branch
from

Conversation

zhiyuanliang-ms
Copy link
Contributor

@zhiyuanliang-ms zhiyuanliang-ms commented Dec 12, 2024

New API:

const config = await load(connectionString, {
    selectors: [
        { snapshotName: "MySnapshot" }, // load keyvalue from snapshot
        { keyFilter: "test*", labelFilter: "test" }
    ],
    featureFlagOptions: {
        enabled: true,
        selectors: [
            { snapshotName: "MySnapshot" }, // load feature flags from snapshot
            { keyFilter: "*", labelFilter: "test" }
        ]
    }
})

Allow to use snapshot selector to load key value or feature flags

Note, for expilicity, if a snapshot contains feature flag, the feature flags will only be loaded when the snapshot is used for featureFlagOptions.selectors

This implementation is the same as kubernetes provider ref and ref

@zhiyuanliang-ms zhiyuanliang-ms changed the base branch from preview to zhiyuanliang/register-all-refresh December 12, 2024 07:56
Base automatically changed from zhiyuanliang/register-all-refresh to preview December 19, 2024 05:51
@zhiyuanliang-ms zhiyuanliang-ms marked this pull request as ready for review December 19, 2024 08:37

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/AzureAppConfigurationImpl.ts:946

  • Ensure that the logic for handling snapshot selectors, including the error conditions, is covered by tests.
if (selector.snapshotName) {
Base automatically changed from preview to release/v2 January 7, 2025 09:43
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.

2 participants