Skip to content

Conversation

@zhiyuanliang-ms
Copy link
Member

@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
Copy link

Copilot AI left a comment

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
@zhiyuanliang-ms zhiyuanliang-ms changed the base branch from release/v2 to preview February 12, 2025 05:11
@zhiyuanliang-ms zhiyuanliang-ms changed the base branch from preview to main February 20, 2025 07:31
@juniwang
Copy link
Member

the impl looks good to me. Should we add or update our test cases to cover snapshot?

@zhiyuanliang-ms
Copy link
Member Author

@juniwang Do you mean add more testcases?

@juniwang
Copy link
Member

yes

@zhiyuanliang-ms zhiyuanliang-ms merged commit ddd19e0 into main May 22, 2025
6 checks passed
@zhiyuanliang-ms zhiyuanliang-ms deleted the zhiyuanliang/select-snapshot branch May 22, 2025 04:46
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.

5 participants