setup-graphviz icon indicating copy to clipboard operation
setup-graphviz copied to clipboard

MacOS builds failing, actions/setup-node does not fix issue

Open jakebeal opened this issue 10 months ago • 5 comments

Describe the bug

Issue #578 was closed with a suggestion that it could be addressed through use of actions/setup-node.

This suggestion does not appear to work: here are failures with both Node 18 and Node 20.

In these transcripts, note that the execution of setup-graphviz appears to ignore the copy of Node.js that is set up via setup-node, as brew installs its own node package (before ultimately failing).

The failure is now actually inside of setup-graphviz, rather than due to Node not being set up before, and does appear to be linked to the outdated packages used by setup-graphviz.

The failure can be found in other projects as well. Examples:

  • https://github.com/jakebeal/kagome/actions/runs/8337292144/job/22815789124 (fork: last run on root project was before failures began)
  • https://github.com/ModECI/MDF/actions/runs/8347579020/job/22847503522.

Please do not close this issue until there is actually a verifiable fix this time.

jakebeal avatar Apr 07 '24 13:04 jakebeal

I am hitting the same failure mode seen in the second failure link in this issue:

...

==> Installing dependencies for graphviz: [email protected], netpbm, gts, gdk-pixbuf, fribidi, pango and librsvg
==> Installing graphviz dependency: [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.12/manifests/3.12.3
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5065c4d76c933aad4e13bd77c1bf37f0afe78f4608261edd170e331cb36c8a0d--python@3.12-3.12.3.bottle_manifest.json
==> Pouring [email protected]
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

Looks like something to do with homebrew Python installation vs. existing system installation?

vkottler avatar Apr 14 '24 18:04 vkottler

  private async brewInstall() {
    const skipBrewUpdate = getBooleanInput("macos-skip-brew-update");
    if (skipBrewUpdate === false) {
      await exec("brew", ["update"]);
    }
    await exec("brew", ["install", "graphviz"]);
  }

Well... given this is all this action really does, it's an issue with the macos-latest worker itself? ¯\_(ツ)_/¯

vkottler avatar Apr 14 '24 18:04 vkottler

@vkottler So far as I was able to diagnose in #578, the problem is that setup-graphviz only does one of the two standard brew update commands. That ends up leaving it with worse information than if it doesn't update at all.

I submitted a possible patch in #579, but it was declined by the maintainers because they didn't think this issue was real at the time. I am hoping that they will take it more seriously now that multiple projects are reporting the same issue.

jakebeal avatar Apr 14 '24 18:04 jakebeal

I was able to fix my issue by:

  • Switching to https://github.com/tlylt/install-graphviz/tree/main
  • Doing graphviz install/setup before Python

Wonder if something similar might work for you @jakebeal ?

vkottler avatar Apr 14 '24 18:04 vkottler

This looks to be equivalent to my current patch, which is to run ts-graphviz/setup-graphviz with the "mac disable update" setting on.

I would prefer not to switch away from ts-graphviz if I can, since this project has historically been stable and well-maintained, but my choice in the end will depend on the future choices made by the maintainers of the this project.

jakebeal avatar Apr 15 '24 02:04 jakebeal

Thank you for the information.

We have not been able to capture the exact situation yet, but it seemed to have affected us more than we anticipated.

I will try to find time to work toward a solution.

Thank you for your continued cooperation.

kamiazya avatar Apr 24 '24 06:04 kamiazya

@all-contributors please add @jakebeal for bug.

kamiazya avatar Apr 24 '24 11:04 kamiazya

@kamiazya

I've put up a pull request to add @jakebeal! :tada:

allcontributors[bot] avatar Apr 24 '24 11:04 allcontributors[bot]

@all-contributors please add @vkottler for bug.

kamiazya avatar Apr 24 '24 11:04 kamiazya

@kamiazya

I've put up a pull request to add @vkottler! :tada:

allcontributors[bot] avatar Apr 24 '24 11:04 allcontributors[bot]

@jakebeal @vkottler

As mentioned in #602, by the time we implemented the integration tests, it appeared that the issues with macOS operations had already been resolved (though I haven't verified this, it's possible that some updates were made on the homebrew).

If the problem continues to occur, please reopen this issue and let me know, and I will investigate further. I appreciate your cooperation and support in addressing these issues. Thank you!

kamiazya avatar Apr 24 '24 11:04 kamiazya

Thank you, @kamiazya : I have just pulled out my workaround, and the build was clean, so things look fixed from my perspective.

jakebeal avatar Apr 24 '24 12:04 jakebeal