-
Notifications
You must be signed in to change notification settings - Fork 24
feat(comparisons): SHA unifying, legacy-json comparison #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #521 +/- ##
==========================================
+ Coverage 79.58% 79.87% +0.28%
==========================================
Files 120 122 +2
Lines 12056 12013 -43
Branches 841 841
==========================================
Hits 9595 9595
+ Misses 2458 2415 -43
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a706bf3 to
595c3d1
Compare
595c3d1 to
db78639
Compare
|
Example output (Note that this output has been manually modified to demonstrate the diff, and is not based on an actual PR change):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the build comparison workflow to use consistent Node.js SHA references across base and head comparisons, and adds a new legacy-json comparator. The main branch will always use the latest nodejs/node SHA, while PRs will use the SHA that main most recently ran against, ensuring accurate comparisons.
Key changes:
- Consolidates comparison logic into the main generation workflow
- Adds SHA tracking via artifacts to ensure base/head use the same Node.js version
- Introduces a new
legacy-jsoncomparator to detect differences in JSON output - Simplifies the web comparator implementation
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/generate.yml |
Renamed workflow, added prepare job for SHA coordination, integrated comparison steps into generation job |
.github/workflows/leave-comment.yml |
New workflow to aggregate and post comparison results to PRs |
.github/workflows/compare-builds.yml |
Removed entire file as comparison logic moved to generate.yml |
scripts/compare-builds/utils.mjs |
New utility module exporting shared BASE and HEAD paths |
scripts/compare-builds/web.mjs |
Refactored to use shared utils and simplified comparison logic |
scripts/compare-builds/legacy-json.mjs |
New comparator for detecting differences in legacy JSON output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Bump @nodejs/web-infra |
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code itself looks good, would appreciate some more breakdown of functions, more documentation... We need to ensure DX and maintainability here are doable.
I added some documentation files I was already working on to this PR. It's a bit unrelated, so I can also move them to a follow-up. |
This PR does two things:
In preparation for 2), this PR changes our generation and comparison to use the same
nodejs/nodeSHA. Previously, the latest SHA was always used. Now,mainwill always use the latest SHA, and a PR will use the SHA thatmainmost recently ran off of.Adds a
legacy-jsoncomparatorNote:
Compare and Generate Docsappears to have failed, however, this is not the case. It works, see https://github.com/nodejs/doc-kit/actions/runs/20274890876?pr=521. It thinks it failed, as there is nomainSHA to compare against.