Fix check-test-pr blocking on non-test checks#68
Closed
jnasbyupgrade wants to merge 1 commit into
Closed
Conversation
check-test-pr inspected EVERY check run on the paired pgxntool-test PR's head SHA and failed if any had a conclusion outside success/skipped/neutral — including unrelated bots like claude-review or CodeRabbit, not just the actual test matrix. A claude-review failure (e.g. pgxntool-test#33) transitively failed check-test-pr even when every test job passed (confirmed on pgxntool PR Postgres-Extensions#61 against pgxntool-test PR Postgres-Extensions#31). Filter to only check runs belonging to pgxntool-test's own ci.yml workflow run for that SHA, using each check run's check_suite.id to identify which workflow produced it (via actions.listWorkflowRuns scoped to workflow_id: ci.yml). This is done rather than matching job/ check name substrings ("test / ", "Resolve pgxntool branch") so that a future rename or added ci.yml job needs no matching update here, while any other workflow (review bots, present or future) is excluded regardless of its name. Requires adding `actions: read` to the job's permissions for the workflow-runs lookup. Fixes Postgres-Extensions#67 Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Author
|
We do NOT want this change. See comment on the issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
check-test-prinspects every check run on the paired pgxntool-testPR's head SHA and fails if any conclusion is outside
success/skipped/neutral— including unrelated bots likeclaude-reviewor CodeRabbit, not just the actualtestmatrix jobs.Confirmed concretely: pgxntool PR #61's
check-test-prfailed withpgxntool-test PR #31 CI failed for SHA 56e6b14: claude-review (failure)while everytest / PostgreSQL <version>job on that PRwas green (root cause of that specific failure: pgxntool-test#33).
Fix
Filter to only check runs belonging to pgxntool-test's own
ci.ymlworkflow run for that SHA, using each check run's
check_suite.idtoidentify which workflow produced it (via
actions.listWorkflowRunsscoped to
workflow_id: ci.yml). Chose workflow-name filtering overmatching job/check name substrings (
test /,Resolve pgxntool branch) so a future rename or addedci.ymljob needs no matchingupdate here, while any other workflow — review bots present or future
— stays excluded regardless of its name. Requires adding
actions: readto the job's permissions for the workflow-runs lookup.Note
This is a workflow-only change with no matching pgxntool-test PR by
design (per this project's convention, a maintainer needs to apply
commit-with-no-testsforcheck-test-prto pass — not done here).Fixes #67