Merged
Conversation
Summary -- The huge number of changes in #22205 (comment) should have obviously been a red flag, but I think it would be nice if CI failed when new ecosystem panics were introduced. This PR adds a check for diagnostic lines that start with `panic: Panicked at crates/`, raises a `ToolError` if any are found in the results from the comparison executable, and then also exits non-zero if any errors are returned. If exiting non-zero is going too far, we could also just raise the `ToolError`, as that will at least trigger this message, which was not the case on the PLR1712 PR: https://github.com/astral-sh/ruff/blob/f14edd8661e2803254f89265548c7487f47a09f6/python/ruff-ecosystem/ruff_ecosystem/check.py#L103-L106 Another option would be not to exit zero if Ruff panics, even if `--exit-zero` is used, but I saw that ty has the same behavior and assumed that that was intentional. Test Plan -- Local testing on the 0.15.3 tag showing that ruff-ecosystem exited non-zero. I can also introduce a panic into a lint rule to test this in CI
|
Contributor
Author
|
Exiting non-zero is probably going to disrupt the bot comment, which seems annoying for tracking down the cause of the panic. Testing that now. |
87054ba to
0e2f588
Compare
0e2f588 to
5a2d882
Compare
This reverts commit 6b2ab58.
Contributor
Author
|
That successfully got an ecosystem comment while still failing the ecosystem check, so I reverted the intentional panic. |
amyreese
approved these changes
Feb 27, 2026
dylwil3
approved these changes
Feb 27, 2026
ToolError and exit non-zero on ecosystem panicsToolError and fail CI on new ecosystem panics
ToolError and fail CI on new ecosystem panics
MichaReiser
approved these changes
Mar 4, 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.
Summary
The huge number of changes in #22205 (comment) should have
obviously been a red flag, but I think it would be nice if CI failed when new
ecosystem panics were introduced. This PR adds a check for diagnostic lines that
start with
panic: Panicked at crates/, raises aToolErrorif any are foundin the results from the comparison executable, and then
also exits non-zero iffails the CI run if the corresponding error messageany errors are returned
was printed.
After trying this out in CI, I opted not to change the script's exit code itself
because that suppressed the ecosystem comment. It feels a little hackier
this way but preserves the behavior I wanted of both failing CI and still getting
the ecosystem comment to help with debugging.
Test Plan
Local testing on the 0.15.3 tag showing that ruff-ecosystem exited non-zero and
some manual testing in CI, as you can see below.