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

dev-cmd/livecheck: Skip autobumped formulae #18984

Merged
merged 6 commits into from
Jan 4, 2025

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Dec 22, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

- Skip formulae that are autobumped by BrewTestBot,
  to avoid useless effort spent by contributors who
  are checking for formulae to bump and then we close
  their PRs.
@p-linnane p-linnane requested a review from samford December 22, 2024 02:36
Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is currently implemented, users don't have a way to disable this filtering behavior other than manually modifying this code. livecheck blocks for autobumped formulae/casks regularly break, so we need a way to be able to run these checks locally for debugging/fixing. A CLI option to also check autobumped packages (e.g., --autobump) would be a simple addition.

Beyond that, there may be something to be said for also offering an environment variable that would act like --autobump is always used (e.g., HOMEBREW_LIVECHECK_AUTOBUMP). My situation may be a bit rare (since I do a lot of livecheck block maintenance) but I almost never want to skip autobumped packages, so I would greatly prefer to not have to add a CLI option a lot of the time (and having to completely re-do long runs if I forget).

Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
@issyl0
Copy link
Member Author

issyl0 commented Dec 23, 2024

OK, thanks @samford! I’ll add HOMEBREW_LIVECHECK_AUTOBUMP and an —-autobump flag or something similarly named.

issyl0 added 2 commits January 2, 2025 17:20
- This is useful for maintainers to check the full range of livecheck functionality.
- Livecheck blocks can exist in taps other than Core and Cask.
- And packages can have the same name in multiple taps.
Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this in a variety of scenarios (with/without --autobump, with/without HOMEBREW_LIVECHECK_AUTOBUMP=1, normal/debug/JSON runs, only autobumped or not autobumped packages, a mix of autobumped and not autobumped packages, formulae and casks, first-party and third-party taps, etc.) and it appears to work as expected. Nice work and thanks for adding --autobump and HOMEBREW_LIVECHECK_AUTOBUMP (that'll save me some effort on a regular basis).

In case there's any question, this change shouldn't affect brew bump because it has its own logic (using some of the Livecheck methods). A quick test with HOMEBREW_TEST_BOT_AUTOBUMP=1 brew bump a2ps works as expected. Similarly, it shouldn't affect the core/cask autobump workflows because those use brew bump.

I added a few suggestions but the only blocker is the ENVS order, as that's causing a test to fail.

Library/Homebrew/env_config.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/livecheck.rb Outdated Show resolved Hide resolved
@issyl0 issyl0 marked this pull request as ready for review January 4, 2025 14:45
@issyl0 issyl0 added this pull request to the merge queue Jan 4, 2025
Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @issyl0!

Merged via the queue into master with commit 683f85f Jan 4, 2025
28 checks passed
@issyl0 issyl0 deleted the livecheck-skip-autobumped-formulae branch January 4, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

option to remove BrewTestBot checked formulae from brew livecheck output
6 participants