Skip to content

ci: Fix macOS bazelisk symlink order issue#11181

Merged
lizan merged 1 commit intoenvoyproxy:masterfrom
keith:ks/ci-fix-macos-bazelisk-symlink-order-issue
May 13, 2020
Merged

ci: Fix macOS bazelisk symlink order issue#11181
lizan merged 1 commit intoenvoyproxy:masterfrom
keith:ks/ci-fix-macos-bazelisk-symlink-order-issue

Conversation

@keith
Copy link
Copy Markdown
Member

@keith keith commented May 13, 2020

In the case that the macOS image has the bazel formula symlinked to
/usr/local/bin/bazel and bazelisk symlinked to
/usr/local/bin/bazelisk, when you attempt to do the brew link --overwrite homebrew thinks bazelisk is already linked, even though the
bazel link is wrong. By unlinking and relinking it, we force homebrew
to actually overwrite /usr/local/bin/bazel.

This appears to have started causing issues with a GitHub actions update
this week.

Signed-off-by: Keith Smiley keithbsmiley@gmail.com

In the case that the macOS image has the `bazel` formula symlinked to
`/usr/local/bin/bazel` and bazelisk symlinked to
`/usr/local/bin/bazelisk`, when you attempt to do the `brew link
--overwrite` homebrew thinks bazelisk is already linked, even though the
`bazel` link is wrong. By unlinking and relinking it, we force homebrew
to actually overwrite `/usr/local/bin/bazel`.

This appears to have started causing issues with a GitHub actions update
this week.

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
@keith
Copy link
Copy Markdown
Member Author

keith commented May 13, 2020

The order of operations to get into the broken state on macOS is:

  1. brew install bazel
  2. /usr/local/bin/bazel is now from the bazel formula
  3. brew install bazelisk
  4. /usr/local/bin/bazel is still from the bazel formula
  5. brew link --overwrite bazelisk this does nothing because /usr/local/bin/bazelisk is already linked so brew does nothing
  6. /usr/local/bin/bazel is still from the bazel formula

@lizan lizan merged commit de7ca30 into envoyproxy:master May 13, 2020
@keith keith deleted the ks/ci-fix-macos-bazelisk-symlink-order-issue branch May 13, 2020 22:18
@keith
Copy link
Copy Markdown
Member Author

keith commented May 13, 2020

Thanks!

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.

2 participants