Skip to content

Commit edaffa6

Browse files
authored
[ty] Ecosystem analyzer: parallelize, fix race condition (#19252)
## Summary Pulls in two fixes and a performance optimization: - Fix a bug with the Markdown table formatting. - Combine the two `analyze` commands into a single `diff` command. This means we only need to set up the projects once, which is faster and also avoids a race condition where projects could change between the two `analyze` runs.
1 parent 5fb2fb9 commit edaffa6

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

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

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,36 +64,32 @@ jobs:
6464
6565
cd ..
6666
67-
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@465d4039e28eea1b6b0ba50e989ab84660bb40f1"
67+
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@f0eec0e549684d8e1d7b8bc3e351202124b63bda"
6868
6969
ecosystem-analyzer \
7070
--repository ruff \
71-
analyze \
72-
--projects ruff/projects_old.txt \
73-
--commit old_commit \
74-
--output diagnostics_old.json
75-
76-
ecosystem-analyzer \
77-
--repository ruff \
78-
analyze \
79-
--projects ruff/projects_new.txt \
80-
--commit new_commit \
81-
--output diagnostics_new.json
71+
diff \
72+
--projects-old ruff/projects_old.txt \
73+
--projects-new ruff/projects_new.txt \
74+
--old old_commit \
75+
--new new_commit \
76+
--output-old diagnostics-old.json \
77+
--output-new diagnostics-new.json
8278
8379
mkdir dist
8480
8581
ecosystem-analyzer \
8682
generate-diff \
87-
diagnostics_old.json \
88-
diagnostics_new.json \
83+
diagnostics-old.json \
84+
diagnostics-new.json \
8985
--old-name "main (merge base)" \
9086
--new-name "$REF_NAME" \
9187
--output-html dist/diff.html
9288
9389
ecosystem-analyzer \
9490
generate-diff-statistics \
95-
diagnostics_old.json \
96-
diagnostics_new.json \
91+
diagnostics-old.json \
92+
diagnostics-new.json \
9793
--old-name "main (merge base)" \
9894
--new-name "$REF_NAME" \
9995
--output diff-statistics.md

0 commit comments

Comments
 (0)