Skip to content

[App Config] az appconfig kv/snapshot: Add description support - #33840

Merged
Ethan Yang (necusjz) merged 9 commits into
Azure:devfrom
ChristineWanjau:cwanjau/addDescriptionProperty
Sep 4, 2026
Merged

[App Config] az appconfig kv/snapshot: Add description support#33840
Ethan Yang (necusjz) merged 9 commits into
Azure:devfrom
ChristineWanjau:cwanjau/addDescriptionProperty

Conversation

@ChristineWanjau

@ChristineWanjau Christine Wanjau (ChristineWanjau) commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️appconfig
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate appconfig kv list cmd appconfig kv list update parameter fields: updated property choices from ['content_type', 'etag', 'key', 'label', 'last_modified', 'locked', 'tags', 'value'] to ['content_type', 'description', 'etag', 'key', 'label', 'last_modified', 'locked', 'tags', 'value']
⚠️ 1006 - ParaAdd appconfig kv set cmd appconfig kv set added parameter description
⚠️ 1006 - ParaAdd appconfig kv set-keyvault cmd appconfig kv set-keyvault added parameter description
⚠️ 1006 - ParaAdd appconfig kv set-snapshot-reference cmd appconfig kv set-snapshot-reference added parameter description
⚠️ 1010 - ParaPropUpdate appconfig revision list cmd appconfig revision list update parameter fields: updated property choices from ['content_type', 'etag', 'key', 'label', 'last_modified', 'locked', 'tags', 'value'] to ['content_type', 'description', 'etag', 'key', 'label', 'last_modified', 'locked', 'tags', 'value']
⚠️ 1006 - ParaAdd appconfig snapshot create cmd appconfig snapshot create added parameter description
⚠️ 1010 - ParaPropUpdate appconfig snapshot list cmd appconfig snapshot list update parameter fields: updated property choices from ['composition_type', 'created', 'etag', 'expires', 'filters', 'items_count', 'name', 'retention_period', 'size', 'status', 'tags'] to ['composition_type', 'created', 'description', 'etag', 'expires', 'filters', 'items_count', 'name', 'retention_period', 'size', 'status', 'tags']
⚠️ 1010 - ParaPropUpdate appconfig snapshot show cmd appconfig snapshot show update parameter fields: updated property choices from ['composition_type', 'created', 'etag', 'expires', 'filters', 'items_count', 'name', 'retention_period', 'size', 'status', 'tags'] to ['composition_type', 'created', 'description', 'etag', 'expires', 'filters', 'items_count', 'name', 'retention_period', 'size', 'status', 'tags']

Related command

az appconfig kv set
az appconfig kv set-keyvault
az appconfig kv set-snapshot-reference
az appconfig snapshot create

Description

Add description support for App Configuration key-values, Key Vault references, snapshot references, and snapshots. The new --description argument is included in command help and examples, preserved when other key-value properties are updated, and available through show, list, and --fields output.

Depends on #33968 for azure-appconfiguration 1.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

  • Python compilation passed for all changed implementation and test files.
  • Repository pre-commit azdev scan passed.
  • Playback validation is pending the recording update.

History Notes


@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

App Configuration

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Automated sensitive-information remediation ran on this pull request.

  • Detected categories: cloud identifier, payment card
  • Replaced with typed [REDACTED:category] placeholders in: no writable PR fields
  • Could not edit: file changes on a fork branch
  • Comment/review owners notified because Agent Assist cannot edit another user's text: none

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).

@ChristineWanjau Christine Wanjau (ChristineWanjau) changed the title [App Configuration] az appconfig kv/snapshot: Add description propert… [App Config] az appconfig kv/snapshot: Add description propert… Aug 17, 2026
@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

FAIL (exit 1)

Selectors: test_appconfig_kv_commands test_appconfig_snapshot_commands (module)
PR head ref: cwanjau/addDescriptionProperty
PR head sha: cd7e5925d7d483d11058c9c52231b425df09f26a
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_commands.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/32227377785

Live-test recordings: 1 regenerated — archived in workflow artifact live-test-pr-33840 (recordings/).

ℹ️ This PR is from a fork, so recordings were not pushed automatically. Download them from the artifact and commit to your branch.

Recording files
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/recordings/test_azconfig_kv.yaml
Last 80 lines of azdev output
        # name registered with the recording name-replacer, keeping cassettes scrubbed for playback.
        config_store_prefix = get_resource_name_prefix('kvtest')
        config_store_name = self.create_random_name(prefix=config_store_prefix, length=24)
    
        location = 'eastus'
        sku = 'standard'
        self.kwargs.update({
            'config_store_name': config_store_name,
            'rg_loc': location,
            'rg': get_test_resource_group(),
            'sku': sku,
            'endpoint': 'https://' + config_store_name + '.azconfig.io'
        })
        # Create the store with local auth disabled and use Microsoft Entra ID (--auth-mode login)
        # for all data-plane operations.
>       create_config_store(self, self.kwargs, disable_local_auth=True)

azure-cli/src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py:47: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
azure-cli/src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/_test_utils.py:21: in create_config_store
    test.cmd(command)
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in __init__
    self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in _in_process_execute
    raise ex.exception
.venv/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:677: in execute
    raise ex
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:820: in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:789: in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/__init__.py:335: in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
azure-cli/src/azure-cli/azure/cli/command_modules/appconfig/custom.py:108: in create_configstore
    config_store = client.begin_create(resource_group_name, name, configstore_params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/azure/core/tracing/decorator.py:119: in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/azure/mgmt/appconfiguration/operations/_operations.py:1274: in begin_create
    raw_result = self._create_initial(
.venv/lib/python3.12/site-packages/azure/mgmt/appconfiguration/operations/_operations.py:1135: in _create_initial
    map_error(status_code=response.status_code, response=response, error_map=error_map)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

status_code = 404
response = <HttpResponse: 404 Not Found, Content-Type: application/json; charset=utf-8>
error_map = {401: <class 'azure.core.exceptions.ClientAuthenticationError'>, 404: <class 'azure.core.exceptions.ResourceNotFoundEr...09: <class 'azure.core.exceptions.ResourceExistsError'>, 304: <class 'azure.core.exceptions.ResourceNotModifiedError'>}

    def map_error(
        status_code: int,
        response: _HttpResponseCommonAPI,
        error_map: Mapping[int, Type[HttpResponseError]],
    ) -> None:
        if not error_map:
            return
        error_type = error_map.get(status_code)
        if not error_type:
            return
        error = error_type(response=response)
>       raise error
E       azure.core.exceptions.ResourceNotFoundError: (ResourceGroupNotFound) Resource group 'mametcal-python' could not be found.
E       Code: ResourceGroupNotFound
E       Message: Resource group 'mametcal-python' could not be found.

.venv/lib/python3.12/site-packages/azure/core/exceptions.py:163: ResourceNotFoundError
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============================== 1 failed in 1.90s ===============================

Posted by agent-assist live-test workflow.

@x-engineering-agent x-engineering-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:

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.

@ChristineWanjau Christine Wanjau (ChristineWanjau) changed the title [App Config] az appconfig kv/snapshot: Add description propert… [App Configuration] az appconfig kv/snapshot: Add description support Aug 24, 2026
@ChristineWanjau Christine Wanjau (ChristineWanjau) changed the title [App Configuration] az appconfig kv/snapshot: Add description support [App Configuration] az appconfig kv/snapshot: Add description support Aug 24, 2026
@ChristineWanjau
Christine Wanjau (ChristineWanjau) marked this pull request as ready for review September 1, 2026 09:15
Copilot AI lite review requested due to automatic review settings September 1, 2026 09:15
@ChristineWanjau Christine Wanjau (ChristineWanjau) changed the title [App Configuration] az appconfig kv/snapshot: Add description support [App Configuration]az appconfig kv/snapshot: Add description support Sep 1, 2026
@ChristineWanjau Christine Wanjau (ChristineWanjau) changed the title [App Configuration]az appconfig kv/snapshot: Add description support [App Configuration] az appconfig kv/snapshot: Add description support Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 --description support for appconfig kv set, appconfig kv set-keyvault, appconfig kv set-snapshot-reference, and appconfig snapshot create.
  • Extend --fields selection/enums and output formatting to include description for 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

  • ConfigurationSetting doesn't always expose .description, so building the confirmation payload with set_kv.description can crash (AttributeError). Use a safe accessor (or the already-resolved description variable) instead.
            "description": set_kv.description

src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:620

  • Accessing retrieved_kv.description can raise AttributeError for key vault references if the underlying ConfigurationSetting model doesn't expose that attribute. Use getattr when 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.description can raise AttributeError when the ConfigurationSetting type doesn't surface a description attribute. Use a safe accessor (or the local description variable).
            "description": set_kv.description

src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:704

  • Accessing retrieved_kv.description can raise AttributeError for snapshot references if the underlying ConfigurationSetting model doesn't expose that attribute. Use getattr when 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.description can raise AttributeError when the ConfigurationSetting type doesn't surface a description attribute. Use a safe accessor (or the local description variable).
            "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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed

@@ -73,7 +78,8 @@ def __str__(self):
"\nLast Modified: " + self.last_modified + \
"\nLocked: " + self.locked + \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

addressed

Comment on lines +20 to +24
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:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed outdated recording

@a0x1ab Aditya Pujara (a0x1ab) added X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent and removed azure-client-tools-agent labels Sep 2, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-codegen-extensibility-squad.

@necusjz Ethan Yang (necusjz) changed the title [App Configuration] az appconfig kv/snapshot: Add description support [App Config] az appconfig kv/snapshot: Add description support Sep 4, 2026
@necusjz
Ethan Yang (necusjz) merged commit 8ce86d3 into Azure:dev Sep 4, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-codegen-extensibility-squad App Configuration Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants