Skip to content

chore(ci): optimize rerun workflow and add macOS RocksDB coverage#3010

Open
contrueCT wants to merge 6 commits intoapache:masterfrom
contrueCT:task/optimize-rerun-ci
Open

chore(ci): optimize rerun workflow and add macOS RocksDB coverage#3010
contrueCT wants to merge 6 commits intoapache:masterfrom
contrueCT:task/optimize-rerun-ci

Conversation

@contrueCT
Copy link
Copy Markdown
Contributor

@contrueCT contrueCT commented Apr 26, 2026

Purpose of the PR

Optimize the Rerun CI workflow and add macOS coverage for the single-node RocksDB server path.

The rerun workflow now only starts the rerun decision job when an upstream CI workflow actually fails, avoiding unnecessary skipped rerun workflow records after successful or non-failure CI completions.

This PR also adds macOS RocksDB server checks in parallel with the existing Linux Server CI, covering both Intel and Apple Silicon runners for compile, core test, server startup, and API test coverage.

Main Changes

  • Optimize .github/workflows/rerun-ci.yml
    • Add a job-level condition to decide-rerun-action so it only runs when github.event.workflow_run.conclusion == 'failure'
    • Remove redundant non-failure shell handling from the decision script
    • Keep the existing supported events, retry limit, delay, permissions, and gh run rerun --failed behavior unchanged
  • Add macOS RocksDB coverage to .github/workflows/server-ci.yml
    • Add build-server-macos-rocksdb for macos-15-intel and macos-15
    • Run compile, RocksDB core tests, and RocksDB API tests on macOS
  • Improve macOS compatibility in CI helper scripts
    • Make start-server.sh avoid Bash 4 associative arrays and use portable backend serializer selection
    • Add macOS-compatible sed -i handling
    • Make run-api-test.sh and build-report.sh resolve paths from the script/repo root and use curl/wget fallback downloads
  • Stabilize Apple Silicon RocksDB API tests
    • Pass scoped SERVER_JAVA_OPTIONS for macos-15 (-Xms512m -Xmx2g) through the existing server startup -j option path
    • Keep the JaCoCo javaagent behavior intact

Verifying these changes

  • Ran git diff --check
  • Ran bash -n for the changed shell scripts
  • Verified GitHub Actions on this PR:
    • build-server-macos-rocksdb (macos-15-intel) passed
    • build-server-macos-rocksdb (macos-15, -Xms512m -Xmx2g) passed
    • Existing Linux Server CI jobs for memory, rocksdb, and hbase passed
    • Commons, PD/Store/HStore, License Checker, 3rd-party, and CodeQL checks passed

Does this PR potentially affect the following parts?

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. ci-cd Build or deploy labels Apr 26, 2026
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Apr 26, 2026
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 26, 2026
@contrueCT contrueCT changed the title ci: only evaluate rerun workflow for failed CI runs ci: optimize rerun workflow and add macOS RocksDB coverage Apr 26, 2026
@contrueCT contrueCT changed the title ci: optimize rerun workflow and add macOS RocksDB coverage chore(ci): optimize rerun workflow and add macOS RocksDB coverage Apr 30, 2026
@imbajin imbajin requested a review from Copilot May 5, 2026 08:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates HugeGraph’s CI infrastructure for server validation. It aims to reduce unnecessary rerun handling in the GitHub Actions rerun workflow and extend HugeGraph Server CI to exercise the single-node RocksDB path on macOS, with accompanying shell-script portability fixes for BSD/macOS environments.

Changes:

  • Restricts the rerun-decision job in rerun-ci.yml to failed upstream workflow runs and simplifies its decision script.
  • Adds a new macOS RocksDB server matrix job in server-ci.yml for Intel and Apple Silicon runners.
  • Refactors CI helper scripts to be more macOS-compatible by avoiding Bash 4-only features, handling BSD sed -i, resolving repo-root paths, and supporting curl/wget downloads.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
hugegraph-server/hugegraph-dist/src/assembly/travis/start-server.sh Reworks backend/serializer setup for portability and adds support for injecting extra server JVM options.
hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh Normalizes script/repo paths, adds portable download and sed helpers, and keeps API-test server setup rooted from repo top.
hugegraph-server/hugegraph-dist/src/assembly/travis/build-report.sh Resolves report output paths from repo root and makes JaCoCo CLI download logic portable.
.github/workflows/server-ci.yml Adds a macOS RocksDB CI matrix job covering compile, core test, API test, failure logging, and cleanup.
.github/workflows/rerun-ci.yml Adds a job-level failure gate to rerun decision logic and removes redundant non-failure branching.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/rerun-ci.yml
Comment thread .github/workflows/server-ci.yml
Comment thread hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh
- Resolve Travis helper directory to an absolute path
- Use the script directory directly for JaCoCo agent lookup
- Avoid nesting absolute paths under the repository root
@imbajin
Copy link
Copy Markdown
Member

imbajin commented May 5, 2026

Follow-up note for #3006: I think the Gremlin Console Apple Silicon/Jansi coverage should stay in a separate PR from this one.

This PR is scoped to rerun CI behavior plus macOS RocksDB server/API coverage. The bin/gremlin-console.sh path is a different entry point with its own Jansi/Java compatibility context, so a follow-up PR can add a focused smoke test, for example running a tiny gremlin-console.sh -- -e <script> check on macOS, and handle any related README/troubleshooting updates separately.

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

Labels

ci-cd Build or deploy size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants