[Container App Job] Fix crash for containerapp job update --no-wait - #33807
Open
cimnine wants to merge 2 commits into
Open
[Container App Job] Fix crash for containerapp job update --no-wait#33807cimnine wants to merge 2 commits into
containerapp job update --no-wait#33807cimnine wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
jsntcy,
wangzelin007,
yanzhudd and
yonzhan
July 28, 2026 13:07
cimnine
marked this pull request as ready for review
July 28, 2026 13:24
cimnine
requested review from
a team,
Greedygre,
Juliehzl and
howang-ms
as code owners
July 28, 2026 13:24
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
@microsoft-github-policy-service agree company="nxt Engineering GmbH" |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a TypeError: argument of type 'NoneType' is not iterable crash in az containerapp job update --no-wait by ensuring the provisioning-state warning check short-circuits before evaluating the response object when no_wait=True.
Changes:
- Reorders the post-update
provisioningState == "waiting"check inupdate_containerappsjob_logicto guard onnot no_waitfirst. - Adds unit tests to ensure both
containerapp updateandcontainerapp job updatedo not crash under--no-waitand still return the update response whenno_wait=False.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/containerapp/custom.py |
Prevents None response from being evaluated in the provisioning-state check when --no-wait is set. |
src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerapp_update_provisioning_state.py |
Adds regression tests covering no_wait=True (no crash) and no_wait=False (returns response) for both app and job update paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Related command
az containerapp job update \ --name ${{ job.Name }} \ --resource-group ${{ parameters.ResourceGroupName }} \ --image ${{ parameters.ContainerRegistryName }}/${{ job.Repository }}:${{ parameters.ImageTag }} \ --no-waitDescription
It fixes the following crash:
This patch was created with the help of Claude Code:
Testing Guide
This will not crash anymore:
az containerapp job update \ --name ${{ job.Name }} \ --resource-group ${{ parameters.ResourceGroupName }} \ --image ${{ parameters.ContainerRegistryName }}/${{ job.Repository }}:${{ parameters.ImageTag }} \ --no-waitHistory Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.