Skip to content

Commit beb543b

Browse files
authored
[ty] ecosystem-analyzer: Fail on newly panicking projects (#24043)
## Summary * Fail the ecosystem-analyzer CI run if new projects result in a ty panic * Add a new table to the PR comment if there are projects with large timing diffs (> 50%) ## Test Plan - [x] Clean CI runs on this PR - [x] Failing CI run on [this test PR](#24046)
1 parent 378fe73 commit beb543b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/ty-ecosystem-analyzer.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
run: rustup show
6565

6666
- name: Compute diagnostic diff
67+
id: compute-diagnostic-diff
6768
shell: bash
6869
run: |
6970
cd ruff
@@ -86,7 +87,7 @@ jobs:
8687
8788
cd ..
8889
89-
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@2907323c61016ffd2cab9c25fb255f3dab8ec256"
90+
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@cc6b94ac6d40d7c1cbf891ce48245d6b69e5631b"
9091
9192
ecosystem-analyzer \
9293
--repository ruff \
@@ -111,13 +112,17 @@ jobs:
111112
--new-name "$REF_NAME" \
112113
--output-html dist/diff.html
113114
115+
set +e
114116
ecosystem-analyzer \
115117
generate-diff-statistics \
116118
diagnostics-old.json \
117119
diagnostics-new.json \
120+
--fail-on-new-abnormal-exits \
118121
--old-name "main (merge base)" \
119122
--new-name "$REF_NAME" \
120123
--output diff-statistics.md
124+
DIFF_STATISTICS_EXIT_CODE=$?
125+
set -e
121126
122127
ecosystem-analyzer \
123128
generate-timing-diff \
@@ -133,6 +138,8 @@ jobs:
133138
134139
cat diff-statistics.md >> "$GITHUB_STEP_SUMMARY"
135140
141+
echo "diff_statistics_exit_code=$DIFF_STATISTICS_EXIT_CODE" >> "$GITHUB_OUTPUT"
142+
136143
# NOTE: astral-sh-bot uses this artifact to post comments on PRs.
137144
# Make sure to update the bot if you rename the artifact.
138145
- name: "Upload full report"
@@ -160,3 +167,7 @@ jobs:
160167
with:
161168
name: timing.html
162169
path: dist/timing.html
170+
171+
- name: Fail on new abnormal exits
172+
if: steps.compute-diagnostic-diff.outputs.diff_statistics_exit_code != '0'
173+
run: exit 1

.github/workflows/ty-ecosystem-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
5757
cd ..
5858
59-
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@2907323c61016ffd2cab9c25fb255f3dab8ec256"
59+
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@cc6b94ac6d40d7c1cbf891ce48245d6b69e5631b"
6060
6161
ecosystem-analyzer \
6262
--verbose \

0 commit comments

Comments
 (0)