Skip to content

az containerapp update resets template.scale.cooldownPeriod to 300 #10334

Description

Describe the bug

Our Container App is provisioned with Terraform using
cooldown_period_in_seconds = 3600. The deployed app initially reports
properties.template.scale.cooldownPeriod as 3600.

After we run az containerapp update to deploy a new image, the value changes
to the default of 300, even though the update command does not specify a
cooldown period.

Related command

az containerapp update -g -n
--image /:

Errors

/

Issue script & Debug output

/

Expected behavior

/

Environment Summary

azure-cli 2.88.0 *

core 2.88.0 *
telemetry 1.1.0

Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0

Python location '/usr/bin/python3.12'
Config directory '/root/.azure'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.12.9 (main, Jun 2 2026, 15:09:20) [GCC 13.2.0]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Sep 14, 2026
  2. yonzhan commented on Sep 14, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  3. added
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    customer-reportedIssues that are reported by GitHub users external to the Azure organization.
    Service AttentionThis issue is responsible by Azure service team.
    on Sep 14, 2026
  4. removed
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Sep 14, 2026
  5. microsoft-github-policy-service commented on Oct 4, 2026

    @microsoft-github-policy-service
    Contributor

    Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc Hong Wang (@howang-ms), Greedygre (@Greedygre), @Azure/act-observability-squad.

  6. x-engineering-agent commented on Oct 4, 2026

    @x-engineering-agent

    Bug Analysis

    The report supplies enough context for a scoped fix: an app starts with properties.template.scale.cooldownPeriod = 3600, then an image-only az containerapp update changes it to 300. An unrelated image deployment should preserve the configured scaling settings, regardless of whether Terraform originally created the app.

    Source evidence: on extension main at d106f8dce117a3d2bf598cdf3a9b2b90faeb0f9d, ContainerAppUpdateDecorator.construct_payload starts a fresh properties object and copies containers for an image update. Scale is considered an update only when replica or scale-rule arguments are supplied; the scale block does not carry forward the existing cooldown. The update boundary passes that partial payload to the inherited raw PATCH client. Thus the image-only payload omits the persisted scale configuration. This confirms a request-construction gap, not an Agent reproduction of the service's reported reset.

    Fix scope: preserve the effective existing scale settings when updating the revision template, while letting explicitly requested changes win. Retain cooldown, polling interval, replica bounds and scale rules without introducing default values. Preserve YAML and --from-revision behavior, and avoid copying unrelated read-only resource properties or changing API versions.

    Coverage: exercise the real update/decorator-to-client boundary with a persisted cooldown of 3600 and an image-only update; assert both the changed image and preserved scale payload. Include explicit replica/rule overrides, missing scale, and existing-rule cases. Add a focused scenario that provisions non-default scale settings, deploys a new image and asserts those settings remain unchanged. Live Azure evidence and recordings must come from the governed Tester workflow.

    PR title: [Container Apps] Fix #10334: az containerapp update: Preserve the configured cooldown period during image updates

    Posted by x-engineering-agent (Fixer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainerAppRequest X Engineering AgentRequest X Engineering Agent testing and reviewService 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions