Repository navigation
refactor: reduce runner usage and scope CI to speed up - #3337
Conversation
- consolidate preflight and reusable workflow selection - scope costly platform and distributed tests to related inputs - use ARM startup and persistence smoke for routine changes - schedule weekly full validation and keep CI advisory - remove duplicate runner jobs and automatic retries
- select Asia/Singapore for the weekly workflow - retain the Monday 06:00 execution schedule - align CI documentation with the configured timezone
imbajin
left a comment
There was a problem hiding this comment.
[P2] Route relocated contract tests to the jobs that actually execute them
Reviewed commit: 35bb279.
The narrowed selector does not account for several contract scripts' actual owning jobs. Changing only test-stop-hugegraph-store.sh, test-check-jacoco-report.sh, or test-codecov-upload-config.sh selects neither struct nor store, so the Struct job in pd-store-ci.yml (lines 78–104) is skipped even though it contains their contract invocations.
A second example is test-riscv64-java-runtime.sh: the early RISC-V classification in ci-policy.py (lines 162–164) selects only riscv64, while the contract itself now runs in the RocksDB job in server-tests.yml (lines 76–81). The selected RISC-V workflow does not invoke this script. Consequently, changes to these contract tests can leave the changed tests unexecuted.
Please add exact contract-to-owning-suite mappings before the broad path rules, and regression cases that evaluate the selected inner job/step conditions, not just the reusable-workflow caller. For the RISC-V contract, select its Server/RocksDB owner in addition to any desired native coverage. test-tinkerpop-reports.sh does not have this issue because the selected RocksDB lane also invokes it.
Evidence: two independent source reviews plus execution of the exact-head selector reproduced the selected sets; this is an execution-routing gap, not a reported hosted test failure.
Sources:
hugegraph/.github/scripts/ci-policy.py
Lines 162 to 180 in 35bb279
hugegraph/.github/workflows/pd-store-ci.yml
Lines 78 to 104 in 35bb279
hugegraph/.github/workflows/server-tests.yml
Lines 76 to 81 in 35bb279
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3337 +/- ##
===========================================
Coverage 54.29% 54.29%
- Complexity 2616 6308 +3692
===========================================
Files 770 770
Lines 67952 67952
Branches 9213 9213
===========================================
+ Hits 36892 36893 +1
- Misses 27482 27483 +1
+ Partials 3578 3576 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- map contract scripts to their executing suites - verify caller inputs and inner job conditions - preserve consumer selection for runtime changes
|
Fixed the contract routing gap. Standalone Store-stop, JaCoCo and Codecov contract changes now select Struct; the RISC-V runtime contract also selects its Server/RocksDB owner. Contract-only inputs do not fan out to unrelated runtime consumers. Regression coverage now evaluates the actual caller inputs, inner job condition and executing step, and reproduces the failures with the previous selector. All policy/deployment tests pass locally; ASF CI will validate the updated head. |
- preserve the license context on the existing preflight - normalize full runtime versions before major checks - cover accepted versions and mismatched majors - document the required Infra migration step
- verify the legacy context from real Memory results - allocate a lightweight runner only while required - stop the bridge after Gitbox synchronizes protection - cover failures, skips and bridge retirement
|
Independent verification confirmed both concerns. Live master still requires check-license and Server memory tests, while Gitbox applies github configuration from the default branch. The migration now retains check-license on the existing preflight runner and temporarily supplies Server memory tests from actual selected Memory results, following the compatibility approach used in #3271 and #3277. This bridge requests one lightweight ubuntu-slim runner only while live protection requires the old context, repeats no tests, and skips without allocating a runner after synchronization. Infra intervention is unnecessary. The shared JNI smoke now normalizes a full expected JDK version to its major with Bash parameter expansion. Controlled native-wrapper cases cover 17, 17.0.20 and 21.0.1, with mismatched majors rejected. A real ARM/JDK 17.0.20.1 run with expected version 17.0.20 passed JNI, startup, read/write, dump and restart; expecting Java 21 correctly failed. Policy/deployment regressions and workflow lint passed. Latest-head ASF CI is still required before merging. |
Purpose of the PR
Documentation-only changes currently request nine CI runners, and ordinary Server changes also trigger expensive compatibility and distributed suites. Separate planning, Java-version and result jobs repeatedly re-enter the shared runner queue.
This change gives CI one entry point, reduces documentation changes to one preflight runner, and limits costly validation to related inputs, weekly coverage or explicit manual runs.
Main Changes
Asia/Singapore. Keep one branch-basedtest-setselector for manual mainline, distributed, specialist or full validation.check-licensename. A temporaryServer memory testsbridge verifies actual Memory results only while live protection requires it, and skips without a runner after Gitbox synchronizes the merged configuration.flowchart LR E[PR / push / weekly / manual] --> P[One preflight] P --> D[Documentation: finish] P --> T[Selected reusable tests]CI overview
One shared preflight selects tests from cumulative changes, with weekly full coverage and manual test-set selection. Runner counts shown apply to normal documentation-only test workflows, excluding the first-PR comment job.
Verifying these changes
Observed master-push performance
Snapshot: 2026-10-15 (Asia/Taipei). The baseline is the three days before each CI change; the post-change sample includes all observed successful master pushes after Server #3337 and Toolchain #816.
Values are per-commit averages, before → after. All push workflows for the same commit are grouped together; failed or cancelled groups are excluded.
Runner execution sums the actual job durations across parallel runners. First-start wait runs from the earliest workflow creation to the first allocated runner starting. End-to-end completion ends when the last runner job finishes, including subsequent queue and dependency waits; it excludes external Codecov processing. The historical jobs API does not expose each job's enqueue time, so first-start wait is not average per-job queue time.
Observed runner execution decreased by approximately 94% for Server and 91% for Toolchain. Toolchain has only one post-change master sample: its entry and smoke run used 10.1 runner-minutes, but waited 149.6 minutes before the entry and another 82.5 minutes before smoke. Its longer completion time therefore does not indicate longer test execution.
These are observations across different commits and shared-queue conditions, not a controlled benchmark or evidence of a lasting queue-time improvement.