Repository navigation
livecheck: make throttle rate and days mutually exclusive - #24451
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Throttle argument contract Library/Homebrew/livecheck.rb, Library/Homebrew/formula.rb, Library/Homebrew/test/livecheck_spec.rb |
Livecheck#throttle documents rate and days as mutually exclusive and raises ArgumentError when supplied or stored options combine both modes, except for metadata-loaded non-resources. Formula.loaded_from_metadata? checks whether the formula namespace directly defines LOADED_FROM_METADATA, and no_autobump! uses this predicate. Specs check the throttle errors. |
Throttle coverage updates Library/Homebrew/test/dev-cmd/bump-cask-pr_spec.rb, Library/Homebrew/test/dev-cmd/bump-formula-pr_spec.rb, Library/Homebrew/test/formula_auditor_spec.rb, Library/Homebrew/test/livecheck/livecheck_spec.rb |
Tests and fixtures for combined rate-and-days throttles are removed. Remaining throttle checks use rate-only or days-only options. |
Merge Risk: 
Minimal · up to 69b2d
-
No actionable merge-blocking risk is established for this change.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names the main change: livecheck throttle rate and throttle days become mutually exclusive. The changeset adds an ArgumentError when both are set, updates the documentation, and removes the combined-throttle tests and fixtures. The title is concise and specific.
-
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
There hasn't been a reasonable scenario where both should be used. Instead it ended up resulting in more issues and complexity when temporarily enabled.
a25d9d5 to
85cc61b
Compare
ZhongRuoyu
left a comment
There was a problem hiding this comment.
Thanks!
Don't think it's necessary to go through the deprecation cycle. Plus there doesn't seem to be any public usage: https://github.com/search?q=%2Fthrottle+.%2B%2C+days%3A+.%2B%2F+NOT+is%3Afork&type=code
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Agreed with no deprecation cycle being needed.
Thanks!
There hasn't been a reasonable scenario where both should be used. Instead it ended up resulting in more issues and complexity when temporarily enabled.
All cases where using both throttles were attempted, it made more sense to use only days throttle.
Removing this avoids having to maintain unused code paths which are checked by AI review: #24450
Not sure if we need a deprecation period here. For core taps, only
opencodeused it from March 31 - June 13. It was never documented on https://docs.brew.sh/brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?n/a