Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| containerapp job create | cmd containerapp job create update parameter parallelism: added property default=1 |
||
| containerapp job create | cmd containerapp job create update parameter replica_completion_count: added property default=1 |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug where creating a container app job without specifying --parallelism and --replica-completion-count parameters would fail due to these values defaulting to 0, which is not accepted by the control plane. The fix changes the default values to 1, which aligns with the API documentation and expected behavior.
Changes:
- Updated default values for
parallelismandreplicaCompletionCountfrom 0 to 1 for manual and schedule trigger types in the job creation logic - Added a comprehensive test to verify that manual trigger jobs can be created without explicitly specifying these parameters and that they default to 1
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/containerapp/containerapp_job_decorator.py | Changed default values for replicaCompletionCount and parallelism from 0 to 1 for manual and schedule trigger configurations |
| src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerappjob_crud.py | Added test case test_containerappjob_create_with_default_parallelism_and_completion_count to verify the new default behavior |
| src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/recordings/test_containerappjob_create_with_default_parallelism_and_completion_count.yaml | Added test recording file for the new test case |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/containerapp/containerapp_job_decorator.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/containerapp/containerapp_job_decorator.py
Outdated
Show resolved
Hide resolved
|
Please fix CI issues |
|
Hi, @yanzhudd / @Greedygre / @yonzhan thank you for taking a look at this PR! It appears the CI failures are unrelated to my changes. Do you have any advice/thoughts on what could be going wrong, or re-trigger if they seem to be transient? Thanks in advance for your help! |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Hi @jepetty |
az containerapp job create Default to the required defaults from the CPaz containerapp job create: Set default values to --parallelism and --replica-completion-count parameters
|
Thank you @yanzhudd! Yes, this PR is ready for review/merge :) |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az containerapp job create --name job-test-1 --resource-group jepetty-week1 --environment job-test-cc --trigger-type "Manual" --replica-timeout 1800 --image "mcr.microsoft.com/k8se/quickstart-jobs:latest" --cpu '0.25' --memory '0.5Gi' --replica-retry-limit 1Description
Testing Guide
az containerapp env create --name job-test-cc --resource-group jepetty-week1az containerapp job create --name job-test-1 --resource-group jepetty-week1 --environment job-test-cc --trigger-type "Manual" --replica-timeout 1800 --image "mcr.microsoft.com/k8se/quickstart-jobs:latest" --cpu '0.25' --memory '0.5Gi' --replica-retry-limit 1Expected to provide intelligent defaults accepted by the control-plane. Today, you get an API error about how these values should not be 0.
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.