-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
cleanup_before: untap unneeded taps on GitHub-hosted runners #1250
Conversation
Should help us get rid of the strange warnings seen in [^1]. `aws/tap/aws-sam-cli` calls `opoo` unconditionally once evaluated [^2]. The tap `aws/tap` is installed on GitHub-hosted runners, and we evaluate all formulae when determining the dependents of testing formulae. A more ideal and comprehensive solution would be to untap all unneeded taps by (recursively) determining which taps are actually needed by the formulae in the testing tap, but that requires evaluating all formulae in the testing tap and can be a bit more work. And in the end, for third-party taps, doing that will still not eliminate the warnings if a dependency has an unconditional `opoo` call like that. So for now, I'm restricting the cleanup to `homebrew/core`. [^1]: https://github.com/Homebrew/homebrew-core/actions/runs/11148695947/job/30986582554?pr=192640 [^2]: https://github.com/aws/homebrew-tap/blob/f2dcc08fa89256b3893a6cfc82e3ac71b05ce28e/Formula/_aws-sam-cli.rb#L58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
homebrew-test-bot/lib/test_cleanup.rb Lines 107 to 115 in d332acb
|
if on_github_hosted_runner && tap.to_s == CoreTap.instance.name | ||
(installed_taps - REQUIRED_TAPS).each do |tap| | ||
test "brew", "untap", tap | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this untap homebrew/core? It is not a required tap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops -- I misread REQUIRED_TAPS
as there was a CoreTap.instance.name
below but that's ALLOWED_TAPS
.
Thanks @ZhongRuoyu, this needed reverted but I still think this approach is worth pursuing!
Yes, I think it'd be good to fixup that logic to handle this as expected. |
Should help us get rid of the strange warnings seen in 1.
aws/tap/aws-sam-cli
callsopoo
unconditionally once evaluated 2. The tapaws/tap
is installed on GitHub-hosted runners, and we evaluate all formulae when determining the dependents of testing formulae.A more ideal and comprehensive solution would be to untap all unneeded taps by (recursively) determining which taps are actually needed by the formulae in the testing tap, but that requires evaluating all formulae in the testing tap and can be a bit more work. And in the end, for third-party taps, doing that will still not eliminate the warnings if a dependency has an unconditional
opoo
call like that. So for now, I'm restricting the cleanup tohomebrew/core
.Footnotes
https://github.com/Homebrew/homebrew-core/actions/runs/11148695947/job/30986582554?pr=192640 ↩
https://github.com/aws/homebrew-tap/blob/f2dcc08fa89256b3893a6cfc82e3ac71b05ce28e/Formula/_aws-sam-cli.rb#L58 ↩