Skip to content

Null revisionSuffix when updating container app from YAML #32272

Description

@maxkusnetsov

Describe the bug

In the process of updating an application, I am attempting to copy its revision from a YAML configuration file. However, despite specifying the revisionSuffix in the YAML file or using the —revision-suffix command-line argument, it is not included in the final patch request.

Related command

az containerapp revision copy

Errors

No errors

Issue script & Debug output

INFO: cli.azure.cli.core.util: Request URL: 'https://management.azure.com/subscriptions/[MASKED]/resourceGroups/[MASKED]/providers/Microsoft.App/containerApps/backend?api-version=2025-01-01'
INFO: cli.azure.cli.core.util: Request method: 'PATCH'
INFO: cli.azure.cli.core.util: Request headers:
INFO: cli.azure.cli.core.util: 'User-Agent': 'python/3.13.8 (macOS-26.0.1-arm64-arm-64bit-Mach-O) AZURECLI/2.78.0 (HOMEBREW)'
INFO: cli.azure.cli.core.util: 'Accept-Encoding': 'gzip, deflate'
INFO: cli.azure.cli.core.util: 'Accept': '/'
INFO: cli.azure.cli.core.util: 'Connection': 'keep-alive'
INFO: cli.azure.cli.core.util: 'x-ms-client-request-id': 'c2f7647c-fe15-49bf-8fa8-c40d6e229a95'
INFO: cli.azure.cli.core.util: 'Content-Type': 'application/json'
INFO: cli.azure.cli.core.util: 'CommandName': 'containerapp revision copy'
INFO: cli.azure.cli.core.util: 'ParameterSetName': '--name -g --from-revision --yaml --debug'
INFO: cli.azure.cli.core.util: 'Authorization': '[MASKED]'
INFO: cli.azure.cli.core.util: 'Content-Length': '2928'
INFO: cli.azure.cli.core.util: Request body:
INFO: cli.azure.cli.core.util: {"properties": {"template": {"containers": [{"image": "[MASKED]", "name": "backend", "env": [{"name": "BASE_URL", "value": "***"}], "resources": {"cpu": 0.25, "memory": "0.5Gi"}}], "scale": {"minReplicas": 1, "maxReplicas": 1}, "volumes": [], "revisionSuffix": null}}}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443

Expected behavior

Revision suffix should be respected

Environment Summary

azure-cli 2.78.0

core 2.78.0
telemetry 1.1.0

Extensions:
account 0.2.5
containerapp 1.2.0b3

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/bin/python'
Config directory '/Users/max/Library/Application Support/azure'
Extensions directory '/Users/max/Library/Application Support/azure/cliextensions'

Python (Darwin) 3.13.8 (main, Oct 7 2025, 12:01:51) [Clang 17.0.0 (clang-1700.3.19.1)]

Additional context

YAML config file:

properties:
  template:
    revisionSuffix: "dev3"
    containers:
    - image: [MASKED]
      name: backend
      env:
      - name: "BASE_URL"
        value: "[MASKED]"
    initContainers:
    - name: create-db
      args:
      - "-c"
      - "CREATE DATABASE dev1"
    scale:
      minReplicas: 1
      maxReplicas: 1

Also, found the reason in source code:

https://github.com/Azure/azure-cli/blame/dev/src/azure-cli/azure/cli/command_modules/containerapp/custom.py#L238

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainerAppService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions