{CI} Update homebrew to latest version during formula test#31623
{CI} Update homebrew to latest version during formula test#31623
Conversation
️✔️AzureCLI-FullTest
|
️✔️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.
Pull Request Overview
This PR ensures the Homebrew CLI is updated to the latest version during the formula test to support the newly added no_autobump! config, which requires Homebrew ≥ 4.5.4.
- Adds a
brew updatestep before uninstalling the pre-installedazure-cli. - Preserves existing Python unlink/link commands and Azure CLI removal.
Comments suppressed due to low confidence (1)
4080772 to
41d4d0b
Compare
| python_version=3.12 | ||
| brew unlink python@$python_version && brew link --overwrite python@$python_version | ||
| brew unlink python@$3.12 && brew link --overwrite python@$3.12 | ||
| brew unlink python@3.13 && brew link --overwrite python@3.13 |
There was a problem hiding this comment.
python@3.13 is a dependency of azure-cli:
==> Installing dependencies for azure-cli: libgit2, sqlite, python@3.13, z3, llvm, rust and python@3.12
python@3.13.4 just released, and brew tries to update it. We need to manually overwrite it too.
Dependency chain cryptography -> rust -> z3 -> python@3.13
There was a problem hiding this comment.
Why is there a dollar sign in $3.12?
There was a problem hiding this comment.
Typo. Weird, the task still succeeds. This line's exit code is 1.
brew unlink python@$3.12 && brew link --overwrite python@$3.12
Error: No such keg: /usr/local/Cellar/python@.12
The && can suppress set -e:
set -e
false && false
echo "wat"
>>> watThere was a problem hiding this comment.
In false && false, the first false will not cause set -e to fail, and the second false is not executed. true && false will cause set -e to fail.
See
976d935 to
e1c6cb0
Compare
| python_version=3.12 | ||
| brew unlink python@$python_version && brew link --overwrite python@$python_version | ||
| # Force relink python@3.xx in Homebrew to resolve the conflict with pre-installed python 3.xx on macOS | ||
| # See: https://github.com/actions/runner-images/issues/9966 |
There was a problem hiding this comment.
One year later, the problem remains unresolved. Update the link to the runner-image issue.
|
The agent is using macOS 14 Close this PR. |
Description
Recently, azure-cli's formula added a new config
no_autobump! because: :requires_manual_review, which is only compatible with homebrew>=4.5.4.Update homebrew to the latest version in test script.
Ref:
:requires_manual_reviewreason Homebrew/brew#20021