Skip to content

fix: azure-cli falls back to pip on unknown Ubuntu codenames#1668

Merged
abdurriq merged 4 commits into
mainfrom
copilot/fix-azure-cli-no-op
May 28, 2026
Merged

fix: azure-cli falls back to pip on unknown Ubuntu codenames#1668
abdurriq merged 4 commits into
mainfrom
copilot/fix-azure-cli-no-op

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

The azure-cli feature silently no-ops (exit 0, prints "Done!") when VERSION_CODENAME isn't in the hardcoded allowlist. On Ubuntu 26.04 (resolute), containers appear healthy but have no az binary.

Changes:

  • Add resolute to AZCLI_ARCHIVE_VERSION_CODENAMES for direct apt support on Ubuntu 26.04
  • Add else fallback to pip when codename/architecture is unrecognized — prevents silent failure on future releases:
if [[ "${AZCLI_ARCHIVE_ARCHITECTURES}" = *"${architecture}"* ]] && [[ "${AZCLI_ARCHIVE_VERSION_CODENAMES}" = *"${VERSION_CODENAME}"* ]]; then
    install_using_apt || use_pip="true"
else
    echo "(*) Codename '${VERSION_CODENAME}' ... not in apt archive list, falling back to pip installation."
    use_pip="true"
fi
  • Bump feature version to 1.3.0
  • Add install_in_ubuntu_resolute test scenario against mcr.microsoft.com/devcontainers/base:ubuntu

…upport

- 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
Copilot AI changed the title [WIP] Fix azure-cli silent no-op on unknown Ubuntu codenames fix: azure-cli falls back to pip on unknown Ubuntu codenames May 28, 2026
Copilot AI requested a review from Kaniska244 May 28, 2026 09:56
@Kaniska244
Copy link
Copy Markdown
Contributor

@copilot The fallback mechanism is required to be tested. Test for ubuntu plucky (25.04) perhaps?

Ubuntu plucky's codename is not in the apt archive allowlist, so this
scenario exercises the else-branch pip fallback path.
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 28, 2026

@copilot The fallback mechanism is required to be tested. Test for ubuntu plucky (25.04) perhaps?

Added install_fallback_pip_ubuntu_plucky test scenario that uses mcr.microsoft.com/devcontainers/base:plucky (Ubuntu 25.04). Since plucky is not in AZCLI_ARCHIVE_VERSION_CODENAMES, this exercises the else fallback-to-pip path. See commit 5e6e6f5.

@Kaniska244 Kaniska244 marked this pull request as ready for review May 28, 2026 11:01
@Kaniska244 Kaniska244 requested a review from a team as a code owner May 28, 2026 11:01
@abdurriq abdurriq merged commit 72df8a5 into main May 28, 2026
15 checks passed
@abdurriq abdurriq deleted the copilot/fix-azure-cli-no-op branch May 28, 2026 16:06
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.

azure-cli: silent no-op on unknown Ubuntu codenames (e.g. resolute / 26.04)

3 participants