From a2acaca9873c800583c15d32621cca54c95756aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 09:52:14 +0000 Subject: [PATCH 1/4] Initial plan From 6b36d02341cac8c3a872fff5d686fd3b269698d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 09:55:24 +0000 Subject: [PATCH 2/4] fix: azure-cli falls back to pip on unknown codenames, add resolute support - Add 'resolute' (Ubuntu 26.04) to AZCLI_ARCHIVE_VERSION_CODENAMES - Add else branch to fall back to pip when codename/arch not in allowlist - Bump feature version to 1.3.0 - Add test scenario for Ubuntu resolute --- src/azure-cli/devcontainer-feature.json | 2 +- src/azure-cli/install.sh | 5 ++++- test/azure-cli/install_in_ubuntu_resolute.sh | 14 ++++++++++++++ test/azure-cli/scenarios.json | 9 +++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 test/azure-cli/install_in_ubuntu_resolute.sh diff --git a/src/azure-cli/devcontainer-feature.json b/src/azure-cli/devcontainer-feature.json index a634818b6..7280ad2ad 100644 --- a/src/azure-cli/devcontainer-feature.json +++ b/src/azure-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "azure-cli", - "version": "1.2.9", + "version": "1.3.0", "name": "Azure CLI", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli", "description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.", diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh index bc5744ce2..425deafe9 100755 --- a/src/azure-cli/install.sh +++ b/src/azure-cli/install.sh @@ -19,7 +19,7 @@ AZ_BICEPVERSION=${BICEPVERSION:-latest} INSTALL_USING_PYTHON=${INSTALLUSINGPYTHON:-false} MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc" AZCLI_ARCHIVE_ARCHITECTURES="amd64 arm64" -AZCLI_ARCHIVE_VERSION_CODENAMES="stretch bookworm buster bullseye bionic focal jammy noble trixie" +AZCLI_ARCHIVE_VERSION_CODENAMES="stretch bookworm buster bullseye bionic focal jammy noble trixie resolute" if [ "$(id -u)" -ne 0 ]; then echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' @@ -200,6 +200,9 @@ CACHED_AZURE_VERSION="${AZ_VERSION}" # In case we need to fallback to pip and th if [ "${INSTALL_USING_PYTHON}" != "true" ]; then if [[ "${AZCLI_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${AZCLI_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then install_using_apt || use_pip="true" + else + echo "(*) Codename '${VERSION_CODENAME}' or architecture '${architecture}' not in apt archive list, falling back to pip installation." + use_pip="true" fi else use_pip="true" diff --git a/test/azure-cli/install_in_ubuntu_resolute.sh b/test/azure-cli/install_in_ubuntu_resolute.sh new file mode 100644 index 000000000..eff30a25c --- /dev/null +++ b/test/azure-cli/install_in_ubuntu_resolute.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +# Import test library for `check` command +source dev-container-features-test-lib + +# Check to make sure the user is vscode +check "user is vscode" whoami | grep vscode + +check "version" az --version + +# Report result +reportResults diff --git a/test/azure-cli/scenarios.json b/test/azure-cli/scenarios.json index 1ba173de9..fa07782ef 100644 --- a/test/azure-cli/scenarios.json +++ b/test/azure-cli/scenarios.json @@ -102,5 +102,14 @@ "moby": false } } + }, + "install_in_ubuntu_resolute": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "user": "vscode", + "features": { + "azure-cli": { + "version": "latest" + } + } } } \ No newline at end of file From 6ce8979902ef5d493aff6c7865ec8a7d08aa59c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 10:21:33 +0000 Subject: [PATCH 3/4] test: add scenario for pip fallback on Ubuntu plucky (25.04) Ubuntu plucky's codename is not in the apt archive allowlist, so this scenario exercises the else-branch pip fallback path. --- .../install_fallback_pip_ubuntu_plucky.sh | 16 ++++++++++++++++ test/azure-cli/scenarios.json | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/azure-cli/install_fallback_pip_ubuntu_plucky.sh diff --git a/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh b/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh new file mode 100644 index 000000000..69d5ba74f --- /dev/null +++ b/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +# Import test library for `check` command +source dev-container-features-test-lib + +# Check to make sure the user is vscode +check "user is vscode" whoami | grep vscode + +# Ubuntu plucky (25.04) is NOT in the apt archive codename allowlist, +# so this test validates the pip fallback path. +check "version" az --version + +# Report result +reportResults diff --git a/test/azure-cli/scenarios.json b/test/azure-cli/scenarios.json index fa07782ef..7623bcb24 100644 --- a/test/azure-cli/scenarios.json +++ b/test/azure-cli/scenarios.json @@ -111,5 +111,14 @@ "version": "latest" } } + }, + "install_fallback_pip_ubuntu_plucky": { + "image": "mcr.microsoft.com/devcontainers/base:plucky", + "user": "vscode", + "features": { + "azure-cli": { + "version": "latest" + } + } } } \ No newline at end of file From 923675255a1bb611f0622c985c3930a0195bd75a Mon Sep 17 00:00:00 2001 From: Kaniska Date: Thu, 28 May 2026 10:37:06 +0000 Subject: [PATCH 4/4] Correcting the fallback test --- .../install_fallback_pip_ubuntu_plucky.sh | 3 --- test/azure-cli/scenarios.json | 17 ++++++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh b/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh index 69d5ba74f..f6fffd02b 100644 --- a/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh +++ b/test/azure-cli/install_fallback_pip_ubuntu_plucky.sh @@ -5,9 +5,6 @@ set -e # Import test library for `check` command source dev-container-features-test-lib -# Check to make sure the user is vscode -check "user is vscode" whoami | grep vscode - # Ubuntu plucky (25.04) is NOT in the apt archive codename allowlist, # so this test validates the pip fallback path. check "version" az --version diff --git a/test/azure-cli/scenarios.json b/test/azure-cli/scenarios.json index 7623bcb24..29fb4f935 100644 --- a/test/azure-cli/scenarios.json +++ b/test/azure-cli/scenarios.json @@ -1,4 +1,12 @@ { + "install_fallback_pip_ubuntu_plucky": { + "image": "ubuntu:plucky", + "features": { + "azure-cli": { + "version": "latest" + } + } + }, "install_extensions_trixie": { "image": "mcr.microsoft.com/devcontainers/base:trixie", "user": "vscode", @@ -111,14 +119,5 @@ "version": "latest" } } - }, - "install_fallback_pip_ubuntu_plucky": { - "image": "mcr.microsoft.com/devcontainers/base:plucky", - "user": "vscode", - "features": { - "azure-cli": { - "version": "latest" - } - } } } \ No newline at end of file