[containerapp] Fix null revisionSuffix when updating from YAML with --from-revision - #9983
Draft
Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
Draft
[containerapp] Fix null revisionSuffix when updating from YAML with --from-revision#9983Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi Copilot, |
microsoft-github-policy-service
Bot
requested review from
Greedygre (Greedygre),
JennyLawrance,
Zunli Hu (Juliehzl),
Vincent He (chinadragon0515),
Eben Carek (ebencarek),
Hong Wang (howang-ms),
Jitin John (jijohn14),
Yu Chen (jsntcy),
Alok Pagariya (pagariyaalok),
Ruslan Yakushev (ruslany),
Sanchit Mehta (sanchitmehta),
Tomer Rosenthal (torosent),
Vini Soto (vinisoto),
Vaclav Turecek (vturecek),
ZelinWang (wangzelin007),
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
June 22, 2026 12:40
…rom-revision When `az containerapp revision copy` or `az containerapp update` is run with both `--yaml` and `--from-revision`, the entire `template` dict is replaced with the old revision's template. This discarded any `revisionSuffix` that was specified in the YAML file, causing the PATCH request to send `revisionSuffix: null`. Fixes: 1. In `set_up_update_containerapp_yaml`: save the revisionSuffix from the YAML-loaded `new_containerapp` before overwriting the template from `--from-revision`, then restore it afterward if it was explicitly set. 2. Apply the `--revision-suffix` CLI arg in the YAML code path (it was previously silently ignored when `--yaml` was provided). Adds unit tests covering all three scenarios: - YAML sets revisionSuffix + --from-revision overwrites template - --revision-suffix CLI arg provided alongside --yaml - Neither YAML nor CLI provides a suffix (old behaviour preserved) Closes #9982"
Copilot
AI
changed the title
[WIP] Fix null revisionSuffix when updating container app from YAML
[containerapp] Fix null revisionSuffix when updating from YAML with --from-revision
Jun 22, 2026
Collaborator
|
containerapp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
az containerapp revision copy(andaz containerapp update) sent"revisionSuffix": nullin the PATCH body even whenproperties.template.revisionSuffixwas set in the--yamlfile or via--revision-suffix.Root cause: In
set_up_update_containerapp_yaml, when--from-revisionis used, the entiretemplatedict is replaced with the old revision's template, silently discarding therevisionSuffixthe YAML had already populated. Additionally, the--revision-suffixCLI arg was fully ignored in the YAML code path.Changes (
containerapp_decorator.py→set_up_update_containerapp_yaml):revisionSuffixfrom the YAML-loaded template before overwriting it with the--from-revisionrevision's template, then restore it afterward.--revision-suffixCLI arg at the end of the YAML path (takes precedence over the YAML value, consistent with the non-YAML path).Tests: Added 5 unit tests in
test_containerapp_patch_unit.pycovering YAML suffix preservation, CLI arg override, and the no-suffix baseline.Related command
az containerapp update,az containerapp revision copyGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (azdevrequired; see.azure-pipelines/templates/azdev_setup.ymlfor the install command untilazdev==0.2.11b1is on PyPI)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.