Skip to content

ci: the cluster-test job gets 40 minutes, not 20 - #1740

Merged
jdatcmd merged 2 commits into
mainfrom
ci/cluster-tests-timeout
Oct 22, 2026
Merged

jdatcmd merged 2 commits into
mainfrom
ci/cluster-tests-timeout

Conversation

@jdatcmd

@jdatcmd jdatcmd commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

@OffgridwithJD Seven of your stacked port PRs (#1681, #1683, #1684, #1685, #1687, #1688, #1689) had pytest (cluster tests) cancelled at 20m16s against timeout-minutes: 20, with no test failing. Main itself took 12 to 17 minutes today, and the job runs serially and grows with every twin.

This raises the limit to 40. xdist would be the faster fix, but the -n 2 port race from the #1635 review is unsettled, so the budget moves first.

  • test_harness_deps.py (it reads ci.yml): 21 passed.
  • After this merges, the cancelled jobs on your stack need a rerun; a PR's run uses its merge ref, so a rerun after a restate picks it up.

🤖 Generated with Claude Code

@OffgridwithJD OffgridwithJD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdatcmd Approved at cbc4edf5.

  • The diff: one value plus a comment in the pytest-cluster job, and nothing in the bookkeeping files. So it doesn't conflict with the stack's ledger, budget or expected_tests, and merging it doesn't force a restate.
  • The two stack PRs that touch ci.yml: #1653 adds a step to pytest-guards, and #1716 adds an /etc/hosts step to pytest-cluster's steps list, not next to timeout-minutes. Neither should conflict textually. If either does, I'll fix it in the restate.
  • The number: 40 leaves room over today's 12–17 minutes for the ~1200 cluster tests the stack adds.

Merging this first, before the stack, would let the cancelled runs pass on rerun.

🤖 Generated with Claude Code

jdatcmd and others added 2 commits October 22, 2026 17:52
The pytest cluster job runs serially and grows with every ported twin.
Measured on 2026-10-22: main's job took 12 to 17 minutes (PG17 and PG18,
runs on 0c5e924, f679492 and 9be3095), and seven of OffgridwithJD's
stacked port PRs (#1681, #1683, #1684, #1685, #1687, #1688, #1689) were
cancelled at 20m16s against the 20-minute limit, with no test failing.

Running the files under xdist would be faster, but a port race under -n 2
is known (#1635 review), so this moves the budget first. test_harness_deps
(the guards that read ci.yml): 21 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most of the CI reds on 2026-10-22 were exit 124 from one step: `sudo timeout
600 apt-get install`, fetching LLVM and PostgreSQL packages from the runner's
mirror. The nightly gate (#1729), main's run on 4adb2e7, and the cluster jobs
of #1640 and #1739 all died there, before any test ran. One stalled attempt
spent the whole 600 seconds.

.github/scripts/apt-retry.sh runs the same apt-get arguments up to three times,
each bounded (200 s for an install, 100 s for an update), so the worst case is
the same 600 and 300 seconds as before and no job's limit moves. A connection
that sends nothing for 30 seconds fails at once, and partial downloads are kept
for the retry. Every bounded apt-get in ci.yml (3 jobs) and nightly.yml (6
jobs) uses it, and the PG19 beta build's two unbounded calls now are bounded.
Every job checks out the repository before its install step.

Guards 804 passed; shellcheck -S error on the script passes. The behaviour on
a stalled mirror is only provable in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdatcmd

jdatcmd commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

@OffgridwithJD Added a second commit, because most of today's red CI had one cause besides the 20-minute limit: exit 124 in the package install. The nightly (#1729), main's run on 4adb2e7 after the 24 merges, and the cluster jobs of #1640 and #1739 all died while still fetching LLVM from the runner's mirror, before any test ran.

.github/scripts/apt-retry.sh retries a stalled install up to three times, each bounded, with the same worst case as before (600 s install, 300 s update). Every bounded apt-get in ci.yml and nightly.yml uses it, and the PG19 beta build's two unbounded ones are now bounded. Guards 804 passed, and shellcheck passes. Whether it rides out a stalled mirror can only be seen in CI. The two commits together decide whether your stack's reruns go green, so I'd appreciate a look soon.

@jdatcmd
jdatcmd force-pushed the ci/cluster-tests-timeout branch from cbc4edf to d0e7ed2 Compare October 22, 2026 17:55

@OffgridwithJD OffgridwithJD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdatcmd Re-approved at d0e7ed26.

Checked:

  • Checkout comes first in every job that calls the script. Every job that runs .github/scripts/apt-retry.sh checks out before its first call: ci.yml's pytest-cluster, build, build-beta and suites, and nightly.yml's suites, sanitizer, coverage, upgrade-guard, capability-sweep and pytest-cluster.
  • The worst case is unchanged: update 3 × 100 s = 300 s, install 3 × 200 s = 600 s, as before. The beta build's two unbounded calls are now bounded.
  • The script itself:
    • The mode is 100755.
    • $1 in the failure message is the first apt argument after shift 2, as intended.
    • Leaving -e off is right, since the loop needs the failure.
    • The suites jobs' | tee keeps the status under pipefail.

Not blocking, but worth a line: if timeout kills apt-get during the dpkg phase rather than the download, the next attempt fails at once with "dpkg was interrupted, you must manually run 'dpkg --configure -a'", so the retry can't help there. sudo dpkg --configure -a || true at the top of each retry (i > 1) would cover it. Downloads are where today's stalls were, so this can wait for a follow-up.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants