Skip to content

feat(ci): support optional & ordered actions with jobs/prs - #3271

Merged
imbajin merged 8 commits into
apache:masterfrom
hugegraph:chore/ci-concurrency-20261005
Oct 6, 2026
Merged

imbajin merged 8 commits into
apache:masterfrom
hugegraph:chore/ci-concurrency-20261005

Conversation

@imbajin

@imbajin imbajin commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Select affected tests and run them before compatibility and security work, while sharing image preparation.

HugeGraph Server CI before and after

Before After
Independent workflows trigger broad suites and compete for runners. Select affected modules and consumers; Server changes retain Server, PD/Store/HStore and Cluster tests. Compatibility and security follow the core gate.
Four image builds repeat Maven preparation; Compose smoke uses published images. Share the build stage and validate current PR images with startup, health and authentication checks. Keep the existing Hubble smoke.
Separate test results and superseded runs require manual coordination. A strict module gate requires every selected check to succeed; newer PR heads cancel superseded runs. License checks remain independent.

- Keep the newest run for each workflow and PR
- Verify source freshness before automatic retries
- Test retry decisions and document the CI policy
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.88%. Comparing base (8fd9841) to head (2a37706).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3271      +/-   ##
============================================
- Coverage     41.69%   40.88%   -0.82%     
+ Complexity     7365     7187     -178     
============================================
  Files           794      785       -9     
  Lines         69291    68158    -1133     
  Branches       9288     9166     -122     
============================================
- Hits          28891    27866    -1025     
+ Misses        37113    37051      -62     
+ Partials       3287     3241      -46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bitflicker64

Copy link
Copy Markdown
Contributor

Some numbers from the hugegraph org mirrors, in case they help size this.

I replayed every completed push and PR run in hugegraph/hugegraph and hugegraph/hugegraph-toolchain from 2026-10-03 13:43 to 2026-10-04 20:44 UTC (1076 runs; Rerun CI, Dependency Submission, labeler and stale left out), applying this PR's rule: a PR run is cancelled when a newer run of the same workflow on the same PR starts before it finishes.

Repo Runs this would cancel Start-to-finish time saved
hugegraph 393 / 565 (70%) 281 h / 592 h (47%)
hugegraph-toolchain 83 / 511 (16%) 39 h / 432 h (9%)
Both 476 / 1076 (44%) 320 h / 1024 h (31%)

Caveats: it was a busy window (gh run list caps at 1000 runs per repo, so it only reaches back about 31 hours), and the hours run from run start to finish, so they include time spent waiting for a runner and overstate billed minutes. The run count is the firmer number.

A snapshot from the evening of 2026-10-04 matches: about 11 jobs running and 141 runs queued across the org, and 25 of 137 live runs were already superseded by a newer run on the same branch.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: no. Summary: The per-PR concurrency groups cancel only superseded pull_request runs (push, schedule and manual runs keep a unique run_id group), and the retry checker fails closed: it re-verifies the run attempt and the open PR or branch head before and after the delay, loaded from the trusted default-branch commit. No actionable findings at 91fd925. Evidence: read the full diff and the head versions of rerun-ci.yml and server-ci.yml; ran python3 -m unittest discover -s .github/scripts -p 'test_check_rerun.py' locally (14 tests OK) and confirmed the same 14 tests ran in the Server CI wait-storage-shell-test job; checked with gh api that fork PR runs carry an empty pull_requests list and that the commits/{sha}/pulls fallback resolves them (#3269); all eight workflow runs at this head succeeded, and the only red check, codecov/project, is not required and reports a 0.03% drift on a PR with no Java changes.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Blocking: no. Summary: Fork PR retries can be skipped when GitHub returns no PR association, and stale reruns can cancel current-head CI. Evidence: exact-head run/commit association responses, the workflow group at .github/workflows/server-ci.yml:11-14, and documented Actions rerun/concurrency semantics; all ordinary workflows passed, while codecov/project failed as a non-blocking quality signal.

Comment thread .github/scripts/check-rerun.py Outdated
Comment thread .github/workflows/server-ci.yml
- select related Linux tests and verify reusable results
- defer compatibility and security checks until core tests pass
- isolate retries and migrate required check names
- shorten the contribution guide and document CI policy
@imbajin imbajin changed the title chore(ci): cancel superseded PR runs chore(ci): run affected tests before optional jobs Oct 5, 2026
- merge the latest Server master and preserve its fixes
- retain strict test reports and affected module gates
- keep reruns isolated in the central workflow
- align contribution requirements with Java 17
- preserve cancellation of superseded PR checks
- separate reruns from current-head license checks
- retain independent non-PR execution groups

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: yes. Score: 1.5/10. Summary: The gate, the legacy aliases and the retry freshness checks fail closed as intended, but the selector skips existing tests for some server and docker paths, receipt reuse scans only 30 repository-wide runs, and the 3rd-party check becomes part of the required gate. Evidence: read the full diff against master and the reusable workflows it calls; ran the 39 tests in .github/scripts (OK), ran select() on concrete paths (root and server poms, hugegraph-rocksdb, docker/, store dist, workflow files, docs), YAML and Python syntax checks, and read Actions run history and this PR's checks through the API. CI at a23281d is still running; check-license passes.

Comment thread .github/scripts/ci-policy.py
Comment thread .github/scripts/ci-policy.py
Comment thread .github/scripts/ci-policy.py Outdated
Comment thread .github/workflows/server-ci.yml
Comment thread .github/scripts/ci-policy.py Outdated
- cover Server dependencies and deployment contracts
- verify optional proofs across documentation updates
- run post-gate checks after intentionally skipped suites
- document migration limits and pending runtime validation
- keep third-party review outside the required gate
- share four image builds and verify their runtime inputs
- check service health, readiness and authentication
- retain Hubble smoke and document deployment coverage
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Blocking: no. Summary: The CI receipt and retry paths each have a validation gap that can waste test capacity or exhaust the retry runner. Evidence: the local/API fingerprint comparison and the artifact download path in the exact-head scripts.

Comment thread .github/scripts/ci-policy.py Outdated
Comment thread .github/scripts/check-rerun.py Outdated

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: yes. Summary: PD and Store distribution files that the PD and Store images ship (conf/application.yml, bin/start-.sh) no longer select the Docker suite, so the new image startup, health and PD auth checks never run for them, although docs/ci.md says distribution changes include Docker and master ran Docker Build CI for hugegraph-pd/** and hugegraph-store/**. Evidence: at 77148c7, select("server", ["hugegraph-pd/hg-pd-dist/src/assembly/static/conf/application.yml"]) and the same for hg-store-dist conf/application.yml and bin/start-hugegraph-pd.sh return suites [cluster, pd_store] only, while hugegraph-server/hugegraph-dist/src/assembly/static/conf/rest-server.properties returns [cluster, docker, pd_store, server_memory, server_rocksdb]; hugegraph-pd/Dockerfile:63 copies the assembled dist and docker-entrypoint.sh:146 runs bin/start-hugegraph-pd.sh; python3 -m unittest discover -s .github/scripts -p 'test_.py' passes (64 tests).

Comment thread .github/scripts/ci-policy.py
- remove untrusted result reuse and PR artifact retries
- cover PD and Store distribution image consumers
- reject stale or incomplete pull request inputs
- retain strict current push retries and document limits
Keep the existing analysis key across reusable callers
Keep per-language scan categories aligned with master
Quote staged Maven settings paths for workflow validation
@imbajin imbajin changed the title chore(ci): run affected tests before optional jobs feat(ci): support optional & ordered actions with jobs/prs Oct 6, 2026
@imbajin
imbajin merged commit 8beb78b into apache:master Oct 6, 2026
51 of 63 checks passed
@imbajin
imbajin deleted the chore/ci-concurrency-20261005 branch October 6, 2026 09:53
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.

4 participants