Fail CI on new linter ecosystem panics by ntBre · Pull Request #23597 · astral-sh/ruff (original) (raw)

added 2 commits

February 26, 2026 16:05

@ntBre

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

@ntBre

@ntBre ntBre added the ci

Related to internal CI tooling

label

Feb 26, 2026

@ntBre

@ntBre ntBre marked this pull request as ready for review

February 26, 2026 23:52

amyreese

@ntBre ntBre changed the titleRaise ToolError and exit non-zero on ecosystem panics Raise ToolError and fail CI on new ecosystem panics

Feb 27, 2026

@ntBre ntBre changed the titleRaise ToolError and fail CI on new ecosystem panics Fail CI on new linter ecosystem panics

Feb 27, 2026

MichaReiser

@ntBre

@ntBre

@ntBre ntBre deleted the brent/ecosystem-panic branch

March 4, 2026 16:14

carljm added a commit that referenced this pull request

Mar 16, 2026

@carljm

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

[ Show hidden characters]({{ revealButtonHref }})