ci: stop a formula that fails to build from reporting a green job - #21
Merged
Conversation
`brew test-bot` marks a failing step as ignored, rather than failed, when the formula has no bottle for the platform it is running on (`ignore_failures = !test_default_formula? && !bottled_on_current_version && !new_formula`). It prints `Warning: N failed steps ignored!` and exits 0, so the job goes green. The tap hits that branch on every version bump: the bottle block only covers the platforms bottles were built for, and a bump replaces the version those bottles belong to. Run 32897389813 is the result: `ethrex` 25.0.0 did not build on Linux at all, and all three jobs were green. `--fail-fast` does not help, it only exits on steps that are actually marked failed. So read the `steps_output.txt` that test-bot writes and fail the job whenever a step failed, ignored or not.
ilitteri
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a step after
brew test-bot --only-formulaethat fails the job if test-bot ignored a failing step.Why
ethrex25.0.0 did not build on Linux and all three jobs of that run were still green. The build error was reported as:test-bot decides whether a failure is fatal with (
Homebrew/test_bot/formulae.rb):An ignored step becomes
:ignoredinstead of:failed, andrun!returnsfailed_steps.empty?, so the command exits 0.bottled_on_current_versionisbottled?(formula, no_older_versions: true), so every version bump lands in this branch: the bottle block still points at the previous version. That is exactly when the build most needs checking, and it is the one time the result is silently discarded. Upstream homebrew/core can live with this (an unbottled formula failing is not a blocker there); a single-formula tap cannot.--fail-fastdoes not help: it only exits on steps already marked failed.How
test-bot writes its summary to
steps_output.txt.All steps passed!when clean, otherwise aWarning: N failed steps ignored!and/orError: N failed steps!block. The new step greps forfailed stepand fails the job, printing the summary for context. A missing file also fails, so the check cannot silently stop working.Verified against fixtures for the four states:
steps_output.txtAll steps passed!Warning: 1 failed step ignored!Error: 1 failed step!Notes
ubuntu-24.04(correctly, but there is no reason to sit through it).macos-15-intelskips unconditionally:rustandrustuphave nosequoia(x86_64) bottles, sodeps_without_compatible_bottlesis never empty there. That job has tested nothing for some time and is worth its own discussion, but failing on skips would just make it permanently red.