-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
audit: migrate throttle list to Homebrew/core #9039
audit: migrate throttle list to Homebrew/core #9039
Conversation
This comment has been minimized.
This comment has been minimized.
Previous PR regarding moving the throttle allowlist into Homebrew/core: #8048. This PR is different in that it involves adding an external json allowlist within homebrew/core vs DSL, but some of the previous discussion may still be relevant. Having the allowlist in a separate place still requires a comment within the formula to be manually kept in sync with a separate list, but I don't see a clean solution to that without changing the DSL, which is already not small. FWIW, I'm generally in favor of moving formula-specific logic (eg things like the |
Oh, thanks for pointing that out! I didn't realize it was attempted before.
I do with Mike's point in the other PR that the source of the throttling shouldn't be in the formula itself. It makes sense to me that the formula files themselves should only contain build-information and shouldn't be cluttered with the more developer-y side of things. A comment seems sufficient to me to let curious users know why the formula hasn't been updated to the latest release. Plus, keeping the information separate means that it's harder to accidentally/sneakily change that information. One of the valid concerns with moving this information is that contributors will be tempted to add exceptions whenever a formula fails an audit instead of fixing the problem. I think that keeping the exceptions in a separate file will be sufficient to combat this problem, though, and having it in a different repo is unnecessary (hence, this PR).
Agreed |
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.
This approach looks really good to me so far, nice work. Some higher-level thoughts:
- this should be robust to people deleting these files, JSON parsing failure etc. as a no-op for the formula audit and to make the tap-wide audit complain about whatever the problems are with the files
- I'm wondering putting these exceptions in a directory e.g.
audit_exceptions/throttled_formulae.json
or similar would be nicer than hardcoded key values in both places (and probably make merge conflicts and general Git workflows work a bit nicer)
Thanks for the review! I'm 👍 on the renaming suggestion. Will work on this more later today when I have some time.
👍
This still requires hard coding file names, though, right? It's probably easier to manage for users, though, so I'm 👍
Can you give a link to what you're talking about here? I'm looking at this but not seeing what I think you're describing. Edit: ah, you're talking about this part. That looks good, I will continue to investigate. |
Yeh, it does, but it feels like it'd be easier to manage, yeh, and less likely to accidentally have a no-op from the key being typoed.
Thanks! |
Also shift logic to directory-based organization instead of a single file with all lists
Okay, I've made the following changes:
I've migrated the CI will fail currently because I've removed the Once this is ready, I think the easiest way to solve this (and similar future PRs) will be to merge Homebrew/homebrew-core#64043 first and then rerun CI here. Adding those files to homebrew/core before this PR is merged shouldn't cause any problems. |
Agreed 👍🏻 |
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.
Looks good! One tiny suggested change but feel free to merge with or without it (and, if with it, to make the change and merge whenever CI is 💚). Nice work as usual @Rylan12!
Ah, need to wait for Homebrew/homebrew-core#64043 to be merged into linuxbrew-core. Will rerun and merge when that's been done. Thanks for the reviews, @MikeMcQuaid! |
The changes have been merged to linuxbrew-core. |
Okay, the first lists have been migrated! I'll follow up with more migrations in the coming days unless there are any problems with the migrated lists. |
brew style
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?This PR starts moving allowlists and blocklists from the Homebrew/brew repo to the Homebrew/core repo as discussed in #8980. This PR lays the groundwork for migrating all lists to their respective taps and allows exception lists to be specified for third party taps. For now, I've chosen to migrate only one list (the
THROTTLED_FORMULAE
list) as a proof-of-concept. Assuming this is something that is desired, migrating the rest of the lists should be trivial.Corresponding Homebrew/core PR: Homebrew/homebrew-core#64043
In my opinion, the Point Of Truth for these lists should be with the formulae themselves and the
brew
code should not be where tap-specific rules are added.As a summary of #8980, here are my thoughts that I expressed in #8980:
Another maintainer expressed concerns:
CC: @MikeMcQuaid, @fxcoudert and @Homebrew/core