Brew attempts and fails to install python on `macos-13` runners
Describe the bug
I see the following when using the action in a workflow that runs on: macos-13.
Run ts-graphviz/setup-graphviz@v2
with:
macos-skip-brew-update: true
ubuntu-skip-apt-update: false
env:
depth: 100
/usr/local/bin/brew install graphviz
==> Downloading https://ghcr.io/v2/homebrew/core/graphviz/manifests/11.0.0
==> Fetching dependencies for graphviz: jasper, netpbm, gts, gdk-pixbuf, fribidi, pango and librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/manifests/4.2.4
==> Fetching jasper
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/blobs/sha256:18d3d583cb960f8e4872ffc5b2181b6282f95d2c1ebd3a659d0e0b3edf55bc10
==> Downloading https://ghcr.io/v2/homebrew/core/netpbm/manifests/11.02.09
==> Fetching netpbm
==> Downloading https://ghcr.io/v2/homebrew/core/netpbm/blobs/sha256:1eb8e095b030db593891e7ccd136d035f16f3555b29d97f6df470032f2f92c3a
==> Downloading https://ghcr.io/v2/homebrew/core/gts/manifests/0.7.6_3
==> Fetching dependencies for gts: [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.12/manifests/3.12.4
==> Fetching [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.12/blobs/sha256:93d81dfa181e6890b6a2baa4fbb4df71b6c061a2dc7823fe0ae12b2ec4b59cc1
==> Fetching gts
==> Downloading https://ghcr.io/v2/homebrew/core/gts/blobs/sha256:946d3f08c41e94c2861e555358fd152df7c069ad8a2a7f621b64b55cfb8ceffb
==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/manifests/2.42.12
==> Fetching gdk-pixbuf
==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/blobs/sha256:80e5eacf286d8371d7fcc13cc9b79d4612ded6d0db3398c5741790174ae70f85
==> Downloading https://ghcr.io/v2/homebrew/core/fribidi/manifests/1.0.15
==> Fetching fribidi
==> Downloading https://ghcr.io/v2/homebrew/core/fribidi/blobs/sha256:664ed32cf6eb7682b3ff7e86bd4fb3df5f86eb97ebfecf136c6312479c5b15bd
==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.54.0
==> Fetching pango
==> Downloading https://ghcr.io/v2/homebrew/core/pango/blobs/sha256:11d51f9281cd68d0b8718158df55bc28029e25956f1ad313cae99b31ae130dbb
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.58.1
==> Fetching librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/blobs/sha256:2350745eca6a4b73982e9e8c40f4924f5eff08bb43380f4dda54e2586fa19a71
==> Fetching graphviz
==> Downloading https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:e0a790680fbfa22a93b1fc73c7e6f5ca71bc115dacb84cfbf9409c80ee16ec89
==> Installing dependencies for graphviz: jasper, netpbm, gts, gdk-pixbuf, fribidi, pango and librsvg
==> Installing graphviz dependency: jasper
==> Downloading https://ghcr.io/v2/homebrew/core/jasper/manifests/4.2.4
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/0edc7047fdbd9e0fd88f4c5ceed204b57e9b4d4f42c1b1b21c502d68fce31118--jasper-4.2.4.bottle_manifest.json
==> Pouring jasper--4.2.4.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/jasper/4.2.4: 45 files, 1.5MB
==> Installing graphviz dependency: netpbm
==> Downloading https://ghcr.io/v2/homebrew/core/netpbm/manifests/11.02.09
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/1c4be61c6a2db4fdbc7e0252e62cd50fb8296d87a1cc919668ac3c70c6ff7e7f--netpbm-11.02.09.bottle_manifest.json
==> Pouring netpbm--11.02.09.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/netpbm/11.02.09: 417 files, 12.9MB
==> Installing graphviz dependency: gts
==> Downloading https://ghcr.io/v2/homebrew/core/gts/manifests/0.7.6_3
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/0cb7519523b42ff855917c33218c1ef771e3060080fea895de59eb848c833cd1--gts-0.7.6_3.bottle_manifest.json
==> Installing dependencies for gts: [email protected]
==> Installing gts dependency: [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.12/manifests/3.12.4
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/2970a992f26f411cf71250ce54eb24411d8b065824b51819da7085559f09ce66--python@3.12-3.12.4.bottle_manifest.json
==> Pouring [email protected]
Error: The `brew link` step did not complete successfully
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
rm '/usr/local/bin/2to3'
To force the link and overwrite all conflicting files:
brew link --overwrite [email protected]
To list all files that would be deleted:
brew link --overwrite [email protected] --dry-run
Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/2to3
/usr/local/bin/2to3-3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/2to3-3.12
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/idle3
/usr/local/bin/idle3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/idle3.12
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/pydoc3
/usr/local/bin/pydoc3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/pydoc3.12
/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3-config
/usr/local/bin/python3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
/usr/local/bin/python3.12-config -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12-config
==> /usr/local/Cellar/[email protected]/3.12.4/bin/python3.12 -Im ensurepip
==> /usr/local/Cellar/[email protected]/3.12.4/bin/python3.12 -Im pip install -v --no-
==> Summary
🍺 /usr/local/Cellar/[email protected]/3.12.4: 3,277 files, 63.9MB
==> Installing gts
==> Pouring gts--0.7.6_3.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/gts/0.7.6_3: 27 files, 1.4MB
==> Installing graphviz dependency: gdk-pixbuf
==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/manifests/2.42.12
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/51502ca3ad1b3a076e2aec3be882089fbd1c2257b822a0d3c155e23e68a7e70e--gdk-pixbuf-2.42.12.bottle_manifest.json
==> Pouring gdk-pixbuf--2.42.12.ventura.bottle.tar.gz
==> /usr/local/Cellar/gdk-pixbuf/2.42.12/bin/gdk-pixbuf-query-loaders --update-c
🍺 /usr/local/Cellar/gdk-pixbuf/2.42.12: 152 files, 3.8MB
==> Installing graphviz dependency: fribidi
==> Downloading https://ghcr.io/v2/homebrew/core/fribidi/manifests/1.0.15
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/c743b3178050604a607c1ebc433b1b187bb5250afa047857b62467fb9f62249a--fribidi-1.0.15.bottle_manifest.json
==> Pouring fribidi--1.0.15.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/fribidi/1.0.15: 68 files, 703.6KB
==> Installing graphviz dependency: pango
==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.54.0
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/06c4532b8d175a9098d6a1c5b6b1d2b154b126fef30ddbb5b26791e86b8c9675--pango-1.54.0.bottle_manifest.json
==> Pouring pango--1.54.0.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/pango/1.54.0: 69 files, 3.3MB
==> Installing graphviz dependency: librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.58.1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/33310076ed8eb156ee41e99f2dc398e83fffb55bcbf9dfc51dc6145e9bd0ee08--librsvg-2.58.1.bottle_manifest.json
==> Pouring librsvg--2.58.1.ventura.bottle.tar.gz
==> /usr/local/opt/gdk-pixbuf/bin/gdk-pixbuf-query-loaders --update-cache
🍺 /usr/local/Cellar/librsvg/2.58.1: 23 files, 46.4MB
==> Installing graphviz
==> Pouring graphviz--11.0.0.ventura.bottle.tar.gz
🍺 /usr/local/Cellar/graphviz/11.0.0: 283 files, 6.5MB
Error: The process '/usr/local/bin/brew' failed with exit code 1
To Reproduce
I have not made an effort to reproduce this outside of the repo in which it is encountered, e.g. in a new/blank repo.
Expected behavior
Graphviz is installed.
Additional context
- Note that I am using the
macos-skip-brew-update: trueinput. - Previously I filed the similar ts-graphviz/setup-graphviz#375. There, the work-around was to put the setup-graphviz step before setup-R. Here, this does not work.
- The workflow in question runs on
macos-13(x86_64 architecture), notmacos-latest(arm64).
For additional information, here is a workflow https://github.com/khaeru/genno/actions/runs/9559286674 in which this action is used with both macos-latest and macos-13 runners.
The jobs on macos-latest succeed; the ones on macos-13 fail. So I believe I am only seeing failures in the latter case and have updated the issue title.
Pending any fix, could a maintainer please let us know:
- Is this action intended to work on all GitHub's runner images, or only a subset? If so, which ones?
- Is it tested on
macos-13?
@khaeru Thank you for bringing this issue to our attention.
Currently, the setup-graphviz action is tested on the following environments: ubuntu-latest, windows-latest, and macos-latest. Unfortunately, macos-13 is not supported at this time, which is likely causing the issues you are encountering. We recommend using the supported environments for optimal results.
For further details on the tested environments and workflow configurations, please refer to our workflow.yaml.
I am having the opposite problem, almost. When my build uses the macos-13 runner it works. When it uses macos-latest I get
Warning: These files were overwritten during the `brew link` step:
/opt/homebrew/lib/python3.13/site-packages/pip/__init__.py
/opt/homebrew/lib/python3.13/site-packages/pip/__main__.py
/opt/homebrew/lib/python3.13/site-packages/pip/__pip-runner__.py
/opt/homebrew/lib/python3.13/site-packages/pip/_internal/__init__.py
/opt/homebrew/lib/python3.13/site-packages/pip/_internal/build_env.py
/opt/homebrew/lib/python3.13/site-packages/pip/_internal/cache.py
... # And many, many more.
It looks like the bug reported here except it is happening with macos-latest and something is setting the --overwrite option to brew link.
In macOS latest the brew update step done by this action reports that [email protected] is out of date and can be upgraded with brew upgrade. Before the above warning the log shows
==> Upgrading [email protected]
3.13.2 -> 3.13.3
==> Installing dependencies for [email protected]: expat
==> Installing [email protected] dependency: expat
==> Downloading https://ghcr.io/v2/homebrew/core/expat/manifests/2.7.1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/09efb27f4cd66decc2e0f393e7f9292c729064e5c939cd8191f81fc000c3947a--expat-2.7.1.bottle_manifest.json
==> Pouring expat--2.7.1.arm64_sonoma.bottle.tar.gz
🍺 /opt/homebrew/Cellar/expat/2.7.1: 23 files, 684.5KB
==> Installing [email protected]
==> Pouring [email protected]_sonoma.bottle.1.tar.gz
Does anyone know how to stop these warnings as the list of files in the warning goes on for almost 400 lines. It seems strange that Brew would warn about this when an upgrade has specifically been requested.
Does anyone know how to stop these warnings as the list of files in the warning goes on for almost 400 lines. It seems strange that Brew would warn about this when an upgrade has specifically been requested.
I filed https://github.com/Homebrew/homebrew-core/issues/220587 because I could reproduce this in my local Brew installation. From there I learned that this is a one-time migration and will disappear with the next macos-14 (macos-latest) update so there is nothing for setup-graphviz to do.