This is an automated email from the ASF dual-hosted git repository.
imbajin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hugegraph.git
The following commit(s) were added to refs/heads/master by this push:
new 0ecd844d9 chore(ci): exit 77 when tools missing to distinguish skip
from pass (#3055)
0ecd844d9 is described below
commit 0ecd844d9e0d25163a71439583897fdae580f80b
Author: KAI <[email protected]>
AuthorDate: Tue Jun 9 14:43:02 2026 +0530
chore(ci): exit 77 when tools missing to distinguish skip from pass (#3055)
All three startup test scripts previously exited 0 when required tools
(lsof, curl, java) were not found. This is indistinguishable from a
passing test run — CI shows green even though no tests ran.
Change skip exits to 77 (conventional skip code) and update the CI
workflow steps to treat exit 77 as a visible skip notice rather than
a failure.
Flagged as non-blocking follow-up in reviews of #3044 and #3047.
Related to: #3043
---
.github/workflows/pd-store-ci.yml | 42 ++++++++++++++++++++++
.github/workflows/server-ci.yml | 20 ++++++++++-
.../src/assembly/travis/test-start-hugegraph-pd.sh | 2 +-
.../assembly/travis/test-start-hugegraph-store.sh | 4 +--
.../src/assembly/travis/test-start-hugegraph.sh | 2 +-
5 files changed, 65 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/pd-store-ci.yml
b/.github/workflows/pd-store-ci.yml
index 29ac9c3ac..62006794c 100644
--- a/.github/workflows/pd-store-ci.yml
+++ b/.github/workflows/pd-store-ci.yml
@@ -107,12 +107,30 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true
-Dmaven.test.skip=true -ntp --fail-at-end
+ - name: Check startup test prerequisites (PD)
+ id: pd-preflight
+ run: |
+ for tool in lsof curl java; do
+ if ! command -v "$tool" >/dev/null 2>&1; then
+ echo "can_run=false" >> "$GITHUB_OUTPUT"
+ echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
+ exit 0
+ fi
+ done
+ echo "can_run=true" >> "$GITHUB_OUTPUT"
+
- name: Run start-hugegraph-pd.sh foreground mode tests
+ if: steps.pd-preflight.outputs.can_run == 'true'
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q
-DforceStdout)
PD_DIR=hugegraph-pd/apache-hugegraph-pd-$VERSION/
$TRAVIS_DIR/test-start-hugegraph-pd.sh $PD_DIR
+ - name: Startup tests skipped (missing prerequisites)
+ if: steps.pd-preflight.outputs.can_run == 'false'
+ run: |
+ echo "::notice::PD startup tests skipped — ${{
steps.pd-preflight.outputs.skip_reason }}"
+
- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
@@ -169,12 +187,36 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true
-Dmaven.test.skip=true -ntp --fail-at-end
+ - name: Check startup test prerequisites (Store)
+ id: store-preflight
+ run: |
+ for tool in lsof curl java; do
+ if ! command -v "$tool" >/dev/null 2>&1; then
+ echo "can_run=false" >> "$GITHUB_OUTPUT"
+ echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
+ exit 0
+ fi
+ done
+ LIMIT_N=$(ulimit -n)
+ if [[ "$LIMIT_N" != "unlimited" ]] && (( LIMIT_N < 1024 )); then
+ echo "can_run=false" >> "$GITHUB_OUTPUT"
+ echo "skip_reason=ulimit -n is $LIMIT_N (store requires >= 1024)"
>> "$GITHUB_OUTPUT"
+ exit 0
+ fi
+ echo "can_run=true" >> "$GITHUB_OUTPUT"
+
- name: Run start-hugegraph-store.sh foreground mode tests
+ if: steps.store-preflight.outputs.can_run == 'true'
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q
-DforceStdout)
STORE_DIR=hugegraph-store/apache-hugegraph-store-$VERSION/
$TRAVIS_DIR/test-start-hugegraph-store.sh $STORE_DIR
+ - name: Startup tests skipped (missing prerequisites)
+ if: steps.store-preflight.outputs.can_run == 'false'
+ run: |
+ echo "::notice::Store startup tests skipped — ${{
steps.store-preflight.outputs.skip_reason }}"
+
- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml
index 20619797c..2eb313c97 100644
--- a/.github/workflows/server-ci.yml
+++ b/.github/workflows/server-ci.yml
@@ -70,14 +70,32 @@ jobs:
run: |
mvn clean compile -U -Dmaven.javadoc.skip=true -ntp
- - name: Run start-hugegraph.sh foreground mode tests
+ - name: Check startup test prerequisites
+ id: server-preflight
if: ${{ env.BACKEND == 'rocksdb' }}
+ run: |
+ for tool in lsof crontab curl java; do
+ if ! command -v "$tool" >/dev/null 2>&1; then
+ echo "can_run=false" >> "$GITHUB_OUTPUT"
+ echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
+ exit 0
+ fi
+ done
+ echo "can_run=true" >> "$GITHUB_OUTPUT"
+
+ - name: Run start-hugegraph.sh foreground mode tests
+ if: ${{ env.BACKEND == 'rocksdb' &&
steps.server-preflight.outputs.can_run == 'true' }}
run: |
mvn package -Dmaven.test.skip=true -pl
hugegraph-server/hugegraph-dist -am -ntp
VERSION=$(mvn help:evaluate -Dexpression=project.version -q
-DforceStdout)
SERVER_DIR=hugegraph-server/apache-hugegraph-server-$VERSION/
$TRAVIS_DIR/test-start-hugegraph.sh $SERVER_DIR
+ - name: Startup tests skipped (missing prerequisites)
+ if: ${{ env.BACKEND == 'rocksdb' &&
steps.server-preflight.outputs.can_run == 'false' }}
+ run: |
+ echo "::notice::Server startup tests skipped — ${{
steps.server-preflight.outputs.skip_reason }}"
+
- name: Run unit test
run: |
$TRAVIS_DIR/run-unit-test.sh $BACKEND
diff --git
a/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-pd.sh
b/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-pd.sh
index db3428b13..260e7f571 100755
---
a/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-pd.sh
+++
b/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-pd.sh
@@ -132,7 +132,7 @@ fi
for tool in lsof curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "SKIP: required tool '$tool' not found — skipping test suite"
- exit 0
+ exit 77
fi
done
diff --git
a/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-store.sh
b/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-store.sh
index 7da932376..7e11da28d 100755
---
a/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-store.sh
+++
b/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph-store.sh
@@ -113,7 +113,7 @@ fi
for tool in lsof curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "SKIP: required tool '$tool' not found — skipping test suite"
- exit 0
+ exit 77
fi
done
@@ -122,7 +122,7 @@ LIMIT_N=$(ulimit -n)
if [[ "$LIMIT_N" != "unlimited" ]]; then
if (( LIMIT_N < 1024 )); then
echo "SKIP: ulimit -n is $LIMIT_N — store requires >= 1024. Run:
ulimit -n 1024"
- exit 0
+ exit 77
fi
fi
diff --git
a/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph.sh
b/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph.sh
index d2dd492fc..353cab651 100755
---
a/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph.sh
+++
b/hugegraph-server/hugegraph-dist/src/assembly/travis/test-start-hugegraph.sh
@@ -148,7 +148,7 @@ fi
for tool in lsof crontab curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "SKIP: required tool '$tool' not found — skipping test suite"
- exit 0
+ exit 77
fi
done