Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI experiences failures due to Homebrew being removed from $PATH on GitHub runners #13923

Closed
2 tasks done
p-linnane opened this issue Sep 25, 2022 · 16 comments
Closed
2 tasks done
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@p-linnane
Copy link
Member

p-linnane commented Sep 25, 2022

brew config output

N/A

brew doctor output

N/A

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

CI that uses the 20220922.2 Ubuntu image fails due to GitHub removing Homebrew from $PATH.

actions/runner-images#6283

What happened (include all command output)?

CI fails if it uses the 20220922.2 Ubuntu runner image.

What did you expect to happen?

CI succeeds or fails

Step-by-step reproduction instructions (by running brew commands)

Example: Homebrew/homebrew-cask#132241

@p-linnane p-linnane added the bug Reproducible Homebrew/brew bug label Sep 25, 2022
@carlocab
Copy link
Member

CC @Homebrew/linux. See, in particular: actions/runner-images#6283, actions/runner-images#6280

@mikhailkoliada
Copy link

mikhailkoliada commented Sep 25, 2022

Hey!

Yeah, we had to remove brew from PATH on linux despite all the efforts, we can not predict how people parse tooolchain or the system variables in their code, which caused us some painful issues and I do not think it is an issue you guys can help with, as the usage can be totally arbitrary and purely depends on the design of an end customer.

@MikeMcQuaid
Copy link
Member

@mikhailkoliada Is this only for Ubuntu <22.04? Do you have any ideas/dates when 22.04 will become ubuntu-latest?

@mikhailkoliada
Copy link

mikhailkoliada commented Sep 26, 2022

@MikeMcQuaid currently these are all ubuntus, for consistency. We are planning to migrate ubuntu-22.04 to latest next quarter.

@MikeMcQuaid
Copy link
Member

@mikhailkoliada I cannot reproduce this, it seems Ubuntu 22.04 still has brew in the PATH. Can you confirm if that will change or not?

We are planning to migrate ubuntu-22.04 to latest next quarter.

Thanks!

@mikhailkoliada
Copy link

@MikeMcQuaid for 22.04 changes will be rolled out this week probably too, last week we had to fix only 18.04 and 20.04 quickly due to direct impact

@p-linnane
Copy link
Member Author

There are an increasing number of PR's in homebrew-cask are are failing due to this change.

@carlocab
Copy link
Member

I do not think it is an issue you guys can help with

Actually, actions/runner-images#6280 looks like something we can and should fix, since gcc-12 should still be working despite glibc being keg-only.

@mikhailkoliada
Copy link

mikhailkoliada commented Sep 26, 2022

@carlocab I am afraid it is the tip of the iceberg. We had reports where customers (including premium ones) did not expect to have toolchain other than from Ubuntu's repo being present in the runner at all, i.e. it is not even a problem that gcc-12 does not work, the problem is that exists, say, in $PATH

@carlocab
Copy link
Member

carlocab commented Sep 27, 2022

i.e. it is not even a problem that gcc-12 does not work, the problem is that exists, say, in $PATH

You had the exact same issue with glibc and binutils, which we fixed. Why do you say that we would not be able to fix this one?

@MikeMcQuaid
Copy link
Member

@mikhailkoliada The issue was presumably with it (gcc) being in the PATH rather than existing on disk at all and that it was baked in on the image even when Homebrew on Linux hadn't been run by that customer. Some potential mitigations:

  • make gcc keg-only so it's not in the PATH even when brew is
  • GitHub doesn't auto-install e.g. zstd which will pull in this compiler
  • Remove from PATH on ubuntu-latest but not ubuntu-22.04 (and not when that becomes ubuntu-latest, either)

@sjackman
Copy link
Member

  • GitHub doesn't auto-install e.g. zstd which will pull in this compiler
  • Remove from PATH on ubuntu-latest but not ubuntu-22.04 (and not when that becomes ubuntu-latest, either)

Both of these suggestions sound good to me.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added stale No recent activity and removed stale No recent activity labels Oct 19, 2022
@MikeMcQuaid
Copy link
Member

We have mitigated this with the Homebrew/setup-homebrew action. We don't control what GitHub Actions does so have no ability to influence beyond that.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2022
@armanbilge
Copy link

Dumb question: where is said action?
https://github.com/Homebrew/setup-homebrew

@MikeMcQuaid
Copy link
Member

https://github.com/Homebrew/actions/tree/master/setup-homebrew

@github-actions github-actions bot added the outdated PR was locked due to age label Nov 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

6 participants