Skip to content

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

Draft
Christine Wanjau (ChristineWanjau) wants to merge 1 commit into
Azure:devfrom
ChristineWanjau:cwanjau/addDescriptionProperty
Draft

[App Configuration] az appconfig kv/snapshot: Add description support#33840
Christine Wanjau (ChristineWanjau) wants to merge 1 commit into
Azure:devfrom
ChristineWanjau:cwanjau/addDescriptionProperty

Conversation

@ChristineWanjau

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

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
⚠️ None ❌ 128/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']
❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
❌appconfig
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_azconfig_json_content_type self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f19b3620d10>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f19b4726d50>
command = 'appconfig kv set --endpoint https://source000002.azconfig.io&nbsp;--auth-mode&nbsp;login&nbsp;--key&nbsp;Key01&nbsp;--value&nbsp;\\"Red\\"&nbsp;--content-type&nbsp;application/json&nbsp;-y'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = AttributeError("'ConfigurationSetting' object has no attribute 'description'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception AttributeError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appconfig.tests.latest.test_appconfig_json_content_type.AppConfigJsonContentTypeScenarioTest testMethod=test_azconfig_json_content_type>
resource_group = 'clitest.rg000001', location = 'eastus'

    @AppConfigResourceGroupPreparer(parameter_name_for_location='location')
    @AllowLargeResponse()
    # Uses Entra ID auth (store created with local auth disabled). For live recording, set
    # AZURE_CLI_TEST_DEV_RESOURCE_GROUP_NAME to a group where you hold "App Configuration Data Owner".
    def test_azconfig_json_content_type(self, resource_group, location):
        src_config_store_prefix = get_resource_name_prefix('source')
        dest_config_store_prefix = get_resource_name_prefix('destination')
        src_config_store_name = self.create_random_name(prefix=src_config_store_prefix, length=24)
        dest_config_store_name = self.create_random_name(prefix=dest_config_store_prefix, length=24)
    
        location = 'eastus'
        sku = 'standard'
        self.kwargs.update({
            'config_store_name': src_config_store_name,
            'src_endpoint': 'https://' + src_config_store_name + '.azconfig.io',
            'rg_loc': location,
            'rg': resource_group,
            'sku': sku
        })
        create_config_store(self, self.kwargs, disable_local_auth=True)
    
        self.kwargs.update({
            'config_store_name': dest_config_store_name,
            'dest_endpoint': 'https://' + dest_config_store_name + '.azconfig.io'
        })
        create_config_store(self, self.kwargs, disable_local_auth=True)
    
        """
        Test Scenario 1: Create settings with JSON Content Type
            - Create settings in Src AppConfig store with JSON Content type
            - Make sure that input value is in valid JSON format
        """
    
        entry_key = "Key01"
        entry_value = '\"Red\"'
        appconfig_value = entry_value.replace('\', '')
        json_content_type_01 = 'application/json'
        self.kwargs.update({
            'key': entry_key,
            'value': entry_value,
            'content_type': json_content_type_01
        })
>       self.cmd('appconfig kv set --endpoint {src_endpoint} --auth-mode login --key {key} --value {value} --content-type {content_type} -y',
                 checks=[self.check('key', entry_key),
                         self.check('value', appconfig_value),
                         self.check('contentType', json_content_type_01)])

src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_json_content_type.py:72: 
 
                                       
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)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
 
 
 
 
                                   _ 

cmd = <azure.cli.core.commands.AzCliCommand object at 0x7f19b3ba8f20>
key = 'Key01', name = None, label = None, content_type = 'application/json'
tags = None, value = '"Red"', description = None, yes = True
connection_string = None, auth_mode = 'login'
endpoint = 'https://source000002.azconfig.io'

    def set_key(cmd,
                key,
                name=None,
                label=None,
                content_type=None,
                tags=None,
                value=None,
                description=None,
                yes=False,
                connection_string=None,
                auth_mode="key",
                endpoint=None):
        azconfig_client = get_appconfig_data_client(cmd, name, connection_string, auth_mode, endpoint)
    
        if content_type:
            if content_type.lower() == KeyVaultConstants.KEYVAULT_CONTENT_TYPE:
                logger.warning("There is a dedicated command to set key vault reference. 'appconfig kv set-keyvault -h'")
            elif content_type.lower() == FeatureFlagConstants.FEATURE_FLAG_CONTENT_TYPE:
                logger.warning("There is a dedicated command to set feature flag. 'appconfig feature set -h'")
    
        retry_times = 3
        retry_interval = 1
    
        label = label if label and label != SearchFilterOptions.EMPTY_LABEL else None
    
        # generate correlation request id for operations in the same activity
        correlation_request_id = str(uuid.uuid4())
    
        for i in range(0, retry_times):
            retrieved_kv = None
            set_kv = None
            new_kv = None
    
            try:
                retrieved_kv = azconfig_client.get_configuration_setting(key=key, label=label, headers={HttpHeaders.CORRELATION_REQUEST_ID: correlation_request_id})
            except ResourceNotFoundError:
                logger.debug("Key '%s' with label '%s' not found. A new key-value will be created.", key, label)
            except HttpResponseError as exception:
                raise CLIErrors.AzureResponseError("Failed to retrieve key-values from config store. " + str(exception))
    
            if retrieved_kv is None:
                if is_json_content_type(content_type):
                    try:
                        # Ensure that provided value is valid JSON and strip comments if needed.
                        value = 'null' if value is None else value
    
                        __validate_json_value(value, content_type)
                    except ValueError:
                        raise CLIErrors.ValidationError('Value "{}" is not a valid JSON object, which conflicts with the content type "{}".'.format(value, content_type))
    
                set_kv = ConfigurationSetting(key=key,
                                              label=label,
                                              value="" if value is None else value,
                                              content_type="" if content_type is None else content_type,
                                              tags=tags,
                                              description=description)
            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
                if is_json_content_type(content_type):
                    try:
                        # Ensure that provided value is valid JSON and strip comments if needed.
                        __validate_json_value(value, content_type)
                    except (TypeError, ValueError):
                        raise CLIErrors.ValidationError('Value "{}" is not a valid JSON object, which conflicts with the content type "{}". Set the value again in valid JSON format.'.format(value, content_type))
                set_kv = ConfigurationSetting(key=key,
                                              label=label,
                                              value=value,
                                              content_type=content_type,
                                              tags=retrieved_kv.tags if tags is None else tags,
                                              read_only=retrieved_kv.read_only,
                                              etag=retrieved_kv.etag,
                                              description=description)
    
            verification_kv = {
                "key": set_kv.key,
                "label": set_kv.label,
                "content_type": set_kv.content_type,
                "value": set_kv.value,
                "tags": set_kv.tags,
>               "description": set_kv.description
                               ^^^^^^^^^^^^^^^^^^
            }
E           AttributeError: 'ConfigurationSetting' object has no attribute 'description'

src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:551: AttributeError
azure/cli/command_modules/appconfig/tests/latest/test_appconfig_json_content_type.py:29
Failed test_azconfig_kv The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py:27
Failed test_azconfig_kv_revision_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py:400
Failed test_azconfig_import_export The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_import_export_commands.py:29
Failed test_appconfig_to_appconfig_import_export The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_import_export_commands.py:1011
Failed test_azconfig_kv_list_resolve_snapshot_references The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_snapshot_reference_commands.py:89
Failed test_azconfig_kv_set_snapshot_reference The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_snapshot_reference_commands.py:23
Failed test_azconfig_local_auth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_mgmt_commands.py:402
Failed test_azconfig_snapshot_filtering The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_commands.py:192
Failed test_azconfig_snapshot_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_commands.py:23
❌3.14
Type Test Case Error Message Line
Failed test_azconfig_json_content_type self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3239a25810>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f323ae5fd90>
command = 'appconfig kv set --endpoint https://source000002.azconfig.io&nbsp;--auth-mode&nbsp;login&nbsp;--key&nbsp;Key01&nbsp;--value&nbsp;\\"Red\\"&nbsp;--content-type&nbsp;application/json&nbsp;-y'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = AttributeError("'ConfigurationSetting' object has no attribute 'description'")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception AttributeError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appconfig.tests.latest.test_appconfig_json_content_type.AppConfigJsonContentTypeScenarioTest testMethod=test_azconfig_json_content_type>
resource_group = 'clitest.rg000001', location = 'eastus'

    @AppConfigResourceGroupPreparer(parameter_name_for_location='location')
    @AllowLargeResponse()
    # Uses Entra ID auth (store created with local auth disabled). For live recording, set
    # AZURE_CLI_TEST_DEV_RESOURCE_GROUP_NAME to a group where you hold "App Configuration Data Owner".
    def test_azconfig_json_content_type(self, resource_group, location):
        src_config_store_prefix = get_resource_name_prefix('source')
        dest_config_store_prefix = get_resource_name_prefix('destination')
        src_config_store_name = self.create_random_name(prefix=src_config_store_prefix, length=24)
        dest_config_store_name = self.create_random_name(prefix=dest_config_store_prefix, length=24)
    
        location = 'eastus'
        sku = 'standard'
        self.kwargs.update({
            'config_store_name': src_config_store_name,
            'src_endpoint': 'https://' + src_config_store_name + '.azconfig.io',
            'rg_loc': location,
            'rg': resource_group,
            'sku': sku
        })
        create_config_store(self, self.kwargs, disable_local_auth=True)
    
        self.kwargs.update({
            'config_store_name': dest_config_store_name,
            'dest_endpoint': 'https://' + dest_config_store_name + '.azconfig.io'
        })
        create_config_store(self, self.kwargs, disable_local_auth=True)
    
        """
        Test Scenario 1: Create settings with JSON Content Type
            - Create settings in Src AppConfig store with JSON Content type
            - Make sure that input value is in valid JSON format
        """
    
        entry_key = "Key01"
        entry_value = '\"Red\"'
        appconfig_value = entry_value.replace('\', '')
        json_content_type_01 = 'application/json'
        self.kwargs.update({
            'key': entry_key,
            'value': entry_value,
            'content_type': json_content_type_01
        })
>       self.cmd('appconfig kv set --endpoint {src_endpoint} --auth-mode login --key {key} --value {value} --content-type {content_type} -y',
                 checks=[self.check('key', entry_key),
                         self.check('value', appconfig_value),
                         self.check('contentType', json_content_type_01)])

src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_json_content_type.py:72: 
 
                                       
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)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
 
 
 
 
                                   _ 

cmd = <azure.cli.core.commands.AzCliCommand object at 0x7f323907c750>
key = 'Key01', name = None, label = None, content_type = 'application/json'
tags = None, value = '"Red"', description = None, yes = True
connection_string = None, auth_mode = 'login'
endpoint = 'https://source000002.azconfig.io'

    def set_key(cmd,
                key,
                name=None,
                label=None,
                content_type=None,
                tags=None,
                value=None,
                description=None,
                yes=False,
                connection_string=None,
                auth_mode="key",
                endpoint=None):
        azconfig_client = get_appconfig_data_client(cmd, name, connection_string, auth_mode, endpoint)
    
        if content_type:
            if content_type.lower() == KeyVaultConstants.KEYVAULT_CONTENT_TYPE:
                logger.warning("There is a dedicated command to set key vault reference. 'appconfig kv set-keyvault -h'")
            elif content_type.lower() == FeatureFlagConstants.FEATURE_FLAG_CONTENT_TYPE:
                logger.warning("There is a dedicated command to set feature flag. 'appconfig feature set -h'")
    
        retry_times = 3
        retry_interval = 1
    
        label = label if label and label != SearchFilterOptions.EMPTY_LABEL else None
    
        # generate correlation request id for operations in the same activity
        correlation_request_id = str(uuid.uuid4())
    
        for i in range(0, retry_times):
            retrieved_kv = None
            set_kv = None
            new_kv = None
    
            try:
                retrieved_kv = azconfig_client.get_configuration_setting(key=key, label=label, headers={HttpHeaders.CORRELATION_REQUEST_ID: correlation_request_id})
            except ResourceNotFoundError:
                logger.debug("Key '%s' with label '%s' not found. A new key-value will be created.", key, label)
            except HttpResponseError as exception:
                raise CLIErrors.AzureResponseError("Failed to retrieve key-values from config store. " + str(exception))
    
            if retrieved_kv is None:
                if is_json_content_type(content_type):
                    try:
                        # Ensure that provided value is valid JSON and strip comments if needed.
                        value = 'null' if value is None else value
    
                        __validate_json_value(value, content_type)
                    except ValueError:
                        raise CLIErrors.ValidationError('Value "{}" is not a valid JSON object, which conflicts with the content type "{}".'.format(value, content_type))
    
                set_kv = ConfigurationSetting(key=key,
                                              label=label,
                                              value="" if value is None else value,
                                              content_type="" if content_type is None else content_type,
                                              tags=tags,
                                              description=description)
            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
                if is_json_content_type(content_type):
                    try:
                        # Ensure that provided value is valid JSON and strip comments if needed.
                        __validate_json_value(value, content_type)
                    except (TypeError, ValueError):
                        raise CLIErrors.ValidationError('Value "{}" is not a valid JSON object, which conflicts with the content type "{}". Set the value again in valid JSON format.'.format(value, content_type))
                set_kv = ConfigurationSetting(key=key,
                                              label=label,
                                              value=value,
                                              content_type=content_type,
                                              tags=retrieved_kv.tags if tags is None else tags,
                                              read_only=retrieved_kv.read_only,
                                              etag=retrieved_kv.etag,
                                              description=description)
    
            verification_kv = {
                "key": set_kv.key,
                "label": set_kv.label,
                "content_type": set_kv.content_type,
                "value": set_kv.value,
                "tags": set_kv.tags,
>               "description": set_kv.description
                               ^^^^^^^^^^^^^^^^^^
            }
E           AttributeError: 'ConfigurationSetting' object has no attribute 'description'

src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py:551: AttributeError
azure/cli/command_modules/appconfig/tests/latest/test_appconfig_json_content_type.py:29
Failed test_azconfig_kv The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py:27
Failed test_azconfig_kv_revision_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_commands.py:400
Failed test_azconfig_import_export The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_import_export_commands.py:29
Failed test_appconfig_to_appconfig_import_export The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_import_export_commands.py:1011
Failed test_azconfig_kv_list_resolve_snapshot_references The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_snapshot_reference_commands.py:89
Failed test_azconfig_kv_set_snapshot_reference The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_kv_snapshot_reference_commands.py:23
Failed test_azconfig_local_auth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_mgmt_commands.py:402
Failed test_azconfig_snapshot_filtering The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_commands.py:192
Failed test_azconfig_snapshot_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_commands.py:23
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

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

[App Configuration] az appconfig kv set: Add --description to set a key-value description.
[App Configuration] az appconfig kv set-keyvault: Add --description to set a Key Vault reference description.
[App Configuration] az appconfig kv set-snapshot-reference: Add --description to set a snapshot reference description.
[App Configuration] az appconfig snapshot create: Add --description to set a snapshot description.


@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

@azure-client-tools-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
@a0x1ab Aditya Pujara (a0x1ab) added the Azure Client Tools Agent Requested Request Azure Client Tools Agent testing and review label Aug 19, 2026
@azure-client-tools-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.

@azure-client-tools-agent azure-client-tools-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.

@azure-client-tools-agent azure-client-tools-agent Bot added azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent and removed Azure Client Tools Agent Requested Request Azure Client Tools Agent testing and review labels Aug 19, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

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

@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
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 azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants