Skip to content

ci(nightly): run the pytest cluster tests on aarch64 too (#2038, part 1) - #2041

Merged
jdatcmd merged 2 commits into
mainfrom
ci/2038-aarch64-pytest
Nov 7, 2026
Merged

jdatcmd merged 2 commits into
mainfrom
ci/2038-aarch64-pytest

Conversation

@OffgridwithJD

@OffgridwithJD OffgridwithJD commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Part 1 of #2038.

What changes

The nightly suites job runs PG 18 on aarch64 as well as x86_64. Its own comment gives the reason: a missing barrier in concurrent code is invisible under x86_64's stronger store ordering, and a defect on aarch64. Nightly pytest-cluster ran on x86_64 only, so on aarch64 only the shell suites executed. That is one of the three things keeping the shell suites from being retired.

  • nightly.yml: pytest-cluster takes the suites job's legs as an include: matrix, adds { pg: '18', runner: ubuntu-24.04-arm }, and puts the architecture in the job name, as suites does. The apt cache keys already carry runner.arch. Every pinned wheel in requirements-test.txt (pytest, xdist, psycopg[binary], pyarrow, duckdb) is published for manylinux aarch64.
  • test_pytest_runs_where_the_suites_run.py (new guard) derives the property: in ci.yml and nightly.yml, every (major, architecture) the suites job runs, pytest-cluster runs too. It reads include: entries, pg:/runner: lists, and a literal runs-on:. A workflow it cannot compare is named (unreadable, no suites legs, or no pytest-cluster job), so an empty answer means every leg is covered.

Evidence

  • Red, before the workflow change: pytest-cluster runs every (major, architecture) the suites job runs: got 'nightly.yml:18/aarch64' want 'none'.
  • Green after it: 2 passed. The reader arm also proves each matrix form and each "cannot compare" case on fixtures.
  • Push gate: guards 865 passed; collected 5347, matching cluster_tests; ledger census 4894 agrees; gate rc 0; harness_selftest passed.

Not proven here

The aarch64 leg itself runs only in the nightly, so the first nightly after merge is its first run. The x86_64 legs are unchanged. If the arm run needs more than the 40-minute limit, I'll follow up with a per-leg timeout.

Registries

🤖 Generated with Claude Code

jdatcmd and others added 2 commits November 7, 2026 16:58
The nightly suites job runs PG 18 on aarch64 as well as x86_64, because a
missing barrier in concurrent code is invisible under x86_64's stronger
store ordering. pytest-cluster ran x86_64 only, so on aarch64 only the
shell suites executed, and they could not be retired.

pytest-cluster now takes the suites job's legs as an include matrix, with
{ pg: '18', runner: ubuntu-24.04-arm } and the architecture in its name.

test_pytest_runs_where_the_suites_run.py derives the property: in ci.yml
and nightly.yml, every (major, architecture) the suites job runs,
pytest-cluster runs too. Before the leg was added it failed with
"got 'nightly.yml:18/aarch64' want 'none'". guard_tests 863 -> 865.

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

@jdatcmd jdatcmd 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.

Reviewed at ee0ade5 by running the guard set, the new guard with the workflow change reverted, a trial merge with main, and the CI query.

Blocking

The branch conflicts with main, so no CI has run. #2036 merged as 1bc280a and took the same registry lines.

$ git merge-tree --write-tree --name-only origin/main ee0ade53
CONFLICT (content): Merge conflict in test/pytest/TESTS.md
CONFLICT (content): Merge conflict in test/pytest/expected_tests.txt
$ gh api repos/commandprompt/pgcolumnar/pulls/2041 -q '.mergeable, .mergeable_state'
false
dirty
$ gh pr checks 2041
no checks reported on the 'ci/2038-aarch64-pytest' branch

To fix, merge main into the branch and:

  1. In test/pytest/TESTS.md, renumber this section and its table-of-contents entry to 357. Main's §356 is test_extension_upgrade.py.
  2. In test/pytest/expected_tests.txt, set guard_tests 868 and keep main's cluster_tests 5350. I resolved the conflict in a trial merge and collected the NO_CLUSTER files: 868 tests collected. The new guard passes there too: 2 passed.

What I verified at the head

  • The guard set (NO_CLUSTER files, --pgc-expect-tests 865) passes: 865 passed, accounting: 2309 pass + 0 fail + 0 unrun.
  • Red: with only the nightly.yml hunk reverted, the property arm fails for the reason in #2038:
    AssertionError: pytest-cluster runs every (major, architecture) the suites job runs: got 'nightly.yml:18/aarch64' want 'none' (1 failed, 1 passed).
  • PyYAML parses the new pytest-cluster matrix, and it equals the suites matrix exactly (True).
  • Every pin in requirements-test.txt has a cp312 manylinux aarch64 wheel on PyPI, or is pure Python (pytest, pytest-xdist).
  • The apt packages are the same ones the suites aarch64 leg already installs. That leg passed in last night's run, 42373475655.
  • Nothing else uses the old job name pytest (cluster tests, PG N). The reporter's needs: uses the job id, which is unchanged.
  • census-commits --against origin/main: 0 commits change the tsv, 0 refused, so no trailer is needed.
  • The CHANGELOG, TESTS.md text and the test names agree with the code.

Not blocking

  • Timing: in run 42373475655, x86_64 pytest (cluster tests, PG 18) took 31m09s of its 40-minute limit. The aarch64 suites leg was faster than x86_64 that night (12m03s against 14m18s), so the arm pytest leg may fit. That is unverified until the first nightly, as the PR says.
  • _arch treats any runner label that contains arm as aarch64. ubuntu-24.04-arm is the only such label today. A narrower test (an -arm suffix) would not misread a future label such as warm-pool.

🤖 Generated with Claude Code

@jdatcmd jdatcmd 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.

Approving at 8a8ba505. My one blocker on ee0ade53 was the conflict with main after #2036. It's resolved: the branch is now two commits on main 1bc280a1, this PR's TESTS.md section is 357 (main's test_extension_upgrade.py keeps 356), and guard_tests is 868 with cluster_tests 5350, the values my review measured.

Re-checked on this head:

  • The nightly.yml matrix carries the five legs: PG 15–18 on x86_64, plus PG 18 on ubuntu-24.04-arm. It's the change my review verified.
  • test_pytest_runs_where_the_suites_run.py: 2 passed, 9 pass + 0 fail + 0 unrun.

Nits, still non-blocking:

  • _arch treats any label containing arm as aarch64. Matching an -arm suffix would be stricter.
  • Whether the aarch64 leg fits its 40-minute limit only shows on the first nightly.

Merge order: my #2039 also uses TESTS.md section 357 at the moment, so whichever of us lands second renumbers.

🤖 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