Skip to content

Use ubuntu-latest and the preinstalled Azure CLI in workflows - #5275

Open
Max Martin (maxmartin-cgi) wants to merge 7 commits into
mainfrom
ubuntu-latest-unpin-azure-cli
Open

Max Martin (maxmartin-cgi) wants to merge 7 commits into
mainfrom
ubuntu-latest-unpin-azure-cli

Conversation

@maxmartin-cgi

Copy link
Copy Markdown
Collaborator

Resolves #5273

What is being addressed

GitHub moves the ubuntu-latest label from Ubuntu 24.04 to Ubuntu 26.04. The rollout started on 19 October 2026 and ends on 19 November 2026. Two workflows need a change:

  • lets_encrypt.yml installs azure-cli="2.81.0-1~<codename>". On Ubuntu 26.04 the codename is resolute, and the Microsoft apt repository has only 2.90.0 and 2.91.0 for it, so apt-get install fails.
  • codeql-analysis.yml uses ubuntu-22.04. GitHub retires this image on 17 April 2027, and jobs on it fail during the brownouts on 6 and 13 April 2027.

How is this addressed

  • lets_encrypt.yml: removes the pinned Azure CLI install. The GitHub-hosted Ubuntu 24.04 and 26.04 runner images include Azure CLI 2.91.0 (per the runner-images Readme for each image), so the step now runs az version. sudo apt-get update moves directly above the certbot package install, which is the only apt install left in the job.
  • codeql-analysis.yml: moves from ubuntu-22.04 to ubuntu-latest.
  • Pending work: none in this PR.
  • Update documentation: no change needed. The docs describe make letsencrypt, which is unchanged.
  • Update CHANGELOG.md: BUG FIXES entry added in the Unreleased section.
  • Increment template version: not applicable, no bundle or component code changed.

Validation:

  • Local: python3 -m unittest discover -s devops/tests -p "test_letsencrypt_preflight.py" -v ran 5 tests, all OK. These run make letsencrypt against fake az and certbot binaries, so they do not cover the install step.
  • Local: PyYAML parsed both edited workflow files without error.
  • CI on bjss/AzureTRE-CGI for commit bb14e20: Build Validation, CodeQL and Docker build passed.
  • Not run: lets_encrypt.yml itself. It is not registered on the fork, so it could not be dispatched, and no live Azure renewal was executed.

Move the CodeQL workflow from ubuntu-22.04 to ubuntu-latest and install
the latest Azure CLI in the Lets Encrypt workflow instead of pinning 2.81.0.

Refs #5273

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitHub-hosted Ubuntu 24.04 and 26.04 runner images include Azure CLI
2.91.0, so the workflow no longer installs a pinned or latest package.
Keep apt-get update before the certbot package install, which is the
only apt install left in the job.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@maxmartin-cgi
Max Martin (maxmartin-cgi) requested a review from a team as a code owner October 23, 2026 09:28
Copilot AI balanced review requested due to automatic review settings October 23, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maxmartin-cgi
Max Martin (maxmartin-cgi) requested a balanced review from Copilot October 23, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 09:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 868f3c5.

♻️ This comment has been updated with latest results.

@maxmartin-cgi

Copy link
Copy Markdown
Collaborator Author

/test

@github-actions

Copy link
Copy Markdown

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/39932922726

(in response to this comment from Max Martin (@maxmartin-cgi))

@JayDoubleu
Jay W (JayDoubleu) self-requested a review October 23, 2026 11:27

@JayDoubleu Jay W (JayDoubleu) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@marrobi Marcus Robinson (marrobi) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we had ubuntu and az cli pinned before as we have been hit by breaking changes in az cli, and ubuntu release breaking dependencies... Can we just pin to the newer versions?

analyze:
name: Analyze
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we not pin? We have had issues before where it has upgraded and broken other dependencies.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Default CodeQL workflow runs on ubuntu-latest and it seems to be working for most. We can always pin it down to version when/if we hit the issue. I worry that these pins add extra maintenance which might no longer be needed.

Default codeql workflow from github:
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}

Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Updated the Azure CLI version in the Lets Encrypt renewal workflow and changed the CodeQL workflow from ubuntu-22.04 to ubuntu-26.04.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Correct the target version for the CodeQL workflow from 'ubuntu-22.04' to 'ubuntu-latest' in the Lets Encrypt renewal workflow.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maxmartin-cgi

Copy link
Copy Markdown
Collaborator Author

/test-force-approve

@github-actions

Copy link
Copy Markdown

🤖 pr-bot 🤖

✅ Marking tests as complete (for commit 868f3c5)

(in response to this comment from Max Martin (@maxmartin-cgi))

This branch has not been deployed

No deployments
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.

ubuntu-latest version change will cause workflows to fail

4 participants