Skip to content

Update condition for Mariner and Azure Linux installation for artifacts-helper#105

Closed
ms-nateb wants to merge 2 commits intomicrosoft:mainfrom
ms-nateb:main
Closed

Update condition for Mariner and Azure Linux installation for artifacts-helper#105
ms-nateb wants to merge 2 commits intomicrosoft:mainfrom
ms-nateb:main

Conversation

@ms-nateb
Copy link
Copy Markdown

@ms-nateb ms-nateb commented Apr 1, 2026

Add support for installing on Azure Linux 3.0

@markphip markphip requested a review from Copilot April 1, 2026 12:23
@markphip
Copy link
Copy Markdown
Contributor

markphip commented Apr 1, 2026

@ms-nateb have you done the install steps manually so that you know that the install itself works? Can you increment the version number so when I merge we can publish a new release?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the artifacts-helper install script to recognize Azure Linux 3.0 as a tdnf-based distro (similar to Mariner) so prerequisites can be installed correctly during feature setup.

Changes:

  • Extends OS detection to treat azurelinux VERSION_ID=3.0 like Mariner for package installation.
  • Minor formatting/line alignment cleanup at end of script.
Comments suppressed due to low confidence (1)

src/artifacts-helper/install.sh:78

  • The OS check is very strict (ID==azurelinux and VERSION_ID==3.0). If Azure Linux ships patch/minor versions (e.g. 3.0.x / 3.1) this will fall through to check_packages, which relies on dpkg/apt-get and will fail on tdnf-based distros. Consider keying off ID==azurelinux regardless of version, ID_LIKE containing mariner, or simply detecting tdnf availability to select the package manager.
if [[ "${ID}" == "mariner" || ( "${ID}" == "azurelinux" && "${VERSION_ID}" == "3.0" ) ]]; then
    tdnf install -y wget ca-certificates
    tdnf clean all
else
    check_packages wget ca-certificates
fi

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +73 to 75
if [[ "${ID}" == "mariner" || ( "${ID}" == "azurelinux" && "${VERSION_ID}" == "3.0" ) ]]; then
tdnf install -y wget ca-certificates
tdnf clean all
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

This change adds Azure Linux support, but the feature’s stated OS support (see src/artifacts-helper/README.md “OS Support”) currently only mentions Debian/Ubuntu and Mariner. Please update the OS support documentation to include Azure Linux (and any version constraints) so consumers know it’s supported.

Copilot uses AI. Check for mistakes.
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 could we just approach this differently and discover the right package manager? We could probe for tdnf and it found use that, otherwise use dpkg?

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 could we just approach this differently and discover the right package manager? We could probe for tdnf and it found use that, otherwise use dpkg?

@markphip
Copy link
Copy Markdown
Contributor

markphip commented Apr 1, 2026

I took care of this with #107

@markphip markphip closed this Apr 1, 2026
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.

3 participants