Skip to content

Conversation

@mrm9084
Copy link
Member

@mrm9084 mrm9084 commented Feb 12, 2026

Description

  • Adds support for Tag Filters via tags-filter
  • Fixes issue where Yaml hinting didn't work for label-filter
  • Updates all the model descriptions for JavaDocs and Yaml hinting.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@mrm9084 mrm9084 requested a review from avanigupta as a code owner February 12, 2026 00:03
Copilot AI review requested due to automatic review settings February 12, 2026 00:03
@github-actions github-actions bot added the azure-spring All azure-spring related issues label Feb 12, 2026
Copy link
Contributor

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.

Pull request overview

Adds support for filtering App Configuration settings and feature flags by tag expressions (via tags-filter), and updates selector model JavaDocs intended to improve configuration metadata/YAML hinting.

Changes:

  • Adds tagsFilter to key/value selector models and propagates it into SettingSelector when listing settings and feature flags.
  • Updates loader/client/property source APIs to thread tags filter through the loading pipeline.
  • Expands unit test coverage for tags filter behavior (null/empty/custom) and snapshot incompatibility.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AzureAppConfigDataLoader.java Passes tagsFilter into setting/feature-flag loads and watched-settings selectors.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AppConfigurationApplicationSettingPropertySource.java Adds tagsFilter field and applies it to SettingSelector for listing settings.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/AppConfigurationSnapshotPropertySource.java Updates superclass constructor call for new tags-filter parameter.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/FeatureFlagClient.java Adds tags-filter support when listing feature flags.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/AppConfigurationKeyValueSelector.java Introduces tagsFilter, adds snapshot vs tags validation, and refreshes JavaDocs.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/ConfigStore.java Updates selector documentation/default initialization behavior (relies on selector default key filter behavior).
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/FeatureFlagKeyValueSelector.java Introduces tagsFilter and refreshes JavaDocs for feature-flag selection behavior.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/FeatureFlagStore.java JavaDoc refresh and minor init-doc clarification.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/AppConfigurationProperties.java JavaDoc refresh for configuration properties root.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/AppConfigurationStoreMonitoring.java JavaDoc refresh and clarified validation description.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/AppConfigurationStoreTrigger.java JavaDoc refresh for trigger semantics.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/test/java/com/azure/spring/cloud/appconfiguration/config/implementation/AppConfigurationApplicationSettingPropertySourceTest.java Adds tests asserting tags-filter propagation into SettingSelector for settings loads.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/test/java/com/azure/spring/cloud/appconfiguration/config/implementation/AppConfigurationPropertySourceKeyVaultTest.java Updates constructor usage for new tags-filter parameter.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/test/java/com/azure/spring/cloud/appconfiguration/config/implementation/FeatureFlagClientTest.java Updates client calls for new tags-filter parameter and adds tags-filter propagation tests.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/test/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/AppConfigurationKeyValueSelectorTest.java Adds tests for tags-filter get/set behavior and snapshot incompatibility.
sdk/spring/spring-cloud-azure-appconfiguration-config/src/test/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/FeatureFlagKeyValueSelectorTest.java Adds tests for tags-filter get/set behavior.
Comments suppressed due to low confidence (1)

sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/properties/FeatureFlagKeyValueSelector.java:91

  • getLabelFilter(List<String> profiles) reverses the provided profiles list in-place. This can throw UnsupportedOperationException when profiles is immutable (e.g., Spring Boot may supply an unmodifiable list), and it also mutates caller state. Consider making a defensive copy (e.g., new ArrayList<>(profiles)) before reversing, similar to AppConfigurationKeyValueSelector.getLabelFilter’s approach.
    public String[] getLabelFilter(List<String> profiles) {
        if (labelFilter == null && profiles.size() > 0) {
            Collections.reverse(profiles);
            return profiles.toArray(new String[profiles.size()]);
        } else if (!StringUtils.hasText(labelFilter)) {

Comment on lines +140 to +149
/**
* Sets the tag filters for feature flags.
*
* @param tagsFilter list of tag expressions in {@code tagName=tagValue} format
* @return this {@link FeatureFlagKeyValueSelector} for chaining
*/
public FeatureFlagKeyValueSelector setTagsFilter(List<String> tagsFilter) {
this.tagsFilter = tagsFilter;
return this;
}
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

The JavaDoc says each tags entry must be in tagName=tagValue format, but setTagsFilter/validateAndInit don’t enforce or validate this (nulls/empty strings/missing = would be accepted silently). Either add validation (and fail fast with a clear message) or relax the JavaDoc to reflect pass-through behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +53
* Filters configurations by tags. Each entry must follow the {@code tagName=tagValue}
* format. When multiple entries are provided, they are combined using AND logic.
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

The JavaDoc states that each entry in tagsFilter must follow tagName=tagValue, but there’s currently no validation ensuring that (or preventing null/blank entries). Please either validate the list in validateAndInit/setter (with a helpful exception message) or adjust the documentation so it doesn’t promise constraints the code doesn’t enforce.

Suggested change
* Filters configurations by tags. Each entry must follow the {@code tagName=tagValue}
* format. When multiple entries are provided, they are combined using AND logic.
* Filters configurations by tags. Each entry is interpreted as a tag-based filter,
* typically in the {@code tagName=tagValue} format. When multiple entries are
* provided, they are combined using AND logic.

Copilot uses AI. Check for mistakes.

/**
* Loads configurations from a named snapshot. Cannot be used together with
* key, label, or tag filters. Must not contain asterisks ({@code *}).
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

JavaDoc says snapshotName “Must not contain asterisks (*)”, but validateAndInit() doesn’t currently check snapshotName for *. Either add the corresponding validation (fail fast) or remove that constraint from the JavaDoc so it matches actual behavior.

Suggested change
* key, label, or tag filters. Must not contain asterisks ({@code *}).
* key, label, or tag filters.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azure-spring All azure-spring related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant