Skip to content

Support tag filter #188

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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

Support tag filter #188

wants to merge 31 commits into from

Conversation

zhiyuanliang-ms
Copy link
Contributor

@zhiyuanliang-ms zhiyuanliang-ms commented Apr 23, 2025

Usage

const config = await load(connectionString, {
    selectors: [
        { tagFilters: ["tag1=", "tag2=someValue] }
    ],
    featureFlagOptions: {
        enabled: true,
        selectors: [
            { tagFilters: ["tag1=", "tag2=someValue] }
        ]
    }
});

Comment on lines +942 to +945
const sortedStringA = [...tagsA].sort().join("\n");
const sortedStringB = [...tagsB].sort().join("\n");

return sortedStringA === sortedStringB;

Choose a reason for hiding this comment

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

Is this check robust? \n is not allowed in tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed .NET provider's implementation: https://github.com/Azure/AppConfiguration-DotnetProvider/pull/637/files#diff-5f9d810c153f73ab4382bfddf40b76b7c30bba39beae6e74557bc078115f3f95

I checked out backend code, we don't forbid \n but the portal will not allow you to enter \n when creating a tag.

Base automatically changed from zhiyuanliang/select-snapshot to main 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.

2 participants