ci: use pre-installed Azure CLI in ADO jobs - #2545
Conversation
|
Hey @BrendanWalsh 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Updates the shared Azure DevOps pipeline template to better align with the Ubuntu 22.04 hosted agent toolset by avoiding fragile runtime downloads and redundant installs.
Changes:
- Bump
UsePythonVersionfrom Python 3.8 to 3.10 (uses preinstalled agent Python instead of downloading 3.8). - Remove the
pip install azure-cli==2.60.0step soAzureCLI@2uses the agent’s preinstalledazCLI.
Show a summary per file
| File | Description |
|---|---|
templates/update_cli.yml |
Switches Python selection to 3.10 and removes the pinned azure-cli pip install to reduce job overhead and failures. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2545 +/- ##
=======================================
Coverage 84.79% 84.79%
=======================================
Files 334 334
Lines 17806 17806
Branches 1623 1623
=======================================
Hits 15099 15099
Misses 2707 2707 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Python 3.8 is not pre-installed on the ubuntu-22.04 agent image (toolcache only has 3.10-3.14). Every job was downloading 3.8 from GitHub at runtime, which is fragile — build 213983677 hit a 502. Also removes the pip install azure-cli==2.60.0 step. The AzureCLI@2 task uses the agent's pre-installed az (currently 2.84.0), so this was actually downgrading it and wasting ~30s per job.
60a6695 to
562e248
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ranadeepsingh
left a comment
There was a problem hiding this comment.
No blocking findings. After rebasing, the diff only removes the redundant Azure CLI 2.88.0 pip install; the hosted Ubuntu 22.04 image already provides the same version. ADO build 229176406 passed all 65 jobs. The removed step averaged 50.8 seconds across 62 jobs in the comparison build, or 52.5 agent-minutes per full run.
Problem
masternow uses cached Python 3.11 intemplates/update_cli.yml, so the original Python upgrade in this PR is obsolete. The shared template still runspython -m pip install azure-cli==2.88.0in every job that includes it, even though the Microsoft-hosted Ubuntu 22.04 image already includes Azure CLI 2.88.0.Change
mastermasterValidation and impact
/azp runbuild 229176406 passed all 65 jobs with no failed tasks.Install Azure CLItasks; authenticatedAzureCLI@2tasks succeeded with the hosted CLI.Install Azure CLItasks averaged 50.8 seconds each (3,151 seconds / 52.5 agent-minutes total).JavaToolInstaller, confirming roughly 51 seconds saved per affected job. Because jobs run in parallel, the expected wall-clock critical-path saving is about one minute.