[Container App Job] Fix crash for containerapp job update --no-wait - #33807
[Container App Job] Fix crash for containerapp job update --no-wait#33807cimnine wants to merge 2 commits into
containerapp job update --no-wait#33807Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
@microsoft-github-policy-service agree company="nxt Engineering GmbH" |
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.
|
Container App Job |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
containerapp job update --no-waitcontainerapp job update --no-wait
|
Hi @cimnine , thanks for your contribution, please find what license headers used by other files and replace yours in the new test case. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Why? |
🤖 PR Validation — ️✔️ All clear
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.