[Container App Job] Fix crash for containerapp job update --no-wait - #33807
[Container App Job] Fix crash for containerapp job update --no-wait#33807Christian Mäder (cimnine) wants to merge 3 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 Christian Mäder (@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? |
8b1081f to
af248d6
Compare
… there … which contradicts with Swiss copyright law.
Yabo Hu (@VeryEarly) I removed the offending file. You can use an agent to recreate the tests easily. But just writing another copyright header is incompatible with Swiss copyright law, AFAIK. As IANAL, this is the best compromise I could come up with. |
Live test skipped⏭️ Skipping the live test for this revision because no new test file was added ( The live-test pipeline runs only the test files a PR changes, so there is nothing to execute for this commit. This is informational — a regression test is encouraged where it makes sense, but not required. If a test file is added in a later commit, the live test will run automatically. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
🔔 Routing this PR to @Azure/act-observability-squad. |
🤖 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.