Skip to content

fix(server): preserve graphs during task shutdown #2588

fix(server): preserve graphs during task shutdown

fix(server): preserve graphs during task shutdown #2588

Workflow file for this run

name: "HugeGraph-Server CI"
on:
push:
branches:
- master
- 'release-*'
- 'test-*'
- 'tinkerpop-*'
pull_request:
workflow_dispatch:
# Keep the newest PR run; preserve independent push, release and manual runs.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}-${{ github.run_attempt == 1 && 'head' || format('rerun-{0}', github.run_id) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
pull-requests: read
jobs:
plan:
runs-on: ubuntu-24.04
outputs:
server: ${{ steps.select.outputs.server }}
commons: ${{ steps.select.outputs.commons }}
pd_store: ${{ steps.select.outputs.pd_store }}
cluster: ${{ steps.select.outputs.cluster }}
docker: ${{ steps.select.outputs.docker }}
helm: ${{ steps.select.outputs.helm }}
dependency_license: ${{ steps.select.outputs.dependency_license }}
compatibility: ${{ steps.select.outputs.compatibility }}
smoke: ${{ steps.select.outputs.smoke }}
security: ${{ steps.select.outputs.security }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- name: Test selection, gate and retry policy
run: python3 -m unittest discover -s .github/scripts -p 'test_*.py'
- name: Select affected tests
id: select
env:
GH_TOKEN: ${{ github.token }}
run: >-
python3 .github/scripts/ci-policy.py plan --project server
--event-path "$GITHUB_EVENT_PATH" --repository "$GITHUB_REPOSITORY"
--output plan.json
- uses: actions/upload-artifact@v4
with:
name: ci-plan
path: plan.json
retention-days: 7
overwrite: true
java-runtime:
uses: ./.github/workflows/java-runtime.yml
permissions:
contents: read
wait-storage-shell-test:
name: Startup contracts
needs: plan
if: needs.plan.outputs.server == 'true'
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Test CI retry freshness checks
run: python3 -m unittest discover -s .github/scripts -p 'test_check_rerun.py'
- name: Run wait-storage.sh peer failover tests
run: hugegraph-server/hugegraph-dist/src/assembly/travis/test-wait-storage.sh
- name: Run RISC-V Java runtime contract tests
run: hugegraph-server/hugegraph-dist/src/assembly/travis/test-riscv64-java-runtime.sh
- name: Check TinkerPop report execution gates
run: bash hugegraph-server/hugegraph-dist/src/assembly/travis/test-tinkerpop-reports.sh
# RocksDB coverage uses the project runtime and any additional test JDKs.
# The shared runtime comes from .github/workflows/.java-version, independent of bytecode targets.
# Keep the job ID for the Codecov configuration validator.
server-rocksdb:
needs: [plan, java-runtime]
if: needs.plan.outputs.server == 'true'
uses: ./.github/workflows/server-tests.yml
with:
backend: rocksdb
java-versions: ${{ needs.java-runtime.outputs.versions }}
secrets: inherit
commons:
name: commons
needs: plan
if: needs.plan.outputs.commons == 'true'
uses: ./.github/workflows/commons-ci.yml
secrets: inherit
pd_store:
name: pd_store
needs: plan
if: needs.plan.outputs.pd_store == 'true'
uses: ./.github/workflows/pd-store-ci.yml
secrets: inherit
cluster:
name: cluster
needs: plan
if: needs.plan.outputs.cluster == 'true'
uses: ./.github/workflows/cluster-test-ci.yml
secrets: inherit
docker:
name: docker
needs: plan
if: needs.plan.outputs.docker == 'true'
uses: ./.github/workflows/docker-build-ci.yml
secrets: inherit
helm:
name: helm
needs: plan
if: needs.plan.outputs.helm == 'true'
uses: ./.github/workflows/helm-chart-ci.yml
dependency_license:
name: dependency_license
needs: plan
if: needs.plan.outputs.dependency_license == 'true'
uses: ./.github/workflows/check-dependencies.yml
affected-module-tests:
name: affected-module-tests
needs: [plan, java-runtime, wait-storage-shell-test, server-rocksdb, commons, pd_store, cluster, docker, helm, dependency_license]
if: ${{ !cancelled() }}
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Check planning and runtime results
env:
JOB_RESULTS: ${{ toJSON(needs) }}
run: |
python3 - <<'PYGATE'
import json, os
results = json.loads(os.environ['JOB_RESULTS'])
if results['plan']['result'] != 'success':
raise SystemExit('CI planning failed')
if results['plan']['outputs'].get('server') == 'true':
for job in ['java-runtime', 'wait-storage-shell-test']:
if results[job]['result'] != 'success':
raise SystemExit('Selected prerequisite failed: ' + job)
results['server_rocksdb'] = results['server-rocksdb']
with open('results.json', 'w') as output:
json.dump(results, output)
PYGATE
- uses: actions/download-artifact@v4
with:
name: ci-plan
- name: Report selected suites and their real results
env:
GH_TOKEN: ${{ github.token }}
run: python3 .github/scripts/ci-policy.py gate --mode advisory --plan plan.json --results results.json --output test-results.json