Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds snapshot support to Azure App Configuration, allowing users to reference immutable snapshots of configuration data instead of using key/label filters. The implementation includes validation to ensure snapshots cannot be used with filters, proper API calls to retrieve snapshot data, and comprehensive test coverage.
- Adds SnapshotName field to Selector struct for referencing snapshots
- Implements validation logic to prevent mixing snapshots with key/label filters
- Adds snapshot retrieval logic using Azure SDK's snapshot APIs
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| azureappconfiguration/options.go | Adds SnapshotName field to Selector struct with documentation |
| azureappconfiguration/utils.go | Updates selector validation to handle snapshot selectors and enforce mutual exclusivity with filters |
| azureappconfiguration/utils_test.go | Adds comprehensive test cases for snapshot selector validation scenarios |
| azureappconfiguration/settings_client.go | Implements snapshot retrieval logic using Azure SDK APIs |
| azureappconfiguration/azureappconfiguration.go | Updates feature flag loading to filter non-feature flag content and handle snapshots |
| azureappconfiguration/snapshot_test.go | Comprehensive test suite covering snapshot loading scenarios and mixed content handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Comment on lines
+92
to
+93
| if snapshot.CompositionType == nil || *snapshot.CompositionType != azappconfig.CompositionTypeKey { | ||
| return nil, fmt.Errorf("composition type for the selected snapshot '%s' must be 'key'", filter.SnapshotName) |
There was a problem hiding this comment.
The error message should specify what composition types are supported or provide more context about why only 'key' type is allowed.
Suggested change
| if snapshot.CompositionType == nil || *snapshot.CompositionType != azappconfig.CompositionTypeKey { | |
| return nil, fmt.Errorf("composition type for the selected snapshot '%s' must be 'key'", filter.SnapshotName) | |
| return nil, fmt.Errorf( | |
| "unsupported composition type '%v' for snapshot '%s': only 'key' is supported by this client. "+ | |
| "Other composition types (e.g., 'set') are not supported.", | |
| snapshot.CompositionType, filter.SnapshotName) |
RichardChen820
approved these changes
Sep 1, 2025
Member
|
LGTM |
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
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.
No description provided.