Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
3c93fb4
Create auto-pr-review.yml
imbajin Jun 12, 2025
b385b9a
feat(backend): Add RocksDB Plus (ToplingDB) support
syslucas Jun 13, 2025
c26d84d
fix(server): Use reflection to increase compatibility with old rocksd…
syslucas Jun 17, 2025
9ae925b
fix(server): fix bugs when using reflection openDB
syslucas Jun 23, 2025
448551a
feat: add some scripts to unzip and preload toplingdb from the jar pa…
syslucas Jun 30, 2025
8ac2fdc
chore: fix CI bugs
syslucas Jul 5, 2025
90cb28f
chore: change env.USE_STAGE to true
syslucas Jul 5, 2025
31097ed
chore: try to modify the permission to solve the 401 problem
syslucas Jul 6, 2025
c2dab77
Merge branch 'apache:master' into master
Tsukilc Jul 9, 2025
2fef639
fix(server): solve the bug of importing topling package
syslucas Jul 8, 2025
cf4dbe7
fix(CI): eliminate pollution of environment variables
syslucas Jul 10, 2025
ccaa2b9
install deps in hstore-ci
syslucas Jul 13, 2025
cfee29b
add compatibility for libaio.so.1 for ubuntu-24.04
syslucas Jul 13, 2025
461fee3
chore(server): modify the configuration file to keep it consistent wi…
syslucas Jul 14, 2025
26b91e4
Merge pull request #19 from apache/master
imbajin Jul 31, 2025
7cfa2ee
feat(server): add the configuration open_http to start the Topling HT…
syslucas Sep 2, 2025
ac03196
chore(server): fix formatting issues in scripts
syslucas Sep 2, 2025
6c82d7a
chore(server): adopt review suggestions from AI robots
syslucas Sep 2, 2025
0151849
chore(server): add third-party package verification
syslucas Sep 9, 2025
d33aca3
chore(server): add unified error capture in the script to facilitate …
syslucas Sep 10, 2025
c7a4cfd
Merge pull request #38 from apache/master
imbajin Sep 16, 2025
d107e74
chore: improve maven Reproducible Builds (#2874) (#42)
pull[bot] Sep 22, 2025
4570649
Merge branch 'apache:master' into master
Tsukilc Sep 23, 2025
0c5eb2f
chore(server): extract redundant code from scripts into common functions
syslucas Sep 25, 2025
ed2d49d
chore(server): enhance script robustness
syslucas Sep 26, 2025
577430b
chore(server): corrected resource copy logic
syslucas Sep 26, 2025
4a591e7
chore(server): avoid repeated expansion of LD_PRELOAD caused by multi…
syslucas Sep 26, 2025
f5a0d40
chore(docs): add rocksdb-plus documentation
syslucas Sep 29, 2025
2fd566e
docs: enhance docker instruction with auth opened graph (#2881)
Tsukilc Sep 25, 2025
0e564b1
refactor: remove the package existing in java8 (#2792)
Tsukilc Sep 28, 2025
6fa2342
docs: revise Docker usage instructions in README (#2882)
imbajin Sep 30, 2025
4abed8e
chore(docs): update rocksdb-plus documentation
syslucas Oct 8, 2025
818d6de
chore(docs): add specs
syslucas Oct 9, 2025
aa477e0
chore(docs): fix lint
syslucas Oct 9, 2025
d632118
chore(docs): update maven settings.xml conf
syslucas Oct 9, 2025
6c707d9
chore(docs): add token permission hint
syslucas Oct 9, 2025
8550ab0
Merge remote-tracking branch 'origin/master' into toplingdb
syslucas Oct 9, 2025
668c5a3
fix: add YAML file validation
syslucas Oct 15, 2025
63f607f
fix: update ci scripts
syslucas Oct 15, 2025
c6a0238
Merge branch 'master' into toplingdb
imbajin Oct 31, 2025
f8023c4
fix(server): fix environment issues in the script
syslucas Nov 4, 2025
46fb13c
feat(rocksdb-provider): refactor the code to be compatible with topli…
syslucas Nov 4, 2025
061460c
feat(server): refactor server using rocksdb-provider to make it suppo…
syslucas Nov 4, 2025
062ffb5
feat(pd): refactor pd using rocksdb-provider to make it support topli…
syslucas Nov 4, 2025
0ac8aa6
feat(store): refactor store using rocksdb-provider to make it support…
syslucas Nov 4, 2025
1ac8280
fix(pd): fix potential CI issue
syslucas Nov 4, 2025
1b1e2fb
chore(store): update license
syslucas Nov 4, 2025
ad726aa
Merge branch 'master' into toplingdb
syslucas Nov 4, 2025
2ff7be2
fix(rocksdb-provider): remove the verification of the data path in th…
syslucas Nov 5, 2025
e28e425
fix(pd): fix dependency issues in CI
syslucas Nov 5, 2025
723fad5
fix(pd): add install deps in pd-store ci
syslucas Nov 5, 2025
9f5fc82
fix(pd): fix environment variable issues in ci
syslucas Nov 6, 2025
f36b8ab
fix(pd): fix the snakeyaml dependency issue between rocksdb-provider …
syslucas Nov 7, 2025
235d50c
chore(rocksdb-provider): adopt the recommendations from ai review
syslucas Nov 8, 2025
6b73255
Merge branch 'master' into toplingdb
imbajin Jan 12, 2026
9c154ee
feat(rocksdb): change provider selection from implicit classpath auto…
kenssa4eedfd Jul 9, 2026
bb8bef1
fix(rocksdb): add provider mismatch detection and move selection to c…
kenssa4eedfd Jul 9, 2026
7c7e363
Merge remote-tracking branch 'origin/master' into toplingdb
kenssa4eedfd Jul 9, 2026
368c824
refactor(rocksdb): switch ToplingDB integration to Easy Migrate mode
Jul 21, 2026
e928434
refactor(rocksdb): remove redundant provider SPI module, use RocksDB …
Jul 21, 2026
9868e40
fix(toplingdb): rename DBOptions key from 'dbo' to 'default' for Easy…
Jul 24, 2026
6836778
chore(rocksdb): update ToplingDB JNI jar
kenssa4eedfd Jul 26, 2026
19e882d
fix(toplingdb): align Easy Migrate runtime (#172)
WaterWhisperer Jul 29, 2026
900a30c
fix(toplingdb): address review feedback
kenssa4eedfd Aug 22, 2026
e1eac5b
fix(toplingdb): tighten provider and runtime validation
kenssa4eedfd Aug 22, 2026
8dec33d
Merge remote-tracking branch 'upstream/master' into toplingdb
kenssa4eedfd Aug 22, 2026
2c907fc
feat(docker): add ToplingDB image target
kenssa4eedfd Aug 22, 2026
69ee9dc
fix(toplingdb): align distributed runtime and CI (#204)
WaterWhisperer Aug 26, 2026
68d4a9b
Merge remote-tracking branch 'upstream/master' into toplingdb
WaterWhisperer Aug 29, 2026
ba5f1b0
chore(ci): sync master into toplingdb
imbajin Aug 30, 2026
abb4825
Merge branch 'master' into toplingdb
imbajin Aug 30, 2026
3bb44d5
fix(toplingdb): align easy migrate lifecycle
imbajin Aug 30, 2026
09677bb
feat(toplingdb): isolate component runtimes
imbajin Aug 30, 2026
36959aa
docs(toplingdb): add usage and developer guides
imbajin Aug 30, 2026
1a46632
fix(core): close OLTP traversal transactions
imbajin Aug 30, 2026
b879e96
feat(toplingdb): add safe Docker variants
imbajin Aug 30, 2026
c00e320
fix(server): handle container shutdown zombies
imbajin Aug 30, 2026
938e4b9
fix(core): release backend sessions cleanly
imbajin Aug 31, 2026
7afe259
fix: stabilize Topling lifecycle
imbajin Aug 31, 2026
1950e9b
chore(ci): add Ubuntu 26 Topling coverage
imbajin Aug 31, 2026
a5bbd2a
chore(docker): sync latest master compose
imbajin Aug 31, 2026
d42ee3b
fix(core): preserve filters across flattened queries
imbajin Aug 31, 2026
f09a457
refactor(docker): parameterize Topling compose
imbajin Aug 31, 2026
9229717
fix(ci): align hstore compose assertion
imbajin Aug 31, 2026
47c03e6
docs(docker): describe generic Topling parameters
imbajin Aug 31, 2026
553fe4c
docs(topling): correct Store config path
imbajin Aug 31, 2026
a665e7b
docs(docker): require explicit provider selection
imbajin Aug 31, 2026
e9f5213
fix(toplingdb): preserve data on provider failure
imbajin Aug 31, 2026
76cb94f
docs(toplingdb): clarify container support matrix
imbajin Aug 31, 2026
e075dcf
docs(docker): correct Compose defaults
imbajin Aug 31, 2026
28061bf
docs(toplingdb): clarify monitor defaults
imbajin Aug 31, 2026
e047cbc
fix(toplingdb): validate startup versions numerically
imbajin Aug 31, 2026
db9c556
fix(server): isolate optional Topling classpath
imbajin Aug 31, 2026
59d50dc
fix(server): isolate Topling init classpath
imbajin Aug 31, 2026
1d1575a
fix(server): guard Topling classpath aliases
imbajin Aug 31, 2026
9284b36
fix(server): harden library path filtering
imbajin Aug 31, 2026
18635f6
fix(server): quote runtime classpaths
imbajin Aug 31, 2026
f2f3003
chore: sync master into toplingdb
imbajin Sep 20, 2026
0d2d334
fix: harden Topling validation and store shutdown
imbajin Sep 24, 2026
763f967
docs: move ToplingDB handoff to goal-task
imbajin Sep 24, 2026
3d64b67
docs: refresh ToplingDB Linux validation contract
imbajin Sep 24, 2026
1e22f4b
docs: record ToplingDB validation contract commit
imbajin Sep 24, 2026
c4d2f78
docs: record standard 1+1+1 restart evidence
imbajin Sep 24, 2026
c7c71a5
docs: record 1+1+1 lifecycle partial evidence
imbajin Sep 24, 2026
902d3fa
docs: record 3+3+3 write consistency and sparse-copy finding
imbajin Sep 24, 2026
3bf8aa9
docs: record 3+3+3 auth and edge evidence
imbajin Sep 24, 2026
8134152
docs: record 3+3+3 store pod recovery
imbajin Sep 24, 2026
deb9ec3
docs: record 3+3+3 server replica continuity
imbajin Sep 24, 2026
e3d931c
docs: record 3+3+3 store leader recovery
imbajin Sep 24, 2026
cc14333
docs: record 3+3+3 store majority pod loss
imbajin Sep 24, 2026
477d6a0
docs: record current SHA standard image build start
imbajin Sep 24, 2026
f982989
docs: correct current SHA image build handle
imbajin Sep 24, 2026
b74befc
docs: checkpoint standard image build and Topling prerequisite
imbajin Sep 24, 2026
08dd6f4
fix: allow gRPC Netty allocator reads under the sandbox
imbajin Sep 24, 2026
457295a
fix: restore checkpoint WAL when data and WAL directories nest
imbajin Sep 24, 2026
e109012
fix: disable Topling memtable_as_log_index for Java batches
imbajin Sep 24, 2026
6266ffa
docs: record e109 Linux closure runs through store majority
imbajin Sep 24, 2026
eb8428c
docs: record standard fixed-subset load on e109
imbajin Sep 24, 2026
7d7a89b
docs: record standard subset adjacency after store restart
imbajin Sep 24, 2026
82929ee
docs: record Topling subset adjacency after store restart
imbajin Sep 24, 2026
a7a4a6f
docs: record e109 auth, index, Gremlin, and Cypher checks
imbajin Sep 24, 2026
a35ebeb
Merge branch 'master' into toplingdb
imbajin Sep 25, 2026
04e642f
docs: record unmodified server closure checks
imbajin Sep 25, 2026
1a495ad
docs: record a35 closure checks through store IP change
imbajin Sep 25, 2026
4549c52
docs: record the a35 closure doc push
imbajin Sep 25, 2026
c002733
docs: record Topling store address cache and recovery
imbajin Sep 25, 2026
bb69d28
docs: record the a35 Store-0 shutdown result
imbajin Sep 25, 2026
c63ea7d
docs: record the post-shutdown graph count
imbajin Sep 25, 2026
3fd7b11
docs: record the post-shutdown adjacency check
imbajin Sep 25, 2026
8e035af
docs: record cross-server adjacency for both providers
imbajin Sep 25, 2026
22b7d9e
docs: record that kind has no add-node command
imbajin Sep 25, 2026
652cd23
docs: record the a35 JNI sweep with no fallback
imbajin Sep 25, 2026
a4fd528
docs: record a35 3+3+3 balanceLeaders calls
imbajin Sep 25, 2026
282bf92
docs: record writes after a35 leader balance
imbajin Sep 25, 2026
0ccb8e5
docs: record a35 per-PD cluster state
imbajin Sep 25, 2026
386ded6
docs: record the store shutdown log order
imbajin Sep 25, 2026
875ca99
docs: record the standard store shutdown log
imbajin Sep 25, 2026
327737f
fix: recompute PD cluster state for REST reads
imbajin Sep 25, 2026
3e7aca8
docs: record the 327737f16 PD cluster-state rollout
imbajin Sep 25, 2026
a22be46
docs: record 327737f16 PD follower SIGTERM recovery
imbajin Sep 25, 2026
346abc6
docs: record in-place a35 server SIGTERM recovery
imbajin Sep 25, 2026
69c3a83
docs: record counts after the a35 server SIGTERM
imbajin Sep 25, 2026
bf0321f
docs: record adjacency after the in-place a35 server restart
imbajin Sep 25, 2026
ba18560
docs: record 327737f16 PD leader SIGTERM recovery
imbajin Sep 25, 2026
4c54185
docs: record counts after the 327737f16 PD leader SIGTERM
imbajin Sep 25, 2026
cb9178b
docs: record adjacency after the 327737f16 PD leader SIGTERM
imbajin Sep 25, 2026
6fadd78
docs: record PD JNI maps after the 327737f16 leader SIGTERM
imbajin Sep 25, 2026
2d3dd7a
docs: record Store JNI maps after the 327737f16 leader SIGTERM
imbajin Sep 25, 2026
2b452ae
docs: record Server JNI maps after the 327737f16 leader SIGTERM
imbajin Sep 25, 2026
33dc0a5
docs: record HStore snapshot failure and partition deferral
imbajin Sep 25, 2026
a926a36
docs: record that fixed-subset loader retries were not exercised
imbajin Sep 25, 2026
9f48ac3
docs: record that P7 benchmark has not started
imbajin Sep 25, 2026
5ecbd1b
docs: record that HA Compose and Helm stay unaligned
imbajin Sep 25, 2026
e56be4b
docs: record that the Store shutdown drill is not a stuck-worker timeout
imbajin Sep 25, 2026
6790d53
docs: record that the full LAW import stays deferred
imbajin Sep 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

# Pre-extracted release dirs / archives
apache-hugegraph-*/
**/apache-hugegraph-*/
**/*.tar
**/*.tar.gz
**/*.zip
Expand Down
7 changes: 7 additions & 0 deletions .github/configs/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
<id>staged-releases</id>
<url>https://repository.apache.org/content/groups/staging/</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/hugegraph/toplingdb</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
dependency-check:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
SCRIPT_DEPENDENCY: install-dist/scripts/dependency
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/cluster-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
cluster-test:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}

steps:
- name: Install JDK 11
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
jobs:
analyze:
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/commons-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ on:
- 'test-*'
pull_request:

permissions:
contents: read
packages: read

jobs:
build-commons:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}

strategy:
fail-fast: false
matrix:
JAVA_VERSION: ['11']
JAVA_VERSION: [ '11' ]

steps:
- name: Install JDK ${{ matrix.JAVA_VERSION }}
Expand Down
255 changes: 245 additions & 10 deletions .github/workflows/docker-build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ jobs:
in_build && seen && /^FROM / {
exit
}
in_build {
# Compare Docker instructions only. Comments between stages may
# differ when a Dockerfile adds an optional build target.
in_build && $0 !~ /^[[:space:]]*(#.*)?$/ {
print
seen = 1
}
Expand All @@ -89,7 +91,11 @@ jobs:
run: |
set -euo pipefail

docker buildx bake --file docker/bake.hcl --print > /tmp/hugegraph-bake.json
docker buildx bake --file docker/bake.hcl --print \
> /tmp/hugegraph-bake.json
RUNTIME_VARIANT=topling \
docker buildx bake --file docker/bake.hcl --print \
> /tmp/hugegraph-bake-topling.json
jq -e '
.group.default.targets == [
"build-cache",
Expand All @@ -101,42 +107,271 @@ jobs:
([.target[] | .platforms] |
all(. == ["linux/amd64", "linux/arm64"])) and
.target["build-cache"].target == "build" and
.target.pd.target == "standard" and
.target.store.target == "standard" and
.target["server-standalone"].target == "standard" and
(.target["server-hstore"].target == null) and
.target["build-cache"].output[0].type == "cacheonly" and
([.target[] | .args.SOURCE_REPOSITORY] |
all(. == "https://github.com/apache/hugegraph")) and
([.target | to_entries[] |
select(.key != "build-cache") |
.value.output[0].type] |
all(. == "docker"))
' /tmp/hugegraph-bake.json
jq -e '
.target.pd.target == "topling" and
.target.store.target == "topling" and
.target["server-standalone"].target == "topling" and
(.target["server-hstore"].target == null) and
([.target[] | .platforms] |
all(. == ["linux/amd64"]))
' /tmp/hugegraph-bake-topling.json

- name: Validate ToplingDB Compose parameters
env:
HUGEGRAPH_ADMIN_PASSWORD: ci-test-password
HG_PD_AUTH_SECRET_KEY: ci-test-pd-secret
HUGEGRAPH_SERVER_PULL_POLICY: always
HUGEGRAPH_PD_PULL_POLICY: always
HUGEGRAPH_STORE_PULL_POLICY: always
run: |
set -euo pipefail

env \
HUGEGRAPH_SERVER_IMAGE=local/hugegraph:topling \
HUGEGRAPH_SERVER_VOLUME=server-topling-data \
HG_SERVER_ROCKSDB_PROVIDER=topling \
HG_SERVER_DATA_PATH=/hugegraph-server/topling-data \
HG_SERVER_ENFORCE_PROVIDER_MARKER=true \
docker compose -f docker/docker-compose.yml \
config --format json > /tmp/topling-standalone.json
env \
HUGEGRAPH_PD_IMAGE=local/hugegraph-pd:topling \
HUGEGRAPH_PD_VOLUME=pd-topling-data \
HG_PD_ROCKSDB_PROVIDER=topling \
HG_PD_DATA_PATH=/hugegraph-pd/topling-pd-data \
HG_PD_ENFORCE_PROVIDER_MARKER=true \
HUGEGRAPH_STORE_IMAGE=local/hugegraph-store:topling \
HUGEGRAPH_STORE_VOLUME=store-topling-data \
HG_STORE_ROCKSDB_PROVIDER=topling \
HG_STORE_DATA_PATH=/hugegraph-store/topling-storage \
HG_STORE_ENFORCE_PROVIDER_MARKER=true \
docker compose -f docker/docker-compose-hstore.yml \
-f docker/docker-compose.dev.yml \
config --format json > /tmp/topling-hstore.json
env \
HUGEGRAPH_PD_IMAGE=local/hugegraph-pd:topling \
HUGEGRAPH_PD0_VOLUME=hg-pd0-topling-data \
HUGEGRAPH_PD1_VOLUME=hg-pd1-topling-data \
HUGEGRAPH_PD2_VOLUME=hg-pd2-topling-data \
HG_PD_ROCKSDB_PROVIDER=topling \
HG_PD_DATA_PATH=/hugegraph-pd/topling-pd-data \
HG_PD_ENFORCE_PROVIDER_MARKER=true \
HUGEGRAPH_STORE_IMAGE=local/hugegraph-store:topling \
HUGEGRAPH_STORE0_VOLUME=hg-store0-topling-data \
HUGEGRAPH_STORE1_VOLUME=hg-store1-topling-data \
HUGEGRAPH_STORE2_VOLUME=hg-store2-topling-data \
HG_STORE_ROCKSDB_PROVIDER=topling \
HG_STORE_DATA_PATH=/hugegraph-store/topling-storage \
HG_STORE_ENFORCE_PROVIDER_MARKER=true \
docker compose -f docker/docker-compose-3pd-3store-3server.yml \
config --format json > /tmp/topling-3x3.json

jq -e '
.name == "hugegraph-standalone" and
.services.server.image == "local/hugegraph:topling" and
.services.server.pull_policy == "always" and
.services.server.environment.HG_SERVER_ROCKSDB_PROVIDER == "topling" and
.services.server.environment.HG_SERVER_DATA_PATH == "/hugegraph-server/topling-data" and
.services.server.environment.HG_SERVER_ENFORCE_PROVIDER_MARKER == "true" and
(.services.server.volumes |
any(.source == "server-topling-data" and
.target == "/hugegraph-server/topling-data"))
' /tmp/topling-standalone.json

jq -e '
.name == "hugegraph-hstore" and
.services.pd.image == "local/hugegraph-pd:topling" and
.services.store.image == "local/hugegraph-store:topling" and
.services.pd.environment.HG_PD_ROCKSDB_PROVIDER == "topling" and
.services.store.environment.HG_STORE_ROCKSDB_PROVIDER == "topling" and
.services.server.environment.HG_SERVER_BACKEND == "hstore" and
(.services.server.environment.HG_SERVER_ROCKSDB_PROVIDER == null) and
.services.server.image == "hugegraph/server:dev" and
.services.server.pull_policy == "always" and
.services.pd.pull_policy == "always" and
.services.store.pull_policy == "always" and
(.services.pd.ports | all(.target != 2012)) and
(.services.store.ports | all(.target != 2013)) and
(.services.pd.volumes |
any(.source == "pd-topling-data")) and
(.services.store.volumes |
any(.source == "store-topling-data"))
' /tmp/topling-hstore.json

jq -e '
.name == "hugegraph-3x3" and
([.services.pd0, .services.pd1, .services.pd2] |
all(.environment.HG_PD_ROCKSDB_PROVIDER == "topling" and
.image == "local/hugegraph-pd:topling" and
.pull_policy == "always")) and
([.services.store0, .services.store1, .services.store2] |
all(.environment.HG_STORE_ROCKSDB_PROVIDER == "topling" and
.image == "local/hugegraph-store:topling" and
.pull_policy == "always")) and
([.services.server0, .services.server1, .services.server2] |
all(.environment.HG_SERVER_BACKEND == "hstore" and
(.environment.HG_SERVER_ROCKSDB_PROVIDER == null) and
.image == "hugegraph/server:latest" and
.pull_policy == "always")) and
([.services.pd0, .services.pd1, .services.pd2,
.services.store0, .services.store1, .services.store2] |
all(.pull_policy == "always"))
' /tmp/topling-3x3.json

docker-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dockerfile:
- hugegraph-pd/Dockerfile
- hugegraph-store/Dockerfile
- hugegraph-server/Dockerfile
- hugegraph-server/Dockerfile-hstore
include:
- dockerfile: hugegraph-pd/Dockerfile
- dockerfile: hugegraph-pd/Dockerfile
target: topling
- dockerfile: hugegraph-store/Dockerfile
- dockerfile: hugegraph-store/Dockerfile
target: topling
- dockerfile: hugegraph-server/Dockerfile
- dockerfile: hugegraph-server/Dockerfile
target: topling
- dockerfile: hugegraph-server/Dockerfile-hstore

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build ${{ matrix.dockerfile }}
run: |
IMAGE_ID=$(docker build -q --build-arg SOURCE_REVISION="$GITHUB_SHA" \
-f ${{ matrix.dockerfile }} .)
TARGET_ARGS=()
if [[ -n "${{ matrix.target }}" ]]; then
TARGET_ARGS+=(--target "${{ matrix.target }}")
fi
IMAGE_ID=$(docker build -q "${TARGET_ARGS[@]}" \
--build-arg SOURCE_REPOSITORY="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \
--build-arg SOURCE_REVISION="$GITHUB_SHA" \
-f ${{ matrix.dockerfile }} .)
echo "Built: $IMAGE_ID"
echo "IMAGE_ID=$IMAGE_ID" >> "$GITHUB_ENV"
HC=$(docker inspect --format='{{json .Config.Healthcheck}}' "$IMAGE_ID")
echo "Healthcheck: $HC"
[[ "$HC" != "null" ]] || { echo "ERROR: HEALTHCHECK missing in ${{ matrix.dockerfile }}"; exit 1; }
SOURCE_LABEL=$(docker inspect --format='{{index .Config.Labels "org.opencontainers.image.source"}}' "$IMAGE_ID")
REVISION_LABEL=$(docker inspect --format='{{index .Config.Labels "org.opencontainers.image.revision"}}' "$IMAGE_ID")
RUNTIME_LABEL=$(docker inspect --format='{{index .Config.Labels "org.apache.hugegraph.rocksdb-runtime"}}' "$IMAGE_ID")
[[ "$SOURCE_LABEL" == "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" ]]
[[ "$REVISION_LABEL" == "$GITHUB_SHA" ]]
if [[ "${{ matrix.dockerfile }}" == "hugegraph-server/Dockerfile-hstore" ]]; then
[[ "$RUNTIME_LABEL" == "hstore" ]]
elif [[ "${{ matrix.target }}" == "topling" ]]; then
[[ "$RUNTIME_LABEL" == "topling" ]]
else
[[ "$RUNTIME_LABEL" == "standard" ]]
fi

- name: Test server entrypoint property mapping
if: matrix.dockerfile == 'hugegraph-server/Dockerfile'
if: matrix.dockerfile == 'hugegraph-server/Dockerfile' && matrix.target != 'topling'
run: bash hugegraph-server/hugegraph-dist/docker/test/test-docker-entrypoint.sh

- name: Verify ToplingDB image runtime
if: matrix.target == 'topling'
run: |
case "${{ matrix.dockerfile }}" in
hugegraph-pd/Dockerfile)
EXPECTED_ENV='HG_PD_ROCKSDB_PROVIDER=topling'
DATA_ENV_PREFIX='HG_PD_DATA_PATH='
STANDARD_VOLUME='/hugegraph-pd/pd_data'
TOPLING_VOLUME='/hugegraph-pd/topling-pd-data'
;;
hugegraph-store/Dockerfile)
EXPECTED_ENV='HG_STORE_ROCKSDB_PROVIDER=topling'
DATA_ENV_PREFIX='HG_STORE_DATA_PATH='
STANDARD_VOLUME='/hugegraph-store/storage'
TOPLING_VOLUME='/hugegraph-store/topling-storage'
;;
hugegraph-server/Dockerfile)
EXPECTED_ENV='HG_SERVER_ROCKSDB_PROVIDER=topling'
DATA_ENV_PREFIX='HG_SERVER_DATA_PATH='
STANDARD_VOLUME='/hugegraph-server/rocksdb-data'
TOPLING_VOLUME='/hugegraph-server/topling-data'
;;
*)
echo "ERROR: unsupported Topling Dockerfile" >&2
exit 1
;;
esac
docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
"$IMAGE_ID" | grep -qx "$EXPECTED_ENV"
if docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
"$IMAGE_ID" | grep -q "^${DATA_ENV_PREFIX}"; then
echo "ERROR: data path must follow the selected provider" >&2
exit 1
fi
VOLUMES=$(docker inspect --format='{{json .Config.Volumes}}' \
"$IMAGE_ID")
jq -e --arg standard "$STANDARD_VOLUME" --arg topling "$TOPLING_VOLUME" \
'has($standard) and has($topling)' <<<"$VOLUMES"
docker run --rm --entrypoint bash "$IMAGE_ID" -c '
set -euo pipefail
test -n "$(find lib/topling -maxdepth 1 -name "rocksdbjni*.jar" -print -quit)"
test -r library/librocksdbjni-linux64.so
LDD_OUTPUT=$(ldd library/librocksdbjni-linux64.so)
echo "$LDD_OUTPUT"
if grep -q "not found" <<<"$LDD_OUTPUT"; then
exit 1
fi
TOPLINGDB_ROCKSDB_PROVIDER=topling source bin/preload-topling.sh
test "$TOPLING_ACTIVE_NATIVE" = \
"$PWD/library/librocksdbjni-linux64.so"
/bin/true
'

- name: Preserve standard image volume compatibility
if: matrix.target != 'topling' && matrix.dockerfile != 'hugegraph-server/Dockerfile-hstore'
run: |
case "${{ matrix.dockerfile }}" in
hugegraph-pd/Dockerfile)
DATA_ENV_PREFIX='HG_PD_DATA_PATH='
LEGACY_VOLUME='/hugegraph-pd'
;;
hugegraph-store/Dockerfile)
DATA_ENV_PREFIX='HG_STORE_DATA_PATH='
LEGACY_VOLUME='/hugegraph-store'
;;
hugegraph-server/Dockerfile)
DATA_ENV_PREFIX='HG_SERVER_DATA_PATH='
LEGACY_VOLUME='/hugegraph-server'
;;
esac
if docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
"$IMAGE_ID" | grep -q "^${DATA_ENV_PREFIX}"; then
echo "ERROR: data path must follow the selected provider" >&2
exit 1
fi
VOLUMES=$(docker inspect --format='{{json .Config.Volumes}}' \
"$IMAGE_ID")
jq -e --arg legacy "$LEGACY_VOLUME" 'has($legacy)' <<<"$VOLUMES"

- name: Verify HStore image has no local Topling runtime
if: matrix.dockerfile == 'hugegraph-server/Dockerfile-hstore'
run: |
docker run --rm --entrypoint bash "$IMAGE_ID" -c '
set -euo pipefail
test -z "$(find lib -path "*/topling/rocksdbjni*.jar" \
-print -quit)"
test ! -e library/librocksdbjni-linux64.so
'

# The startup preflight needs a socket-table tool, and the base image
# ships none of its own. Without one every start reports "unknown" and
# a duplicate start is no longer refused, so assert the image can
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/licence-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
check-license:
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
steps:
- uses: actions/checkout@v4

Expand Down
Loading
Loading