ci: pr-test-summary job shows red when the GitHub API returns persistent 5xx errors
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with ci/utils/pr_test_summary.py, especially main() and the retry wrapper for GitHub API calls, then read the PR test summary step in pr.yaml. Confirm how the final exception from a persistent 5xx reaches the process exit. Done means that only HTTP and network errors from the API are downgraded to a logged warning with exit 0, while parsing or other script errors still fail the job.
Written by the indexing model from the issue text.
Description
Problem
The PR test summary (non-blocking) job in pr.yaml sometimes fails with a red check on PRs, for example:
Traceback (most recent call last):
File "/home/runner/work/cuopt/cuopt/ci/utils/pr_test_summary.py", line 325, in <module>
main()
...
urllib.error.HTTPError: HTTP Error 502: Bad Gateway
This was noticed in the discussion on #2241 (run https://github.com/NVIDIA/cuopt/actions/runs/41135602235). It was first mistaken for leftover RAPIDS CI telemetry, but it comes from this repo's own ci/utils/pr_test_summary.py.
Why it fails
pr_test_summary.py makes several GitHub API calls: it lists the run's jobs, downloads logs of failed jobs, and creates or updates the PR comment.
- Transient errors (429, 5xx, network errors) are retried up to 4 attempts with
2**attemptsecond backoff (#2204). That is roughly 14 seconds in total. If the API keeps returning errors for longer, the last exception is re-raised. - The script then exits non-zero, and the
run: python3 ci/utils/pr_test_summary.pystep has nocontinue-on-error. #1696 removed it and instead excluded the job from thepr-buildermerge gate (andcheckshasignored_pr_jobs: "pr-test-summary"). - The job is therefore not a merge gate, but it still shows as a failed check on the PR. That is confusing for contributors and reviewers, who may take it for a real test failure, and the summary comment is not posted.
Proposal
Make the summary best-effort so it cannot show red because of an API error:
- Catch persistent API errors at the end of
main(), print a warning to the job log, and exit 0. - Or set
continue-on-error: trueon the step.
Real script bugs (for example parsing errors) should still fail the job, so only the network and HTTP error classes would be swallowed.
Related: #2204, #1696, #2241.
- Dominant language
- Cuda
- Stars
- 1.1k
- Forks
- 249
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 124
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuopt
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
NVIDIA/cuopt#2255 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
[BUG] Out-of-bounds read when solving a DataModel with lower/upper constraint boundsPossibly taken @ramakrishnap-nv claimed this today. Openbug
Difficulty 3/5 Half a day Newbie friendliness 55/100
Maintainers usually reply within 1 day
Similar issues
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
vfarcic/dot-agent-deck#2079 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
leanprover-community/lean4game#589 ·
Maintainers usually reply within 2 days
-
Bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RazorConsole/RazorConsole#447 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kyma-project/api-gateway#2933 ·
Maintainers usually reply within 2 days
-
Dependabot compat-checks fails on every PRPossibly taken @dogancanbakir claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
HappyHackingSpace/witness#120 ·
Maintainers usually reply within 1 day