fix(github): query check runs for /retest - #2876
Conversation
a09e1a4 to
d17dddf
Compare
Paco Review 🔍This PR implements the previously stubbed Review difficulty: 3/5 (Moderate) — The core change is a single, moderately complex method with two distinct API code paths plus a sizeable new e2e test, giving it real but bounded blast radius. 1 new inline comment(s) found. Reviewed commit: a09e1a4 |
d17dddf to
000b4b3
Compare
6388699 to
626bfd1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2876 +/- ##
==========================================
+ Coverage 68.23% 68.34% +0.10%
==========================================
Files 197 197
Lines 16680 16722 +42
==========================================
+ Hits 11382 11429 +47
+ Misses 4432 4429 -3
+ Partials 866 864 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| status = cr.GetConclusion() | ||
| } | ||
| key := cr.GetName() + "\x00" + status | ||
| if _, ok := seen[key]; ok { |
There was a problem hiding this comment.
what's the purpose of seen here? every check-run is unique
| }, | ||
| }, | ||
| { | ||
| name: "check runs deduplication", |
There was a problem hiding this comment.
this will never be the case, right? because we have unique check runs always
626bfd1 to
d7bac94
Compare
d7bac94 to
ada6252
Compare
|
I don't know what's going on with go-testing job timing out super long these days |
Implement GetCommitStatuses for the GitHub provider so /retest only re-runs failed pipelines when PipelineRuns have been pruned. The stub returned nil, causing filterSuccessfulTemplates to skip all pipelines through. Now queries the Check Runs API in GitHub App mode and the Commit Statuses API in webhook mode, with deduplication and retry-with-backoff matching the write path. Signed-off-by: Akshay Pant <akpant@redhat.com> Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
ada6252 to
bfb7ea4
Compare
📝 Description of the Change
Implement GetCommitStatuses for the GitHub provider so /retest only re-runs failed pipelines when PipelineRuns have been pruned.
The stub returned nil, causing filterSuccessfulTemplates to skip all pipelines through. Now queries the Check Runs API in GitHub App mode and the Commit Statuses API in PAT/webhook mode, with deduplication and retry-with-backoff matching the write path.
🔗 Linked GitHub Issue
Partially fixes #2580
🧪 Testing Strategy
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
Important
Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Claude noreply@anthropic.com
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.