Skip to content

#865: az mac install#1945

Open
shodiBoy1 wants to merge 10 commits into
devonfw:mainfrom
shodiBoy1:feature/865-az-mac-install
Open

#865: az mac install#1945
shodiBoy1 wants to merge 10 commits into
devonfw:mainfrom
shodiBoy1:feature/865-az-mac-install

Conversation

@shodiBoy1

@shodiBoy1 shodiBoy1 commented May 13, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #865

Implemented changes:

  • AzureUrlUpdater now registers macOS arm64 and x86_64 tarballs published by Microsoft on GitHub releases starting at azure-cli 2.85.0.
  • Azure commandlet sets the AZ_PYTHON environment variable on macOS, pointing to IDEasy's installed Python. Required by Microsoft's tarball launcher script.
  • CHANGELOG.adoc entry under 2026.05.001.

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • dependency PR#42 has been merged

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board May 13, 2026
@shodiBoy1 shodiBoy1 self-assigned this May 13, 2026
@shodiBoy1 shodiBoy1 added macOS specific for Apple MacOS az Microsoft Azure CLI labels May 13, 2026
@coveralls

coveralls commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 26787096297

Coverage decreased (-0.03%) to 71.064%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 20 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

20 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/az/Azure.java 11 7.14%
com/devonfw/tools/ide/url/tool/az/AzureUrlUpdater.java 7 70.0%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%
com/devonfw/tools/ide/version/VersionSegment.java 1 89.76%

Coverage Stats

Coverage Status
Relevant Lines: 15798
Covered Lines: 11714
Line Coverage: 74.15%
Relevant Branches: 7042
Covered Branches: 4517
Branch Coverage: 64.14%
Branches in Coverage %: Yes
Coverage Strength: 3.14 hits per line

💛 - Coveralls

@shodiBoy1

Copy link
Copy Markdown
Contributor Author

@hohwille

The fix needs changes in 3 repos:

Microsoft's Mac tarball needs Python 3.13 exactly it ships pre-compiled binaries built for that version, they won't load with 3.14. With the current default 3.14* and Python.java#isIgnoreSoftwareRepo=true (one Python per project), installing az on Mac fails with:

  • Cannot satisfy dependency to python in version [3.13,3.14) for az@2.86.0[] since it is conflicting with configured version 3.14 and this tool does not support the software repository.

Before proposing the default change I checked:
nothing in IDEasy hardcodes 3.14, only pip has a Python dep and its range [3.8,) is satisfied by 3.13, tests pass, existing projects unaffected (they keep their own settings copy).

So 3.13 as default looks like the simplest fix that makes ide az work on Mac out of the box. But since it touches every new project - what do you think?

Verified locally on Mac arm64: ide az --version downloads tarball, installs Python 3.13, prints azure-cli 2.86.0.

@shodiBoy1 shodiBoy1 marked this pull request as ready for review May 13, 2026 21:20
@shodiBoy1 shodiBoy1 moved this from 🆕 New to Team Review in IDEasy board May 13, 2026
@hohwille hohwille changed the title Feature/865 az mac install #865: az mac install May 17, 2026
Comment thread url-updater/src/main/java/com/devonfw/tools/ide/url/tool/az/AzureUrlUpdater.java Outdated
@laim2003 laim2003 self-requested a review May 29, 2026 15:35
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/az/Azure.java Outdated

@hohwille hohwille 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.

@shodiBoy1 thanks for your PR. The UrlUpdater change looks ready for merge. The Azure change looks also fine but I added some review comments to further improve 👍

Comment thread CHANGELOG.adoc Outdated
@github-project-automation github-project-automation Bot moved this from Team Review to 👀 In review in IDEasy board Jun 1, 2026
@laim2003

laim2003 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

I think I need some help testing this on my mac; When im running ide install az on my mac, it prints the following:
Could not find any version matching '*' - there are 0 version(s) available but none matched!

IDEasy-ide-install-10-08-55.log

@shodiBoy1

Copy link
Copy Markdown
Contributor Author

I think I need some help testing this on my mac; When im running ide install az on my mac, it prints the following: Could not find any version matching '*' - there are 0 version(s) available but none matched!

IDEasy-ide-install-10-08-55.log

@laim2003 this PR needs two other PRs that are not merged yet:

Until they get merged, you can fake them on your laptop. Steps:

  1. Build IDEasy from this PR

gh pr checkout 1945
mvn -DskipTests package
export PATH="$PWD/cli/target/ide/bin:$PATH"
which ide

  1. Make a test project

mkdir -p ~/tmp/az-test && cd ~/tmp/az-test
ide create az-test
cd az-test

  1. Set Python to 3.13 this fakes settings PR 86

echo 'PYTHON_VERSION=3.13.*' >> ide.properties
Microsoft built the Mac tarball for Python 3.13.

  1. Add the Mac URL files by hand this fakes urls PR 42

URLS=$(ide context | grep urlsPath | awk '{print $2}')
mkdir -p "$URLS/az/az/2.86.0" && cd "$URLS/az/az/2.86.0"

arm64 for Apple Silicon. Use the x86_64 file if your Mac is Intel.
echo 'https://github.com/Azure/azure-cli/releases/download/azure-cli-2.86.0/azure-cli-2.86.0-macos-arm64.tar.gz' > urls
echo 'mac' > urls.OS
echo 'arm64' > urls.ARCH
echo '[ { "tool": "python", "versionRange": "[3.13,3.14)" } ]' > dependencies.json

IDEasy reads download links from a local copy of the ide-urls repo. These four files are the same ones PR #42 will add.

  1. Run the test

cd ~/tmp/az-test/az-test
ide install az
ide az --version

@laim2003

laim2003 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

export PATH="$PWD/cli/target/ide/bin:$PATH" this should probably be /cli/target/package/bin/ right?

and I think i need to create native images for this step as well? Tried some stuff but the zsh terminal wont use the executable from /cli/target/package/bin/, maybe because the build creates a .bat file which wont work on mac. I'll try out building native images and then see from there.

also, even after building, it cant find the command ide context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

az Microsoft Azure CLI macOS specific for Apple MacOS

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Az is not working on Mac x64

4 participants