Skip to content

Commit 654521f

Browse files
committed
chore: merge master into Hubble API branch
- adopt soft-disabled ServerInfo behavior from master - keep GraphSpace API unit coverage in the merged suite - remove obsolete legacy master ServerInfo tests
2 parents 3076199 + 2d63804 commit 654521f

147 files changed

Lines changed: 12502 additions & 4195 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
# IMPORTANT: .dockerignore does NOT inherit .gitignore — patterns must be restated.
19+
20+
# Build output
21+
**/target/
22+
23+
# Pre-extracted release dirs / archives
24+
apache-hugegraph-*/
25+
**/*.tar
26+
**/*.tar.gz
27+
**/*.zip
28+
**/*.war
29+
30+
# IDE / OS
31+
.idea/
32+
.vscode/
33+
**/*.iml
34+
**/*.iws
35+
**/.DS_Store
36+
37+
# Build / runtime artifacts
38+
**/logs/
39+
**/*.log
40+
**/*.class
41+
**/gen-java/
42+
**/upload-files/
43+
**/build/
44+
**/node_modules/
45+
46+
# Env files
47+
.env.local
48+
.env.*.local
49+
50+
# Git internals
51+
.git
52+
.gitignore
53+
.gitattributes
54+
.github
55+
56+
# Compose / docs not needed in build context
57+
**/docker-compose*.yml
58+
**/docker-compose*.yaml
59+
**/*.md
60+
docs/
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
name: "Docker Build CI"
19+
20+
on:
21+
push:
22+
branches:
23+
- master
24+
- 'release-*'
25+
pull_request:
26+
paths:
27+
- '**/Dockerfile*'
28+
- '.dockerignore'
29+
30+
jobs:
31+
docker-build:
32+
runs-on: ubuntu-24.04
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
dockerfile:
37+
- hugegraph-pd/Dockerfile
38+
- hugegraph-store/Dockerfile
39+
- hugegraph-server/Dockerfile
40+
- hugegraph-server/Dockerfile-hstore
41+
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Build ${{ matrix.dockerfile }}
47+
run: |
48+
IMAGE_ID=$(docker build -q -f ${{ matrix.dockerfile }} .)
49+
echo "Built: $IMAGE_ID"
50+
HC=$(docker inspect --format='{{json .Config.Healthcheck}}' "$IMAGE_ID")
51+
echo "Healthcheck: $HC"
52+
[[ "$HC" != "null" ]] || { echo "ERROR: HEALTHCHECK missing in ${{ matrix.dockerfile }}"; exit 1; }

.github/workflows/pd-store-ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ jobs:
5252
mvn -U -ntp dependency:get -Dartifact=org.apache.hugegraph:hugegraph-struct:$REVISION
5353
fi
5454
55+
- name: Run hugegraph-struct test
56+
if: ${{ hashFiles('hugegraph-struct/pom.xml') != '' }}
57+
run: |
58+
mvn -U -ntp -pl hugegraph-struct test
59+
5560
pd:
5661
needs: struct
5762
runs-on: ubuntu-latest
@@ -102,6 +107,30 @@ jobs:
102107
run: |
103108
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end
104109
110+
- name: Check startup test prerequisites (PD)
111+
id: pd-preflight
112+
run: |
113+
for tool in lsof curl java; do
114+
if ! command -v "$tool" >/dev/null 2>&1; then
115+
echo "can_run=false" >> "$GITHUB_OUTPUT"
116+
echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
117+
exit 0
118+
fi
119+
done
120+
echo "can_run=true" >> "$GITHUB_OUTPUT"
121+
122+
- name: Run start-hugegraph-pd.sh foreground mode tests
123+
if: steps.pd-preflight.outputs.can_run == 'true'
124+
run: |
125+
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
126+
PD_DIR=hugegraph-pd/apache-hugegraph-pd-$VERSION/
127+
$TRAVIS_DIR/test-start-hugegraph-pd.sh $PD_DIR
128+
129+
- name: Startup tests skipped (missing prerequisites)
130+
if: steps.pd-preflight.outputs.can_run == 'false'
131+
run: |
132+
echo "::notice::PD startup tests skipped — ${{ steps.pd-preflight.outputs.skip_reason }}"
133+
105134
- name: Prepare env and service
106135
run: |
107136
$TRAVIS_DIR/start-pd.sh
@@ -158,6 +187,36 @@ jobs:
158187
run: |
159188
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end
160189
190+
- name: Check startup test prerequisites (Store)
191+
id: store-preflight
192+
run: |
193+
for tool in lsof curl java; do
194+
if ! command -v "$tool" >/dev/null 2>&1; then
195+
echo "can_run=false" >> "$GITHUB_OUTPUT"
196+
echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
197+
exit 0
198+
fi
199+
done
200+
LIMIT_N=$(ulimit -n)
201+
if [[ "$LIMIT_N" != "unlimited" ]] && (( LIMIT_N < 1024 )); then
202+
echo "can_run=false" >> "$GITHUB_OUTPUT"
203+
echo "skip_reason=ulimit -n is $LIMIT_N (store requires >= 1024)" >> "$GITHUB_OUTPUT"
204+
exit 0
205+
fi
206+
echo "can_run=true" >> "$GITHUB_OUTPUT"
207+
208+
- name: Run start-hugegraph-store.sh foreground mode tests
209+
if: steps.store-preflight.outputs.can_run == 'true'
210+
run: |
211+
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
212+
STORE_DIR=hugegraph-store/apache-hugegraph-store-$VERSION/
213+
$TRAVIS_DIR/test-start-hugegraph-store.sh $STORE_DIR
214+
215+
- name: Startup tests skipped (missing prerequisites)
216+
if: steps.store-preflight.outputs.can_run == 'false'
217+
run: |
218+
echo "::notice::Store startup tests skipped — ${{ steps.store-preflight.outputs.skip_reason }}"
219+
161220
- name: Prepare env and service
162221
run: |
163222
$TRAVIS_DIR/start-pd.sh

.github/workflows/rerun-ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: "Rerun CI"
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- "HugeGraph-Server CI"
7+
- "HugeGraph-Commons CI"
8+
- "HugeGraph-PD & Store & Hstore CI"
9+
- "Cluster Test CI"
10+
types:
11+
- completed
12+
13+
permissions: {}
14+
15+
env:
16+
MAX_RERUNS: '2'
17+
RETRY_DELAY_SECONDS: '180'
18+
19+
jobs:
20+
decide-rerun-action:
21+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
22+
runs-on: ubuntu-latest
23+
outputs:
24+
action: ${{ steps.decision.outputs.action }}
25+
steps:
26+
- name: Decide rerun action
27+
id: decision
28+
env:
29+
WORKFLOW_NAME: ${{ github.event.workflow_run.name }}
30+
RUN_ID: ${{ github.event.workflow_run.id }}
31+
RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
32+
EVENT_NAME: ${{ github.event.workflow_run.event }}
33+
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
34+
run: |
35+
set -euo pipefail
36+
37+
action="skip"
38+
reason="unsupported event: $EVENT_NAME"
39+
40+
if [[ "$EVENT_NAME" == "push" || "$EVENT_NAME" == "pull_request" ]]; then
41+
if (( RUN_ATTEMPT > MAX_RERUNS )); then
42+
reason="retry limit reached"
43+
else
44+
action="rerun"
45+
reason="within retry limit"
46+
fi
47+
fi
48+
49+
{
50+
echo "action=$action"
51+
echo "reason=$reason"
52+
} >> "$GITHUB_OUTPUT"
53+
54+
{
55+
echo "### Rerun CI decision"
56+
echo ""
57+
echo "- Workflow: $WORKFLOW_NAME"
58+
echo "- Source event: $EVENT_NAME"
59+
echo "- Head branch: $HEAD_BRANCH"
60+
echo "- Run ID: $RUN_ID"
61+
echo "- Current attempt: $RUN_ATTEMPT"
62+
echo "- Max automatic reruns: $MAX_RERUNS"
63+
echo "- Delay seconds: $RETRY_DELAY_SECONDS"
64+
echo "- Action: $action"
65+
echo "- Reason: $reason"
66+
} >> "$GITHUB_STEP_SUMMARY"
67+
68+
rerun-failed-jobs:
69+
needs: decide-rerun-action
70+
if: needs.decide-rerun-action.outputs.action == 'rerun'
71+
permissions:
72+
actions: write
73+
contents: read
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Wait before rerun
77+
run: |
78+
sleep "$RETRY_DELAY_SECONDS"
79+
80+
- name: Rerun failed jobs
81+
env:
82+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
GH_REPO: ${{ github.repository }}
84+
run: |
85+
gh run rerun ${{ github.event.workflow_run.id }} --failed

0 commit comments

Comments
 (0)