Skip to content

Conversation

@khushishah513
Copy link
Contributor

@khushishah513 khushishah513 commented Jul 31, 2025


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings July 31, 2025 06:50
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 31, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 31, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in Azure Container Apps job update command where --min-executions 0 and --max-executions 0 were not being applied correctly due to improper boolean evaluation. The fix changes the condition to explicitly check for None values instead of relying on truthy evaluation.

  • Fixed boolean evaluation logic for min/max executions parameters
  • Updated version from 1.2.0b3 to 1.2.0b4
  • Added changelog entry documenting the bug fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/containerapp/setup.py Bumped version to 1.2.0b4
src/containerapp/azext_containerapp/containerapp_job_decorator.py Fixed boolean evaluation for min/max executions to properly handle zero values
src/containerapp/HISTORY.rst Added changelog entry for the bug fix

Comment on lines +311 to 314
or self.get_argument_min_executions() is not None \
or self.get_argument_max_executions() is not None

def set_up_trigger_configurations(self):
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix correctly addresses the boolean evaluation issue, but consider whether negative values should also be handled. If min_executions can only be non-negative, add validation to prevent invalid values.

Suggested change
or self.get_argument_min_executions() is not None \
or self.get_argument_max_executions() is not None
def set_up_trigger_configurations(self):
or (self.get_argument_min_executions() is not None and self.get_argument_min_executions() >= 0) \
or self.get_argument_max_executions() is not None
def set_up_trigger_configurations(self):
if self.get_argument_min_executions() is not None and self.get_argument_min_executions() < 0:
raise InvalidArgumentValueError("min_executions must be a non-negative integer.")

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

github-actions bot commented Jul 31, 2025

Hi @khushishah513

Release Suggestions

Module: containerapp

  • Please log updates into to src/containerapp/HISTORY.rst
  • Update VERSION to 1.2.0b4 in src/containerapp/setup.py

Notes

@khushishah513
Copy link
Contributor Author

@khushishah513 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

@khushishah513 khushishah513 changed the title fixing issue: min/max executions not set in job update azcli fixing issue: min/max executions not accepting 0 values in az containerapp job update Aug 4, 2025
@Greedygre
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@khushishah513 khushishah513 force-pushed the containerapp-jobupdate branch from 049396d to ce0e8bf Compare August 6, 2025 06:41
@Greedygre
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@zhoxing-ms zhoxing-ms merged commit 9da6c05 into Azure:main Aug 7, 2025
24 checks passed
@khushishah513 khushishah513 deleted the containerapp-jobupdate branch September 22, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants