-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Python CLI Tools Installing Inside Python Framework on macOS-12 #6507
Description
Description
We have a GitHub Action that installs codemagic-cli-tools using the following shell command:
pip3 install codemagic-cli-tools
This is supposed to add several CLI programs to the path (installing them to usr/local/bin). We use one of them, app-store-connect, later in the action.
This script broke somewhere between 6 and 1 days ago (the last successful run was on 10/27, around 23:30 UTC, first failed run was yesterday), with the failure:
app-store-connect: command not found
After running some tests, we determined that none of the CLI tools that are supposed to be added are present in usr/local/bin. There was an update to codemagic-cli-tools on the first failed run, so we tried using the exact same version, and the error persisted.
After some more investigation, we noticed that on the last successful run, the python CLI was referenced as simply python3.10, but on the failing runs, it is referenced by the full path:
/Library/Frameworks/Python.framework/Versions/3.11/bin/python
So then we looked into the following directory:
/Library/Frameworks/Python.framework/Versions/3.11/bin
And we found the CLI tools installed there.
We tried running them from there, and got a bunch of Python errors, but that may be a problem with those tools.
However, it seems like the latest macos runner that upgraded Python from 3.10.8 to 3.11 resulted in something about the paths getting messed up for Python.
Last successful run: https://github.com/movehq/hq-driver-ios/actions/runs/3341642377/jobs/5533052139
First failing run: https://github.com/movehq/hq-driver-ios/actions/runs/3370254410/jobs/5590925123
Platforms affected
- Azure DevOps
- GitHub Actions - Standard Runners
- GitHub Actions - Larger Runners
Runner images affected
- Ubuntu 18.04
- Ubuntu 20.04
- Ubuntu 22.04
- macOS 10.15
- macOS 11
- macOS 12
- Windows Server 2019
- Windows Server 2022
Image version and build link
https://github.com/actions/runner-images/blob/macOS-12/20221027.1/images/macos/macos-12-Readme.md
Is it regression?
https://github.com/actions/runner-images/blob/macOS-12/20221018.2/images/macos/macos-12-Readme.md
Expected behavior
CLI tools installed by this Python library should be in usr/local/bin, so they are in the shell path.
Actual behavior
CLI tools are installed to /Library/Frameworks/Python.framework/Versions/3.11/bin, and not in the shell path.
Repro steps
Run the following script in a GitHub Action:
pip3 install codemagic-cli-tools
which app-store-connect