[App Config] az appconfig kv/snapshot: Add description support - #33840
Conversation
…y support for key-values and snapshots
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
App Configuration |
|
Automated sensitive-information remediation ran on this pull request.
If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment. ✅ Keep the redaction · ❌ Dispute the redaction GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices. Posted by agent-assist (autonomous bug-fix pipeline). |
Live test results —
|
There was a problem hiding this comment.
Automated Review — Checks Failed
This PR (Azure Client Tools Agent Requested) has failing checks that need attention before merge.
Live test: ❌ failed (azdev test run via issue-sentinel live-test workflow) — run details
CI check summary: 46 passed / 5 failed / 0 pending (53 total)
Failed checks:
Azure.azure-cli— Build #20260804.28 failedAzure.azure-cli Full Test— Build #20260804.31 had test failuresAzure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance5)— failedAzure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance5)— failedAzure.azure-cli (Check the Format of Pull Request Title and Content)— failed
The PR title/description format check is failing in addition to the Full Test suite. Please review the linked build logs, fix the underlying test failures, and update the PR title/description to satisfy the Check the Format of Pull Request Title and Content gate (see the repo's PR template for the required format). Once addressed, re-run the checks and this PR will be picked up again for review.
cd7e592 to
7f6f7af
Compare
az appconfig kv/snapshot: Add description support
…hristineWanjau/azure-cli into cwanjau/addDescriptionProperty
az appconfig kv/snapshot: Add description supportaz appconfig kv/snapshot: Add description support
az appconfig kv/snapshot: Add description supportaz appconfig kv/snapshot: Add description support
There was a problem hiding this comment.
Pull request overview
This PR extends the App Configuration command module to surface a description field for key-values and snapshots across create/update flows and output selection/formatting.
Changes:
- Add
--descriptionsupport forappconfig kv set,appconfig kv set-keyvault,appconfig kv set-snapshot-reference, andappconfig snapshot create. - Extend
--fieldsselection/enums and output formatting to includedescriptionfor key-values and snapshots. - Update scenario tests to validate description behavior (plus add a new recording file).
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py | Adds description parameter handling for key-value set flows (kv, keyvault ref, snapshot ref). |
| src/azure-cli/azure/cli/command_modules/appconfig/snapshot.py | Passes description through to snapshot creation. |
| src/azure-cli/azure/cli/command_modules/appconfig/_models.py | Adds description to key-value model/converters and query field enum. |
| src/azure-cli/azure/cli/command_modules/appconfig/_snapshotmodels.py | Adds description to snapshot model and snapshot query field enum. |
| src/azure-cli/azure/cli/command_modules/appconfig/_params.py | Wires --description args and allows description in --fields. |
| src/azure-cli/azure/cli/command_modules/appconfig/_format.py | Displays description in table/group output for key-values and snapshots. |
| src/azure-cli/azure/cli/command_modules/appconfig/_help.py | Adds examples demonstrating --description. |
| src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py | Adds test assertions for key-value description set/show/list/preserve behavior. |
| src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_commands.py | Adds test assertions for snapshot description set/show/list behavior. |
| src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/recordings/test_azconfig_kv_description.yaml | Adds a new recording cassette related to description scenarios. |
Suppressed comments (5)
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:551
ConfigurationSettingdoesn't always expose.description, so building the confirmation payload withset_kv.descriptioncan crash (AttributeError). Use a safe accessor (or the already-resolveddescriptionvariable) instead.
"description": set_kv.description
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:620
- Accessing
retrieved_kv.descriptioncan raiseAttributeErrorfor key vault references if the underlyingConfigurationSettingmodel doesn't expose that attribute. Usegetattrwhen preserving the existing description.
description = retrieved_kv.description if description is None else description
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:636
- Building the confirmation payload with
set_kv.descriptioncan raiseAttributeErrorwhen theConfigurationSettingtype doesn't surface adescriptionattribute. Use a safe accessor (or the localdescriptionvariable).
"description": set_kv.description
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:704
- Accessing
retrieved_kv.descriptioncan raiseAttributeErrorfor snapshot references if the underlyingConfigurationSettingmodel doesn't expose that attribute. Usegetattrwhen preserving the existing description.
description = retrieved_kv.description if description is None else description
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:720
- Building the confirmation payload with
set_kv.descriptioncan raiseAttributeErrorwhen theConfigurationSettingtype doesn't surface adescriptionattribute. Use a safe accessor (or the localdescriptionvariable).
"description": set_kv.description
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| else: | ||
| value = retrieved_kv.value if value is None else value | ||
| content_type = retrieved_kv.content_type if content_type is None else content_type | ||
| description = retrieved_kv.description if description is None else description |
There was a problem hiding this comment.
Addressed
| @@ -73,7 +78,8 @@ def __str__(self): | |||
| "\nLast Modified: " + self.last_modified + \ | |||
| "\nLocked: " + self.locked + \ | |||
There was a problem hiding this comment.
addressed
| User-Agent: | ||
| - AZURECLI/2.88.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0) | ||
| method: PUT | ||
| uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mametcal-python/providers/Microsoft.AppConfiguration/configurationStores/kvdesctest000001?api-version=2025-08-01-preview | ||
| response: |
There was a problem hiding this comment.
Removed outdated recording
|
🔔 Routing this PR to @Azure/act-codegen-extensibility-squad. |
…cked) in KeyValue.__str__
az appconfig kv/snapshot: Add description supportaz appconfig kv/snapshot: Add description support
🤖 PR Validation —⚠️ Review suggested
Related command
az appconfig kv setaz appconfig kv set-keyvaultaz appconfig kv set-snapshot-referenceaz appconfig snapshot createDescription
Add description support for App Configuration key-values, Key Vault references, snapshot references, and snapshots. The new
--descriptionargument is included in command help and examples, preserved when other key-value properties are updated, and available throughshow,list, and--fieldsoutput.Depends on #33968 for
azure-appconfiguration1.9.0. The SDK dependency changes are intentionally excluded from this PR.Test recordings are also intentionally excluded for now and will be added after the implementation review.
Testing Guide
azdev scanpassed.History Notes