Skip to content

ci: parallelize terminal and online core checks - #902

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
zuyu:codex/parallel-ci-tests
Sep 28, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
zuyu:codex/parallel-ci-tests

Conversation

@zuyu

@zuyu zuyu commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

A recent successful run took 38m21s: macOS terminal checks waited about eight minutes for a runner, then spent 29m20s in three sequential builds. The online core lane also built and tested runtime, turn-core, and services sequentially.

  • Run default-reader, dev-tty-reader, and reflow checks as separate jobs on Linux and macOS. Preserve feature isolation and the existing required terminal check names through aggregate gates.
  • Split online core into runtime, turn-core, and services jobs with separate MatrixOne/Memoria stacks and database suffixes. Keep one nextest process at a time against each database and retain the existing core/integration required checks.
  • Populate the terminal dependency cache once per OS on pushes and enable saving the macOS workspace-coordination cache.

The speedup still needs measurement on hosted runners; extra macOS jobs may increase queueing. This change does not introduce a workspace-wide compile barrier or alter test selections, features, exclusions, or deadlines.

Related issue

Requested CI latency improvement; no linked issue.

Change type

  • Refactor or performance improvement
  • Test
  • Build, CI, or maintenance
  • Documentation

User and compatibility impact

Existing required check names remain available. make test-online and ASTRA_ONLINE_LANE=core retain their complete-suite behavior. New core-runtime, core-turn-core, and core-services values select individual core groups. Both terminal gates aggregate the full OS/segment matrix; the core online gate aggregates all selected online jobs.

Architecture and complexity delta

N/A for runtime architecture. The workflow extends the existing Makefile dispatch rather than introducing another test runner. Existing scope classification, serial database limits, cancellation behavior, and fork-safe dependency setup are retained.

Verification

  • go run github.com/rhysd/actionlint/cmd/[email protected]: passed.
  • python3 -B -m unittest discover -s scripts/ci -p 'test_*.py': passed (101 tests).
  • python3 -B -m unittest discover -s scripts/ci -p 'test_ci_*.py': all 37 tests passed, including the additional database-reset isolation check.
  • python3 -B scripts/ci/validate_repository.py: passed with Python 3.13 on PATH and CDPATH unset.
  • git diff --check: passed.
  • Public entrypoint exercised: the actual make test-online recipes, with Cargo and MySQL calls recorded in disposable offline fixtures. Shard arguments exactly cover the combined core lane; default/all still include integration.
  • Unhappy paths: failed package groups, continued combined-core coverage after a failure, unknown lanes before database reset, failed/cancelled/missing required shards, and legitimate unaffected skips.
  • Database verification: fixtures verify exact isolated database resets and serial test flags. No schema, query, or transaction changes; live MatrixOne execution remains for the hosted CI jobs.

Final checklist

  • Tests updated at the CI dispatch and gate layer.
  • Testing guide updated for new lane selectors and aggregate gates.
  • Diff checked for sensitive data and generated files.
  • Conventional Commit title.

@zuyu
zuyu requested a review from XuPeng-SH as a code owner September 28, 2026 06:41

@XuPeng-SH XuPeng-SH 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.

Deep review of d764479. No actionable findings.

Reviewed the full workflow/Makefile diff, shared Rust setup and cache configuration, scope classifier, nextest limits, and the new dispatch/gate tests.

  • The three core shards preserve the existing package selections, features, filters and strict-online-ci profile. Default/all and combined core retain their previous coverage; failures propagate while combined core continues through the remaining groups. Invalid lane names fail before database reset or Cargo execution.
  • Each hosted online job starts its own dependency stack, and core database names are distinct. The existing -j 1 behavior remains in each database lane.
  • Terminal reader feature variants run on separate runners, and reflow still builds and tests the real CLI binary. Existing required check names are retained through aggregate jobs. I checked dependency conditions, legitimate scope skips, failure handling and cancellation-aware scheduling.
  • Cache writes are restricted to push runs, with one terminal writer per OS. No workspace-wide compilation barrier was introduced.

Validation: 32 focused Python tests passed locally (9 parallelism/dispatch, 21 scope, 2 terminal coverage), plus git diff --check; the worktree is clean. The exact head's Static Checks and Test Suite workflows passed. All 25 Test Suite jobs succeeded, including all six terminal segments and all four online lanes. Logs confirm 76 runtime, 11 turn-core and 469 services online tests passed; both macOS reader variants ran 15 tests each, and the macOS reflow scenarios passed.

This hosted Test Suite run completed in 21m08s: https://github.com/matrixorigin/Astra/actions/runs/36387754322. That is useful initial evidence, not a controlled before/after benchmark. macOS scheduling and additional runner usage remain the main performance tradeoff; sustained latency and runner-minute cost should be assessed across subsequent runs. Rust/database tests were verified through hosted CI rather than rerun locally.

@mergify

mergify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@mergify

mergify Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 GitHub permissions prevent queueing

Details

The PR cannot be merged because of GitHub restrictions. You must set up an update_bot_account on your queue_rules to automatically queue and merge PRs created by a GitHub App, or modify the GitHub Actions workflows. Setting it is not an alternative for a pull request from a fork: Mergify does not rebase a fork's branch on behalf of a user, so a queue that has to keep taking those needs to run its checks on a draft pull request instead.

@XuPeng-SH
XuPeng-SH merged commit b364d26 into matrixorigin:main Sep 28, 2026
35 of 36 checks passed
@zuyu
zuyu deleted the codex/parallel-ci-tests branch September 28, 2026 07:41
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