feat: add metadata JSON readiness output#1113
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1113 +/- ##
==========================================
+ Coverage 62.01% 62.43% +0.42%
==========================================
Files 46 48 +2
Lines 7505 7882 +377
==========================================
+ Hits 4654 4921 +267
- Misses 2851 2961 +110 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Expose stable PR readiness reason codes from PRChecker and add git node metadata --json for machine-readable metadata readiness results. The JSON output includes readiness classification, reserved exit-code categories, generated metadata, unique reason codes, and detailed reasons. Signed-off-by: Filip Skokan <panva.ip@gmail.com>
7949e79 to
d416c6a
Compare
Can we change that to only capture wait time? E.g. missing TSC approval should be a hard error, no amount of time is going to help with that, and not erroring would be confusing IMO. Missing approval would mean that someone has added the CQ label on a 0-approval PR, again that seems like an error |
|
@aduh95 makes sense, i'll update the utils and then the node PR |
aduh95
left a comment
There was a problem hiding this comment.
LGTM, we might also want to add PENDING_CI as deferable, so we can clean up https://github.com/nodejs/node/blob/db7cc5b40018e685f9f409b382884f84dec71c65/tools/actions/commit-queue.sh#L42-L46
|
I'm not sold on pending ci. With how flaky ci can get i think noone should be adding cq to a PR with an in progress ci. As such the cleanup you speak of would be imho better suited to go in the other direction. |
|
That's fine by me. I think the idea is to get the CQ to notify you if the CI failed |
This adds structured readiness output to
git node metadata --jsonso automation can consume PR landability checks without matching human-readable CLI output.The JSON output includes:
readyreadinessexitCodemetadatareasonCodesreasonsIt also adds stable reason codes from
PRCheckerfor the existing readiness checks.Exit Codes
git node metadata --jsonuses category-level exit codes:0: PR is ready20: PR is not ready for deferrable metadata reasons40: PR is not ready for a hard or mixed reason1: unexpected tool/runtime failure20-29are reserved for future deferrable metadata states, and40-49are reserved for future hard metadata failure states.The current deferrable set is scoped to the lightweight commit-queue selector use case from nodejs/node#64343:
missing-approvalmissing-tsc-approvalwait-time