-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[ARM] az bicep install: Fix a bug where the installation was skipped when --version was specified unless bicep.use_binary_from_path was explicitly set to false
#32337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @shenglol, |
️✔️AzureCLI-BreakingChangeTest
|
|
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.
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 the az bicep install command where installation was incorrectly skipped when a specific version was requested via the --version parameter, if bicep.use_binary_from_path was set to a truthy value. The fix ensures that when a specific version is requested, the CLI proceeds with installation regardless of the use_binary_from_path configuration.
Key changes:
- Modified the condition in
ensure_bicep_installationto only use the Bicep executable from PATH when no specific version is requested - Added informative print statements when installation is skipped
- Updated test cases to reflect the corrected behavior
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/resource/_bicep.py | Modified ensure_bicep_installation to check if release_tag is None before using binary from PATH; added user-facing messages when installation is skipped |
| src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_bicep.py | Updated test stub from False to True and renamed/modified test to verify installation is only skipped when no version is specified |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Related command
az bicep installDescription
The PR fixes a bug where the installation was skipped when
--versionwas specified unlessbicep.use_binary_from_pathwas explicitly set tofalseor not set.Closes #32098.
Testing Guide
az bicep install --version 0.38.33This 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.