[AppConfig] az appconfig kv: Add snapshot reference support#33278
[AppConfig] az appconfig kv: Add snapshot reference support#33278ChristineWanjau wants to merge 7 commits intoAzure:devfrom
az appconfig kv: Add snapshot reference support#33278Conversation
❌AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| appconfig kv list | cmd appconfig kv list added parameter resolve_snapshot_references |
||
| appconfig kv set-snapshot-reference | cmd appconfig kv set-snapshot-reference added |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
az appconfig kv: Add snapshot reference supportaz appconfig kv: Add snapshot reference support
There was a problem hiding this comment.
Pull request overview
Adds Azure App Configuration snapshot reference support to az appconfig kv by introducing a new command to create/update snapshot reference key-values and a new list flag to expand references into the snapshot’s key-values.
Changes:
- Add
az appconfig kv set-snapshot-referenceto write snapshot reference key-values with the appropriate content type/value format. - Add
az appconfig kv list --resolve-snapshot-referencesto expand snapshot references into the referenced snapshot’s key-values (in sequence). - Add constants, CLI params/validators/help text, and scenario tests for the new behaviors.
Reviewed changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_reference_commands.py |
Adds scenario coverage for setting snapshot references and listing with reference resolution. |
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py |
Implements set_snapshot_reference and snapshot-reference expansion in kv list. |
src/azure-cli/azure/cli/command_modules/appconfig/commands.py |
Registers the new appconfig kv set-snapshot-reference command. |
src/azure-cli/azure/cli/command_modules/appconfig/_validators.py |
Adds validation for --snapshot-name. |
src/azure-cli/azure/cli/command_modules/appconfig/_params.py |
Wires new command arguments and the --resolve-snapshot-references flag. |
src/azure-cli/azure/cli/command_modules/appconfig/_help.py |
Documents the new command and list flag with examples. |
src/azure-cli/azure/cli/command_modules/appconfig/_constants.py |
Introduces snapshot reference constants (content type + JSON key). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,180 @@ | |||
| # -------------------------------------------------------------------------------------------- | |||
There was a problem hiding this comment.
Commenting here as I don't want to in the recording. I think test_azconfig_kv_list_resolve_snapshot_ref.yaml must have been accidentally added as there is no test for it. test_azconfig_kv_list_resolve_snapshot_references is a test. I'm assuming it's an old name.
Related command
az appconfig kv set-snapshot-reference (new)
az appconfig kv list --resolve-snapshot-references (new flag)
Description
New command — az appconfig kv set-snapshot-reference
Creates or updates a snapshot reference key-value at the given key (and optional label) pointing at a snapshot by name.
New flag — az appconfig kv list --resolve-snapshot-references
When set, every snapshot reference returned by the list is replaced in sequence by the key-values of the snapshot it points to. Non-reference key-values pass through unchanged.
Testing Guide
History Notes
[Component Name 1]
az appconfig kv set-snapshot-reference: Adds support to create a snapshot reference key-value[Component Name 2]
az appconfig kv list: Adds support to list key-values from a snapshot referenceThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.