Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
82034fb
refactor(server): remove legacy scheduler code [p2] (#3244)
byteayan Sep 30, 2026
176fb56
refactor(server): remove inactive redirect filter (#3246)
byteayan Oct 2, 2026
02628ed
fix: remove duplicate TokenGenerator from hugegraph-struct (#3257)
bitflicker64 Oct 3, 2026
cb458ba
refactor: align RocksDB and JRaft runtime (1/4) (#3265)
imbajin Oct 4, 2026
89cd937
refactor: stabilize and upgrade CI runtime (#3264)
imbajin Oct 4, 2026
5004a35
chore(ci): keep the docker build log visible in CI (#3269)
bitflicker64 Oct 4, 2026
0a3e4ae
feat(helm): add hstore-cluster k8s deployment chart (#3218)
bitflicker64 Oct 4, 2026
39a3a8d
BREAKING CHANGE: prepare the basic Java17 env (1/3) (#3261)
contrueCT Oct 5, 2026
8fd9841
refactor(server): preserve core gremlin semantics (2/3) (#3262)
contrueCT Oct 5, 2026
8beb78b
feat(ci): support optional & ordered actions with jobs/prs (#3271)
imbajin Oct 6, 2026
708e0ab
refactor(ci): separate required and advisory checks (#3277)
imbajin Oct 6, 2026
662a97d
chore: add TODO breadcrumbs for the Helm chart's server workarounds (…
bitflicker64 Oct 6, 2026
ba1c6ab
chore(deps): upgrade TinkerPop runtime
contrueCT Oct 5, 2026
ad5c3ae
refactor(core): adapt traversal APIs
contrueCT Oct 5, 2026
421fbc6
fix(server): adapt GraphSON and Cypher
contrueCT Oct 5, 2026
d7fc2ee
chore(ci): gate TinkerPop compatibility
contrueCT Oct 5, 2026
27f4070
fix(core): preserve local ID predicates
imbajin Oct 5, 2026
f7e241b
fix: secure YAML consumers
imbajin Oct 5, 2026
f8d0be5
fix(server): preserve typed Driver results
imbajin Oct 5, 2026
b883871
docs: explain TinkerPop upgrade checks
imbajin Oct 5, 2026
f0dceaa
chore: align release licenses and inventory
contrueCT Oct 5, 2026
4a805b8
fix(server): restore upgrade boundary contracts
imbajin Oct 5, 2026
4e7b12a
fix(server): preserve count and Cypher transport results
contrueCT Oct 6, 2026
5162b1a
fix(server): close upgrade review gaps
imbajin Oct 6, 2026
28bb374
fix(server): complete remaining upgrade contracts
imbajin Oct 6, 2026
d9abcd4
chore(ci): skip TP for current PR temporarily
imbajin Oct 6, 2026
dc3d3ec
refactor: consolidate shared graph foundations
imbajin Oct 1, 2026
030d32a
fix: preserve migration build and license checks
imbajin Oct 1, 2026
acb8498
fix: restore build and stable string ID ordering
imbajin Oct 2, 2026
650e841
fix: preserve streamed Kryo reads and CI logs
imbajin Oct 2, 2026
2b9312b
fix(struct): retain shared dependency versions
imbajin Oct 2, 2026
2313cbe
fix(pd): retain the text interpolation version
imbajin Oct 2, 2026
5075ee6
fix(cluster): align test node startup settings
imbajin Oct 4, 2026
13b60f1
docs: illustrate shared foundation migration
imbajin Oct 4, 2026
cc5ed63
docs: clean migration docs and test fixtures
imbajin Oct 5, 2026
8c7f279
fix: align consolidation with TinkerPop upgrade
imbajin Oct 5, 2026
7398075
fix: repair CI builds and task cancellation
imbajin Oct 7, 2026
e62c961
fix(common): encode REST bodies as UTF-8 (#3281)
imbajin Oct 7, 2026
af3c686
chore: upgrade the project version to 1.8.0 (#3282)
imbajin Oct 8, 2026
769078e
fix: align secure runtime dependencies
imbajin Oct 8, 2026
a30796c
feat(commons): select the RocksDB runtime
imbajin Oct 8, 2026
bc25e82
feat: prepare the Topling native runtime
imbajin Oct 8, 2026
374e716
feat(server): enable explicit Topling launches
imbajin Oct 8, 2026
20003d6
fix(rocksdb): release native session owners
imbajin Oct 8, 2026
93ef916
fix(cache): preserve graph cache lifetime
imbajin Oct 8, 2026
1af9589
fix(server): close request and graph resources
imbajin Oct 8, 2026
736a990
fix(server): preserve schema and index semantics
imbajin Oct 8, 2026
97c9c77
fix(pd): drain work before closing metadata
imbajin Oct 8, 2026
8e246d5
feat: wire distributed Topling launchers
imbajin Oct 8, 2026
bdc2682
fix(store): release engine and metric resources
imbajin Oct 8, 2026
3788553
fix(store): coordinate node shutdown
imbajin Oct 8, 2026
ea4994a
fix(server): defer the first rate limit reset
imbajin Oct 8, 2026
f0e652b
chore(ci): retain focused runtime checks
imbajin Oct 8, 2026
134300a
docs: explain the three-step Topling switch
imbajin Oct 8, 2026
5039e5b
feat(server): support cypher bound queries safely (#3289)
imbajin Oct 8, 2026
6885519
fix(struct): exclude optional word from runtime (#3295)
imbajin Oct 9, 2026
d00efce
feat(server): make rocksdb snapshot restore retryable (#3293)
imbajin Oct 9, 2026
0f86e2a
refactor(server): complete request transaction cleanup (#3302)
imbajin Oct 10, 2026
5c6543d
fix(hstore): clear shared olap properties (#3306)
imbajin Oct 10, 2026
c3fb42f
fix(store): drain scan and native resources
imbajin Oct 9, 2026
1bc3a8d
fix(store): finish interrupted resource teardown
imbajin Oct 9, 2026
de7eb08
refactor(store): separate RPC and shutdown reviews
imbajin Oct 9, 2026
80cb9b3
fix(store): complete RPC lifecycle boundaries
imbajin Oct 9, 2026
e6ed267
fix(store): preserve terminal callback dispatch
imbajin Oct 9, 2026
0655454
fix(store): interrupt owned scan readers
imbajin Oct 9, 2026
1b12fcc
fix(store): handle unary context cancellation
imbajin Oct 9, 2026
bd58405
fix(store): stop cancelled batch readers
imbajin Oct 9, 2026
2480b59
docs(store): consolidate storage lifecycle
imbajin Oct 10, 2026
365d177
fix(store): retain the final queued scan batch
imbajin Oct 10, 2026
72085aa
fix(store): complete scan cancellation signals
imbajin Oct 10, 2026
fd64f74
fix: handle launcher GC and project JSON (#3305)
imbajin Oct 10, 2026
ed3a2df
refactor(store): drain TTL native resources on shutdown (#3304)
imbajin Oct 10, 2026
6df8dd9
fix(rocksdb): synchronize session close and reset (#3298)
contrueCT Oct 10, 2026
87a06a9
fix(common): verify HTTPS certificate identity (#3307)
imbajin Oct 10, 2026
36bc1c6
fix(server): initialize queries before serving (#3301)
contrueCT Oct 10, 2026
4ffd71b
fix(server): keep Server crash diagnostics after a container restart …
byteayan Oct 11, 2026
000d538
fix(store): keep hostname store addresses (#3291)
kalayciburak Oct 11, 2026
7644566
refactor(server): clarify condition semantics for label queries (#2994)
contrueCT Oct 11, 2026
9014faa
fix(store): bound jemalloc downloads (#3310)
imbajin Oct 12, 2026
3cc8f61
fix(helm): exclude source assets from packages (#3312)
imbajin Oct 12, 2026
cfc5c23
fix(server): preserve container exit status (#3311)
imbajin Oct 12, 2026
b75bc72
fix(store): recover channels after unavailable scans (#3313)
imbajin Oct 12, 2026
a247530
fix(server): respect vertex graphspace permissions (#3315)
imbajin Oct 12, 2026
f7a0a79
fix(server): release traversal worker leases (#3314)
imbajin Oct 12, 2026
6aa362a
fix(server): bound final partition diagnostic (#3316)
imbajin Oct 12, 2026
b58a77c
refactor(server): close traversal iterators on failure (#3317)
imbajin Oct 12, 2026
68fb045
refactor(server): respect cgroup heap limits (#3320)
imbajin Oct 12, 2026
2691ae5
fix: scope SVN additions to the current Server release (#3323)
imbajin Oct 13, 2026
7a84cde
fix(server): preserve auth property strings (#3327)
imbajin Oct 13, 2026
87239c5
refactor(core): drain tasks before graph deletion (#3308)
imbajin Oct 13, 2026
8639720
fix: omit documentation images from source releases (#3328)
imbajin Oct 13, 2026
b73c13c
refactor(server): honor cgroup reclaim protection (#3325)
imbajin Oct 13, 2026
62faab7
fix(server): decode auth as UTF8 and split on the first colon (#3290)
arshilkxwork Oct 13, 2026
87097bc
docs(docker): correct the crash-file volume and directory notes (#3332)
byteayan Oct 13, 2026
c1e7aba
test: add coverage across struct, commons, server, pd, store and clus…
bitflicker64 Oct 13, 2026
b84454f
fix(cache): skip oversized offheap query keys (#3321)
imbajin Oct 13, 2026
0b7c0de
refactor(server): update arthas to 4.1.5 (#3333)
imbajin Oct 13, 2026
ce22afe
refactor: reduce runner usage and scope CI to speed up (#3337)
imbajin Oct 13, 2026
92af2f8
fix(commons): handle missing MAC addresses (#3335)
imbajin Oct 13, 2026
d168089
fix: align Java 17 runtime compatibility
imbajin Oct 14, 2026
4facf98
fix(test): compare canonical snapshot paths (#3339)
imbajin Oct 14, 2026
76ca3df
fix: preserve int map entries during resize (#3341)
imbajin Oct 14, 2026
c23c7c8
fix(server): preserve caller tx on cancel (#3340)
imbajin Oct 14, 2026
06f90a9
fix(ci): preserve selectively collected coverage (#3343)
imbajin Oct 14, 2026
e1d9c69
fix(server): sanitize Prometheus metric names (#3344)
arshilkxwork Oct 14, 2026
97a7b29
fix(server): prevent lost kout results in race-condition (#3342)
imbajin Oct 14, 2026
449beb0
refactor(server): handle SameNeighborsBatchAPI diff for client (#2825)
sadwitdastreetz Oct 14, 2026
e4934c2
refactor(server): close retained graphs on shutdown (#3347)
imbajin Oct 14, 2026
a104516
fix(store): unblock batch scan cancellation (#3345)
imbajin Oct 14, 2026
4b77b7b
feat(helm): support easy & strict mode for k8s deployment (#3338)
imbajin Oct 14, 2026
e130233
fix(test): include same-millisecond PD logs (#3353)
imbajin Oct 15, 2026
d90946d
refactor(docker): expose server discovery identity (#3322)
imbajin Oct 15, 2026
574badb
fix(server): stop duplicating /metrics families and quote statistics …
arshilkxwork Oct 15, 2026
9adfaf2
fix(store): serialize scan stream requests (#3354)
imbajin Oct 15, 2026
a0aae8e
fix(server): preserve legacy cypher errors resp (#3259)
imbajin Oct 15, 2026
0a3d0ab
feat(server): coordinate loading owners (#3331)
imbajin Oct 16, 2026
4e569a4
fix(server): allow V2 schema async tasks (#3350)
imbajin Oct 16, 2026
030396e
fix(helm): detect invalid indexes per server pod (#3349)
imbajin Oct 16, 2026
a4da5d1
refactor(pd): export per-store state and leader count gauges (#3357)
arshilkxwork Oct 16, 2026
efbf211
feat(docker): map server.urls_to_pd and server.deploy_in_k8s from env…
byteayan Oct 16, 2026
be68aa2
fix(server): bind locally loaded graphs in Gremlin Server (#3351)
byteayan Oct 16, 2026
9180d21
refactor(helm): add OCI distribution metadata (#3361)
imbajin Oct 16, 2026
6f98193
refactor(server): coordinate graph rpc lifecycle (#3329)
imbajin Oct 16, 2026
f0bc073
chore(rpc): cover last service unexport (#3364)
imbajin Oct 16, 2026
764dd73
docs(helm): align chart installation guides (#3363)
imbajin Oct 16, 2026
6b403c6
chore(helm): add official chart icon (#3365)
imbajin Oct 17, 2026
8fe1018
fix(api): allow anonymous cypher queries (#3366)
imbajin Oct 17, 2026
f5d9885
test(api): cover ORDER BY on a nullable boolean grouping key (#3367)
Mihir-Rabari Oct 17, 2026
db85924
fix(ci): append the start-server config lines only once (#3371)
bitflicker64 Oct 17, 2026
d505f6f
refactor: improve activation and local diagnosis tool (#2945)
Soyaazz Oct 17, 2026
90790e8
fix(server): keep schema ids and graphs safe on truncate and auth cle…
bitflicker64 Oct 17, 2026
c2ec570
docs: fix DeepWiki badge (#3373)
imbajin Oct 18, 2026
fd8d06c
refactor(pd): make PD reads and elections safe (#3368)
bitflicker64 Oct 19, 2026
f687e2b
fix(server): fold cypher temp-construct into bound date values (#3370)
Mihir-Rabari Oct 19, 2026
fd11593
fix(pd): report fatal raft errors through health probes (#3358)
pallavithegod Oct 19, 2026
71c03fe
fix(hstore): register the graph with PD again after clear (#3374)
arshilkxwork Oct 19, 2026
86c05ef
fix(server): reject incomplete cross-label index coverage (#3243)
contrueCT Oct 19, 2026
ef198ac
fix(pd): wait for a held metadata RocksDB lock at startup
byteayan Oct 20, 2026
1c09528
fix(pd): back off between metadata RocksDB lock retries
byteayan Oct 20, 2026
89aa82e
fix(pd): open PD metadata before Raft in every startup callback
byteayan Oct 21, 2026
68a1885
fix(pd): move RaftStartup into hg-pd-core
byteayan Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 2 additions & 8 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,10 @@ github:
protected_branches:
master:
required_status_checks:
# Keep workflows providing these checks unfiltered; path skips can leave required checks pending.
# strict means "Require PR to be up-to-date before merging". (enable when branch unstable)
strict: false
# contexts are the names of checks that must pass (now only enable the basic check)
contexts:
- Analyze (java)
- CodeQL
- check-license
- build-server (memory, 11)
- build-commons (11)
# CI remains visible but advisory while shared runner queues are constrained.
contexts: []
required_pull_request_reviews:
dismiss_stale_reviews: true
require_code_owner_reviews: false
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ continuation_indent_size = 8

[*.md]
max_line_length = off
ij_wrap_on_typing = false

[*.java]
ij_java_doc_add_p_tag_on_empty_lines = true
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ install-dist/scripts/ export-ignore
hugegraph-commons/hugegraph-dist/ export-ignore
docker/ export-ignore

# Documentation images are not needed in source releases.
/docs/images/ export-ignore

# Keep the generated golden corpus byte-identical across checkouts
hugegraph-commons/hugegraph-common/src/test/resources/longencoding-golden.txt text eol=lf
22 changes: 22 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Keep coverage from unexecuted test groups in affected-input CI reports.
flag_management:
default_rules:
carryforward: true

comment:
show_carryforward_flags: true
Binary file added .github/images/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 14 additions & 14 deletions .github/outdated/APACHE_PROPOSAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Although most of the main development of HugeGraph has been completed, there are

#### Meritocracy

HugeGraph was incubated at Baidu in 2016 and open-sourced on [GitHub](https://github.com/hugegraph/hugegraph) in 2018. The project (including sub-projects) now has 30+ contributors from many companies. Some of these contributors become committers, and the project has hundreds of known users around the world. We will follow Apache's Meritocracy way to re-organize the community roles. We have set up the PPMC Team and Committer Team. Of course, contributions are welcomed and highly valued. New contributors are guided and reviewed by existing PMC members. When an active contributor has submitted enough good patches, PMC will start a vote to promote him/her to become a member of the Committer Team or PMC Team.
HugeGraph was incubated at Baidu in 2016 and open-sourced on [GitHub](https://github.com/apache/hugegraph) in 2018. The project (including sub-projects) now has 30+ contributors from many companies. Some of these contributors become committers, and the project has hundreds of known users around the world. We will follow Apache's Meritocracy way to re-organize the community roles. We have set up the PPMC Team and Committer Team. Of course, contributions are welcomed and highly valued. New contributors are guided and reviewed by existing PMC members. When an active contributor has submitted enough good patches, PMC will start a vote to promote him/her to become a member of the Committer Team or PMC Team.

#### Community

Expand All @@ -52,7 +52,7 @@ HugeGraph implements the API of [Apache TinkerPop](https://tinkerpop.apache.org/

#### Project Name

We have checked and believe the name is [suitable](https://github.com/hugegraph/hugegraph/issues/1646) and the project has legal permission to continue using its current name. There are no other projects found using this name through Google Search.
We have checked and believe the name is [suitable](https://github.com/apache/hugegraph/issues/1646) and the project has legal permission to continue using its current name. There are no other projects found using this name through Google Search.

#### Relationship with Titan/Janus Graph

Expand Down Expand Up @@ -94,10 +94,10 @@ HugeGraph documentation is provided on https://hugegraph.github.io/hugegraph-doc

This project consists of 2 core sub-projects and 2 other sub-projects, all of which are hosted by [GitHub hugegraph organization](https://github.com/orgs/hugegraph/repositories) since 2018. The codes are already under Apache License Version 2.0. The git address of sub-project repositories are as follows:

1. The graph database repository `hugegraph`, core sub-project, including graph server, graph engine, and graph storage: https://github.com/hugegraph/hugegraph
2. The graph computing repository `hugegraph-computer`, core sub-project, including graph computing and graph algorithms: https://github.com/hugegraph/hugegraph-computer
3. The common functions repository `hugegraph-commons`: https://github.com/hugegraph/hugegraph-commons
4. The ecosystem repository `hugegraph-toolchain`, including `hugegraph-client`, `hugegraph-loader`, `hugegraph-tools`, `hugegraph-hubble`, `hugegraph-test`, `hugegraph-doc`: https://github.com/hugegraph/hugegraph-toolchain
1. The graph database repository `hugegraph`, core sub-project, including graph server, graph engine, and graph storage: https://github.com/apache/hugegraph
2. The graph computing repository `hugegraph-computer`, core sub-project, including graph computing and graph algorithms: https://github.com/apache/hugegraph-computer
3. The common functions repository `hugegraph-commons`: https://github.com/apache/hugegraph/tree/master/hugegraph-commons
4. The ecosystem repository `hugegraph-toolchain`, including `hugegraph-client`, `hugegraph-loader`, `hugegraph-tools`, `hugegraph-hubble`, `hugegraph-test`, `hugegraph-doc`: https://github.com/apache/hugegraph-toolchain

### Source and Intellectual Property Submission Plan

Expand All @@ -107,7 +107,7 @@ The code is currently under Apache License Version 2.0, and it was verified ther

As all dependencies are managed by Apache Maven, none of the external libraries need to be packaged in a source distribution. All dependencies have Apache compatible licenses except for 4 dependencies: MySQL Connector (GPL), word (GPL), JBoss Logging 3 (LGPL), and jnr-posix (LGPL+GPL), we will remove these dependencies in the future.

HugeGraph has the following external [dependencies](https://github.com/hugegraph/hugegraph/issues/1632):
HugeGraph has the following external [dependencies](https://github.com/apache/hugegraph/issues/1632):

- Apache License

Expand Down Expand Up @@ -263,26 +263,26 @@ None

- hugegraph-dev: [dev@hugegraph.incubator.apache.org](mailto:dev@hugegraph.incubator.apache.org) for development and users discussions.
- hugegraph-private: [private@hugegraph.incubator.apache.org](mailto:private@hugegraph.incubator.apache.org) for PPMC discussions.
- hugegraph-commits: [commits@hugegraph.incubator.apache.org](mailto:commits@hugegraph.incubator.apache.org) for commits / [pull requests](https://github.com/hugegraph/hugegraph/pulls) and other notifications like code review comments.
- hugegraph-commits: [commits@hugegraph.incubator.apache.org](mailto:commits@hugegraph.incubator.apache.org) for commits / [pull requests](https://github.com/apache/hugegraph/pulls) and other notifications like code review comments.

#### Subversion Directory

None

#### Git Repositories

1. `hugegraph`: https://github.com/hugegraph/hugegraph.git
2. `hugegraph-computer`: https://github.com/hugegraph/hugegraph-computer.git
3. `hugegraph-commons`: https://github.com/hugegraph/hugegraph-commons.git
4. `hugegraph-toolchain`: https://github.com/hugegraph/hugegraph-toolchain.git
1. `hugegraph`: https://github.com/apache/hugegraph.git
2. `hugegraph-computer`: https://github.com/apache/hugegraph-computer.git
3. `hugegraph-commons`: https://github.com/apache/hugegraph.git
4. `hugegraph-toolchain`: https://github.com/apache/hugegraph-toolchain.git

#### Issue Tracking

The community would like to continue using [GitHub Issues](https://github.com/hugegraph/hugegraph/issues) (but will move to github.com/apache/).
The community would like to continue using [GitHub Issues](https://github.com/apache/hugegraph/issues) (but will move to github.com/apache/).

#### Other Resources

- The community has already chosen [GitHub actions](https://github.com/hugegraph/hugegraph/actions) as continuous integration tools.
- The community has already chosen [GitHub actions](https://github.com/apache/hugegraph/actions) as continuous integration tools.
- The community has already used [codecov](https://github.com/marketplace/codecov) to check code coverage.
- The community has already used [mvn repository](https://mvnrepository.com/search?q=hugegraph) as binary package release platform.

Expand Down
4 changes: 2 additions & 2 deletions .github/outdated/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: '.github/cla-signatures/cla.json'
path-to-document: 'https://github.com/hugegraph/hugegraph-doc/blob/master/CLA.md' # e.g. a CLA or a DCO document
custom-allsigned-prcomment: '**Good**! All Contributors have signed the [CLA](https://github.com/hugegraph/hugegraph-doc/blob/master/CLA.md).'
path-to-document: 'https://www.apache.org/licenses/contributor-agreements.html' # e.g. a CLA or a DCO document
custom-allsigned-prcomment: '**Good**! All Contributors have signed the [CLA](https://www.apache.org/licenses/contributor-agreements.html).'
# branch should not be protected
branch: 'cla-assist'
allowlist: bot*
Expand Down
103 changes: 103 additions & 0 deletions .github/scripts/check-docker-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set -euo pipefail
: "${IMAGE_TAG:?set the unique CI image tag}"
for pair in \
hugegraph-pd/Dockerfile=hugegraph/pd \
hugegraph-store/Dockerfile=hugegraph/store \
hugegraph-server/Dockerfile=hugegraph/hugegraph \
hugegraph-server/Dockerfile-hstore=hugegraph/server; do
(
dockerfile="${pair%%=*}"
IMAGE_ID=$(docker image inspect --format '{{.Id}}' "${pair#*=}:${IMAGE_TAG}")
echo "Checking ${pair#*=}:${IMAGE_TAG} ($IMAGE_ID)"
HC=$(docker image inspect --format '{{json .Config.Healthcheck}}' "$IMAGE_ID")
[[ "$HC" != null ]] || { echo "Missing HEALTHCHECK: $dockerfile"; exit 1; }

# Helm reuses these images for tool containers instead of pulling curlimages/curl.
# Check the same non-root/read-only tool environment as the Server test hook.
if [[ "$dockerfile" == hugegraph-store/* || "$dockerfile" == hugegraph-server/* ]]; then
HELM_TOOLS=(curl tr date sleep)
if [[ "$dockerfile" == hugegraph-server/* ]]; then
HELM_TOOLS+=(getent base64 awk grep sort tail)
fi
docker run --rm --pull never --read-only --user 100:101 --entrypoint sh "$IMAGE_ID" -c '
for tool in "$@"; do
command -v "$tool" >/dev/null || {
echo "Missing Helm tool: $tool" >&2
exit 1
}
case "$tool" in
getent) getent ahosts localhost >/dev/null ;;
base64) test "$(printf Helm | base64 | tr -d "\n")" = SGVsbQ== ;;
esac
done
curl --version >/dev/null
' helm-tools "${HELM_TOOLS[@]}"
fi

JAVA_VERSION=$(docker run --rm --pull never --entrypoint java "$IMAGE_ID" -version 2>&1)
echo "$JAVA_VERSION"
grep -Eq 'version "17\.' <<< "$JAVA_VERSION" || {
echo "ERROR: expected a Java 17 runtime in $dockerfile"
exit 1
}

if [[ "$dockerfile" == hugegraph-server/* ]]; then
STATE=$(docker run --rm --pull never "$IMAGE_ID" bash -c \
'source /hugegraph-server/bin/util.sh && port_listen_state 8080')
echo "port_listen_state 8080 -> $STATE"
# Require a usable answer from the socket-table tool in the image.
[[ "$STATE" == "free" || "$STATE" == "busy" ]] || {
echo "ERROR: no usable socket-table tool (ss/netstat) in $dockerfile"
exit 1
}
fi

if [[ "$dockerfile" == hugegraph-server/* ]]; then
CHECK_DIR=$(mktemp -d)
trap 'rm -rf "$CHECK_DIR"' EXIT
docker run --rm --pull never --entrypoint bash \
-v "$CHECK_DIR:/check" "$IMAGE_ID" -c \
'cp /hugegraph-server/lib/hugegraph-api-*.jar \
/hugegraph-server/lib/hugegraph-common-*.jar /check/'

API_JAR=$(find "$CHECK_DIR" -name 'hugegraph-api-*.jar' -print -quit)
COMMON_JAR=$(find "$CHECK_DIR" -name 'hugegraph-common-*.jar' -print -quit)
EXPECTED_MANIFEST=$(sed -n \
's|.*<Implementation-Version>\([^<]*\)</Implementation-Version>.*|\1|p' \
hugegraph-server/hugegraph-api/pom.xml)
ACTUAL_MANIFEST=$(unzip -p "$API_JAR" META-INF/MANIFEST.MF |
sed -n 's/^Implementation-Version: *//p' | tr -d '\r')
EXPECTED_PROPERTY=$(sed -n 's/^ApiVersion=//p' \
hugegraph-commons/hugegraph-common/src/main/resources/version.properties)
ACTUAL_PROPERTY=$(unzip -p "$COMMON_JAR" version.properties |
sed -n 's/^ApiVersion=//p' | tr -d '\r')

[[ "$ACTUAL_MANIFEST" == "$EXPECTED_MANIFEST" ]] || {
echo "ERROR: API manifest is $ACTUAL_MANIFEST; expected $EXPECTED_MANIFEST"
exit 1
}
[[ "$ACTUAL_PROPERTY" == "$EXPECTED_PROPERTY" ]] || {
echo "ERROR: API property is $ACTUAL_PROPERTY; expected $EXPECTED_PROPERTY"
exit 1
}
fi
)
done
Loading
Loading