-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix ENV["CI"] usage #70675
Fix ENV["CI"] usage #70675
Conversation
This should check I suggest keeping the tests in even if they have an early return on persistent runners, as we could potentially run |
That variable is filtered out so it cannot be checked for.
If we do that in future: we can readd the tests from the git log.
I agree, this would be a good thing to have. |
|
It is explicitly excluded from filtering as otherwise test bot wouldn't be able to detect it. |
This is not correct. |
https://github.com/Homebrew/brew/blob/3eb47725f91f13c7f86d90701aabc84d23e6d5b3/bin/brew#L99 These should be changed to GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED as otherwise this behavior will be incorrect for github-hosted runners. |
Thanks for the correction,
I don't agree. There's a subset that could be changed but many of these are applying to Homebrew's CI more generally and not just our self-hosted runners. Only PostgreSQL shared memory issues seem specific to our self-hosted configuration. |
A huge number of outside repositories, rightly or wrongly, rely on setting this variable to influence the behavior of their continuous integration: https://github.com/search?q=HOMEBREW_GITHUB_ACTIONS&type=code The same is not true of GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED, as these are mostly disconnected forks of homebrew/core or homebrew/brew or our own repositories: https://github.com/search?q=GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED&type=code The original impetus of this was to correct the behavior on CI for non-Homebrew organization repositories. It will still be broken for these hundreds of repos if they rely on these formulae. The behavior is still not correct and I think we could have taken a few more minutes to discuss these changes prior to this pull request being merged. |
Wrongly. We shouldn't be changing our behaviour because others misuse internal, undocumented variables.
As said above: I agree this is the variable we should use for things that specifically fail on our self-hosted workers e.g. PostgreSQL. For things like MySQL: the issue is with them being tested in parallel by
The conversation is ongoing more than 24h later and it's no longer broken for users of I have no issue if you wish to open PRs to propose changing these variables. I'll happily review them. |
We shouldn't be using
ENV["CI"]
in formula, it's way too broad and breaks e.g. installing MySQL in GitHub Actions. Instead, useHOMEBREW_GITHUB_ACTIONS
which we set inbrew test-bot
when on GitHub Actions.This involves deleting a bunch of tests that did nothing before. I'm not sure if the style/audit checks will let this fly but: these tests need removed and they are worse than useless as-is. If they won't go through CI like this: I'll likely add some shitty
--version
or similar tests.Fixes #70493
Closes #70494