From 2c5255927bf70f5dd44a3b965d1a406d3d4d2757 Mon Sep 17 00:00:00 2001 From: Matt Collins Date: Tue, 8 Sep 2026 03:49:01 +0000 Subject: [PATCH 1/3] UID2-7823: add the azure-cli apt repo before installing The AKS E2E job failed at the Pin Azure CLI step: apt could not find azure-cli 2.87.0 to install. The runner image installs azure-cli and then deletes Microsoft's azure-cli apt source. Until recently that delete missed the source file, so the repo stayed configured and pinning a version worked by accident. The image now deletes it properly, so no configured repo carries azure-cli at all. Add the repo ourselves instead of relying on what the image leaves behind, as Microsoft's install docs and actions/runner-images#12361 both recommend. Co-Authored-By: Claude Opus 5 (1M context) Ticket: UID2-7823 Branch: mkc-UID2-7823-azure-cli-apt-source --- actions/pin_azure_cli/action.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/actions/pin_azure_cli/action.yaml b/actions/pin_azure_cli/action.yaml index f66f1f77..7c60f84b 100644 --- a/actions/pin_azure_cli/action.yaml +++ b/actions/pin_azure_cli/action.yaml @@ -22,8 +22,18 @@ runs: AZURE_CLI_VERSION: ${{ inputs.azure_cli_version }} run: | : "${AZURE_CLI_VERSION:?azure_cli_version input is required}" - # Idempotent: a no-op when az is already at the pinned version. The glob - # matches the -1~ apt revision so it need not be spelled out. - pkg="azure-cli=${AZURE_CLI_VERSION}*" + # https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt + AZ_DIST="$(lsb_release -cs)" + sudo mkdir -p /etc/apt/keyrings + curl -sLS https://packages.microsoft.com/keys/microsoft.asc | + gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null + sudo chmod go+r /etc/apt/keyrings/microsoft.gpg + echo "Types: deb + URIs: https://packages.microsoft.com/repos/azure-cli/ + Suites: ${AZ_DIST} + Components: main + Architectures: $(dpkg --print-architecture) + Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources sudo apt-get update - sudo apt-get install -y --allow-downgrades "${pkg}" + # Idempotent: a no-op when az is already at the pinned version. + sudo apt-get install -y --allow-downgrades "azure-cli=${AZURE_CLI_VERSION}-1~${AZ_DIST}" From b7d3f5bfb57caeacd0381d7f67479464bd5bbf69 Mon Sep 17 00:00:00 2001 From: Matt Collins Date: Tue, 8 Sep 2026 04:58:21 +0000 Subject: [PATCH 2/3] UID2-7823: add temporary pin_azure_cli verification workflow Delete before merge. Exercises the action by relative path, which shared-run-e2e-tests.yaml cannot do because it references it at @v3. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/test-pin-azure-cli.yaml | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test-pin-azure-cli.yaml diff --git a/.github/workflows/test-pin-azure-cli.yaml b/.github/workflows/test-pin-azure-cli.yaml new file mode 100644 index 00000000..a364e365 --- /dev/null +++ b/.github/workflows/test-pin-azure-cli.yaml @@ -0,0 +1,38 @@ +name: Test pin_azure_cli (temporary) + +# TEMPORARY — delete before merging UID2-7823. +# Calls the action by relative path so it exercises this branch's version; +# shared-run-e2e-tests.yaml cannot, because it references the action at @v3. +on: + pull_request: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Show runner state before + run: | + echo "preinstalled azure-cli: $(dpkg-query -W -f='${Version}' azure-cli 2>/dev/null || echo none)" + echo "--- apt sources mentioning microsoft ---" + grep -rl microsoft /etc/apt/sources.list.d/ 2>/dev/null || echo "(none)" + + - name: Pin azure-cli + uses: ./actions/pin_azure_cli + with: + azure_cli_version: '2.87.0' + + - name: Verify the pinned version installed + run: | + az --version + pkg="$(dpkg-query -W -f='${Version}' azure-cli)" + echo "installed azure-cli: ${pkg}" + if [[ "${pkg}" != 2.87.0-1~* ]]; then + echo "::error::expected 2.87.0, got ${pkg}" + exit 1 + fi From 7866a05d439198cfe638da83d7b8c94c0ede3310 Mon Sep 17 00:00:00 2001 From: Matt Collins Date: Tue, 8 Sep 2026 05:01:34 +0000 Subject: [PATCH 3/3] UID2-7823: remove temporary pin_azure_cli verification workflow Verified 2.87.0 installs on ubuntu-latest with bundled Python 3.13. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/test-pin-azure-cli.yaml | 38 ----------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/test-pin-azure-cli.yaml diff --git a/.github/workflows/test-pin-azure-cli.yaml b/.github/workflows/test-pin-azure-cli.yaml deleted file mode 100644 index a364e365..00000000 --- a/.github/workflows/test-pin-azure-cli.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Test pin_azure_cli (temporary) - -# TEMPORARY — delete before merging UID2-7823. -# Calls the action by relative path so it exercises this branch's version; -# shared-run-e2e-tests.yaml cannot, because it references the action at @v3. -on: - pull_request: - -permissions: - contents: read - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Show runner state before - run: | - echo "preinstalled azure-cli: $(dpkg-query -W -f='${Version}' azure-cli 2>/dev/null || echo none)" - echo "--- apt sources mentioning microsoft ---" - grep -rl microsoft /etc/apt/sources.list.d/ 2>/dev/null || echo "(none)" - - - name: Pin azure-cli - uses: ./actions/pin_azure_cli - with: - azure_cli_version: '2.87.0' - - - name: Verify the pinned version installed - run: | - az --version - pkg="$(dpkg-query -W -f='${Version}' azure-cli)" - echo "installed azure-cli: ${pkg}" - if [[ "${pkg}" != 2.87.0-1~* ]]; then - echo "::error::expected 2.87.0, got ${pkg}" - exit 1 - fi