Commit e467550
committed
Raise
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 CIToolError and exit non-zero on ecosystem panics1 parent f14edd8 commit e467550
3 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
529 | 531 | | |
530 | 532 | | |
531 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
532 | 538 | | |
533 | 539 | | |
534 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments