From c522d7349d2ce0b96c29b9d74d6e3cf4e1de9148 Mon Sep 17 00:00:00 2001 From: dark Date: Tue, 25 Aug 2026 12:19:25 +0800 Subject: [PATCH 1/9] perf(docker): share reactor build across images --- .github/workflows/docker-build-ci.yml | 60 +++++++++++++ docker-bake.hcl | 116 ++++++++++++++++++++++++++ docker/README.md | 4 + hugegraph-pd/Dockerfile | 5 +- hugegraph-server/Dockerfile | 5 +- hugegraph-server/Dockerfile-hstore | 5 +- hugegraph-store/Dockerfile | 5 +- 7 files changed, 192 insertions(+), 8 deletions(-) create mode 100644 docker-bake.hcl diff --git a/.github/workflows/docker-build-ci.yml b/.github/workflows/docker-build-ci.yml index ada012be80..052fe1cfa1 100644 --- a/.github/workflows/docker-build-ci.yml +++ b/.github/workflows/docker-build-ci.yml @@ -25,11 +25,71 @@ on: pull_request: paths: - '**/Dockerfile*' + - 'docker-bake.hcl' - '.dockerignore' - 'hugegraph-server/hugegraph-dist/docker/**' - 'hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh' jobs: + docker-bake-check: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Verify shared Maven stages stay identical + shell: bash + run: | + set -euo pipefail + + extract_build_stage() { + awk ' + /^FROM .* AS build$/ { + in_build = 1 + } + in_build && seen && /^FROM / { + exit + } + in_build { + print + seen = 1 + } + ' "$1" + } + + reference="hugegraph-pd/Dockerfile" + for dockerfile in \ + hugegraph-store/Dockerfile \ + hugegraph-server/Dockerfile \ + hugegraph-server/Dockerfile-hstore; do + diff -u \ + <(extract_build_stage "$reference") \ + <(extract_build_stage "$dockerfile") + done + + - name: Validate shared image build graph + run: | + set -euo pipefail + + docker buildx bake --print > /tmp/hugegraph-bake.json + jq -e ' + .group.default.targets == [ + "build-cache", + "pd", + "server-hstore", + "server-standalone", + "store" + ] and + ([.target[] | .platforms] | + all(. == ["linux/amd64", "linux/arm64"])) and + .target["build-cache"].target == "build" and + .target["build-cache"].output[0].type == "cacheonly" and + ([.target | to_entries[] | + select(.key != "build-cache") | + .value.output[0].type] | + all(. == "docker")) + ' /tmp/hugegraph-bake.json + docker-build: runs-on: ubuntu-24.04 strategy: diff --git a/docker-bake.hcl b/docker-bake.hcl new file mode 100644 index 0000000000..94fe0981c4 --- /dev/null +++ b/docker-bake.hcl @@ -0,0 +1,116 @@ +# 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. + +variable "MAVEN_ARGS" { + default = "" +} + +variable "SOURCE_REVISION" { + default = "local" +} + +variable "IMAGE_TAG" { + default = "local" +} + +variable "CACHE_CHANNEL" { + default = "latest" +} + +variable "EXPORT_CACHE" { + default = false +} + +target "_common" { + context = "." + args = { + MAVEN_ARGS = MAVEN_ARGS + SOURCE_REVISION = SOURCE_REVISION + } + platforms = [ + "linux/amd64", + "linux/arm64", + ] +} + +target "build-cache" { + inherits = ["_common"] + dockerfile = "hugegraph-pd/Dockerfile" + target = "build" + output = ["type=cacheonly"] + cache-from = [ + "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", + "type=registry,ref=hugegraph/pd:buildcache-${CACHE_CHANNEL}", + ] + cache-to = EXPORT_CACHE ? [ + "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL},mode=max", + ] : [] +} + +target "pd" { + inherits = ["_common"] + dockerfile = "hugegraph-pd/Dockerfile" + tags = ["hugegraph/pd:${IMAGE_TAG}"] + output = ["type=docker"] + cache-from = [ + "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", + "type=registry,ref=hugegraph/pd:buildcache-${CACHE_CHANNEL}", + ] +} + +target "store" { + inherits = ["_common"] + dockerfile = "hugegraph-store/Dockerfile" + tags = ["hugegraph/store:${IMAGE_TAG}"] + output = ["type=docker"] + cache-from = [ + "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", + "type=registry,ref=hugegraph/store:buildcache-${CACHE_CHANNEL}", + ] +} + +target "server-hstore" { + inherits = ["_common"] + dockerfile = "hugegraph-server/Dockerfile-hstore" + tags = ["hugegraph/server:${IMAGE_TAG}"] + output = ["type=docker"] + cache-from = [ + "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", + "type=registry,ref=hugegraph/server:buildcache-${CACHE_CHANNEL}", + ] +} + +target "server-standalone" { + inherits = ["_common"] + dockerfile = "hugegraph-server/Dockerfile" + tags = ["hugegraph/hugegraph:${IMAGE_TAG}"] + output = ["type=docker"] + cache-from = [ + "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", + "type=registry,ref=hugegraph/hugegraph:buildcache-${CACHE_CHANNEL}", + ] +} + +group "default" { + targets = [ + "build-cache", + "pd", + "store", + "server-hstore", + "server-standalone", + ] +} diff --git a/docker/README.md b/docker/README.md index 0ee1f586b6..636e3b13e0 100644 --- a/docker/README.md +++ b/docker/README.md @@ -97,6 +97,10 @@ Builds images locally from source Dockerfiles. Best for **developers** who want Build the matching `hugegraph-toolchain` Hubble source as `local/hugegraph-hubble:dev` before starting this stack. +The publishing pipeline uses the repository-root `docker-bake.hcl` to compile +the Java reactor once and build the PD, Store, HStore Server, and standalone +Server runtime images from that shared result. + ```bash ( cd docker diff --git a/hugegraph-pd/Dockerfile b/hugegraph-pd/Dockerfile index 68e6e2555b..ca526b7757 100644 --- a/hugegraph-pd/Dockerfile +++ b/hugegraph-pd/Dockerfile @@ -25,9 +25,10 @@ WORKDIR /pkg COPY . . ARG MAVEN_ARGS +ARG SOURCE_REVISION=local -RUN --mount=type=cache,target=/root/.m2 \ - mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ +RUN --mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked \ + mvn install $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ && rm ./hugegraph-server/*.tar.gz ./hugegraph-pd/*.tar.gz ./hugegraph-store/*.tar.gz # 2nd stage: runtime env diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index 5caadd23cb..44bc9aa515 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -25,9 +25,10 @@ WORKDIR /pkg COPY . . ARG MAVEN_ARGS +ARG SOURCE_REVISION=local -RUN --mount=type=cache,target=/root/.m2 \ - mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ +RUN --mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked \ + mvn install $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ && rm ./hugegraph-server/*.tar.gz ./hugegraph-pd/*.tar.gz ./hugegraph-store/*.tar.gz # 2nd stage: runtime env diff --git a/hugegraph-server/Dockerfile-hstore b/hugegraph-server/Dockerfile-hstore index 7cd64e8f3b..fc99034728 100644 --- a/hugegraph-server/Dockerfile-hstore +++ b/hugegraph-server/Dockerfile-hstore @@ -25,9 +25,10 @@ WORKDIR /pkg COPY . . ARG MAVEN_ARGS +ARG SOURCE_REVISION=local -RUN --mount=type=cache,target=/root/.m2 \ - mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true \ +RUN --mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked \ + mvn install $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ && rm ./hugegraph-server/*.tar.gz ./hugegraph-pd/*.tar.gz ./hugegraph-store/*.tar.gz # 2nd stage: runtime env diff --git a/hugegraph-store/Dockerfile b/hugegraph-store/Dockerfile index f1b9db5fd4..90b5228a1a 100644 --- a/hugegraph-store/Dockerfile +++ b/hugegraph-store/Dockerfile @@ -25,9 +25,10 @@ WORKDIR /pkg COPY . . ARG MAVEN_ARGS +ARG SOURCE_REVISION=local -RUN --mount=type=cache,target=/root/.m2 \ - mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ +RUN --mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked \ + mvn install $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \ && rm ./hugegraph-server/*.tar.gz ./hugegraph-pd/*.tar.gz ./hugegraph-store/*.tar.gz # 2nd stage: runtime env From 9fd092af9f50232537f251671de46ac9c2196265 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 01:41:06 +0800 Subject: [PATCH 2/9] fix(docker): validate shared build contract - reject an empty shared-stage extraction - document the containerd load-before-push path - keep the evaluated Bake graph unchanged --- .github/workflows/docker-build-ci.yml | 4 ++++ docker-bake.hcl | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/docker-build-ci.yml b/.github/workflows/docker-build-ci.yml index 0b278b4ea5..ccaab80356 100644 --- a/.github/workflows/docker-build-ci.yml +++ b/.github/workflows/docker-build-ci.yml @@ -67,6 +67,10 @@ jobs: } reference="hugegraph-pd/Dockerfile" + if [ -z "$(extract_build_stage "$reference")" ]; then + echo "ERROR: no 'AS build' stage found in $reference" + exit 1 + fi for dockerfile in \ hugegraph-store/Dockerfile \ hugegraph-server/Dockerfile \ diff --git a/docker-bake.hcl b/docker-bake.hcl index 94fe0981c4..47e62f85ba 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -61,6 +61,9 @@ target "build-cache" { ] : [] } +# Runtime targets intentionally use Docker's local exporter. The publishing +# workflow enables the containerd image store, verifies both loaded platforms, +# runs functional checks against these exact tags, and only then pushes them. target "pd" { inherits = ["_common"] dockerfile = "hugegraph-pd/Dockerfile" From dff7bf173a5be1a9aca87ee30bf14ab259cf5df1 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 02:15:05 +0800 Subject: [PATCH 3/9] fix(docker): persist runtime image cache - export runtime layers to per-image registry caches - keep shared Maven cache export isolated - avoid broad Dockerfile CI path matching --- .github/workflows/docker-build-ci.yml | 1 - docker-bake.hcl | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-ci.yml b/.github/workflows/docker-build-ci.yml index ccaab80356..a3a1ed733d 100644 --- a/.github/workflows/docker-build-ci.yml +++ b/.github/workflows/docker-build-ci.yml @@ -25,7 +25,6 @@ on: pull_request: paths: - '.github/workflows/docker-build-ci.yml' - - '**/Dockerfile*' - 'docker-bake.hcl' - '.dockerignore' - '.mvn/**' diff --git a/docker-bake.hcl b/docker-bake.hcl index 47e62f85ba..da98fa9ace 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -73,6 +73,9 @@ target "pd" { "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", "type=registry,ref=hugegraph/pd:buildcache-${CACHE_CHANNEL}", ] + cache-to = EXPORT_CACHE ? [ + "type=registry,ref=hugegraph/pd:buildcache-${CACHE_CHANNEL},mode=min", + ] : [] } target "store" { @@ -84,6 +87,9 @@ target "store" { "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", "type=registry,ref=hugegraph/store:buildcache-${CACHE_CHANNEL}", ] + cache-to = EXPORT_CACHE ? [ + "type=registry,ref=hugegraph/store:buildcache-${CACHE_CHANNEL},mode=min", + ] : [] } target "server-hstore" { @@ -95,6 +101,9 @@ target "server-hstore" { "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", "type=registry,ref=hugegraph/server:buildcache-${CACHE_CHANNEL}", ] + cache-to = EXPORT_CACHE ? [ + "type=registry,ref=hugegraph/server:buildcache-${CACHE_CHANNEL},mode=min", + ] : [] } target "server-standalone" { @@ -106,6 +115,9 @@ target "server-standalone" { "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}", "type=registry,ref=hugegraph/hugegraph:buildcache-${CACHE_CHANNEL}", ] + cache-to = EXPORT_CACHE ? [ + "type=registry,ref=hugegraph/hugegraph:buildcache-${CACHE_CHANNEL},mode=min", + ] : [] } group "default" { From 22d940772ec148c2c3046aea212f239ede20dd77 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 13:15:40 +0800 Subject: [PATCH 4/9] chore(docker): align CI runner and README style - use ubuntu-latest for Docker CI jobs - keep Docker README prose on single lines - preserve code blocks, tables, and document structure --- .github/workflows/docker-build-ci.yml | 4 +- docker/README.md | 72 ++++++--------------------- 2 files changed, 18 insertions(+), 58 deletions(-) diff --git a/.github/workflows/docker-build-ci.yml b/.github/workflows/docker-build-ci.yml index a3a1ed733d..89fa2bf4a6 100644 --- a/.github/workflows/docker-build-ci.yml +++ b/.github/workflows/docker-build-ci.yml @@ -40,7 +40,7 @@ on: jobs: docker-bake-check: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -103,7 +103,7 @@ jobs: ' /tmp/hugegraph-bake.json docker-build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: diff --git a/docker/README.md b/docker/README.md index 636e3b13e0..9258690fff 100644 --- a/docker/README.md +++ b/docker/README.md @@ -23,8 +23,7 @@ This directory contains Docker Compose files for running HugeGraph: Two compose files run one PD, one Store, one Server, and one Hubble instance: -Create a Compose environment file once so every lifecycle command can resolve -the required administrator password: +Create a Compose environment file once so every lifecycle command can resolve the required administrator password: ```bash ( @@ -56,18 +55,11 @@ the required administrator password: ) ``` -Compose automatically reads `docker/.env` for `up`, `ps`, `stop`, and `down`. -The generated password is a 16-character, Compose-safe random value. The file -is excluded from Git and Docker build contexts; keep its permissions restricted -and source production credentials from your secret manager instead of -committing them. +Compose automatically reads `docker/.env` for `up`, `ps`, `stop`, and `down`. The generated password is a 16-character, Compose-safe random value. The file is excluded from Git and Docker build contexts; keep its permissions restricted and source production credentials from your secret manager instead of committing them. ### Option A: Quick Start (pre-built images) -Uses pre-built images from Docker Hub. Best for **end users** who want to run HugeGraph quickly. -Set `HUGEGRAPH_VERSION` to the same published release for PD, Store, Server, -and Hubble. The authenticated PD/Hubble integration is not present in `1.7.x`; -if no later compatible release is available, use Option B. +Uses pre-built images from Docker Hub. Best for **end users** who want to run HugeGraph quickly. Set `HUGEGRAPH_VERSION` to the same published release for PD, Store, Server, and Hubble. The authenticated PD/Hubble integration is not present in `1.7.x`; if no later compatible release is available, use Option B. ```bash ( @@ -77,29 +69,21 @@ if no later compatible release is available, use Option B. ) ``` -- Images: matching `hugegraph/pd`, `hugegraph/store`, `hugegraph/server`, and - `hugegraph/hubble` tags from the selected compatible release +- Images: matching `hugegraph/pd`, `hugegraph/store`, `hugegraph/server`, and `hugegraph/hubble` tags from the selected compatible release - `pull_policy: always` — always pulls the specified image tag -> **Note**: Do not use `latest` to claim a reproducible deployment. Pin a -> compatible release tag and keep it unchanged for later lifecycle commands. +> **Note**: Do not use `latest` to claim a reproducible deployment. Pin a compatible release tag and keep it unchanged for later lifecycle commands. - PD healthcheck endpoint: `/v1/health` -- Hubble is available at `http://localhost:8088`; sign in as `admin` with the - required `HUGEGRAPH_ADMIN_PASSWORD` -- Hubble binds to host loopback by default. Set `HUBBLE_PUBLISH_HOST` - explicitly only behind an HTTPS reverse proxy and trusted network controls. +- Hubble is available at `http://localhost:8088`; sign in as `admin` with the required `HUGEGRAPH_ADMIN_PASSWORD` +- Hubble binds to host loopback by default. Set `HUBBLE_PUBLISH_HOST` explicitly only behind an HTTPS reverse proxy and trusted network controls. - Hubble uses PD discovery and the Docker-network Server address - Server healthcheck endpoint: `/versions` ### Option B: Development Build (build from source) -Builds images locally from source Dockerfiles. Best for **developers** who want to test local changes. -Build the matching `hugegraph-toolchain` Hubble source as -`local/hugegraph-hubble:dev` before starting this stack. +Builds images locally from source Dockerfiles. Best for **developers** who want to test local changes. Build the matching `hugegraph-toolchain` Hubble source as `local/hugegraph-hubble:dev` before starting this stack. -The publishing pipeline uses the repository-root `docker-bake.hcl` to compile -the Java reactor once and build the PD, Store, HStore Server, and standalone -Server runtime images from that shared result. +The publishing pipeline uses the repository-root `docker-bake.hcl` to compile the Java reactor once and build the PD, Store, HStore Server, and standalone Server runtime images from that shared result. ```bash ( @@ -112,8 +96,7 @@ Server runtime images from that shared result. - PD, Store, and Server images are built from this repository - Hubble uses `HUBBLE_IMAGE` because its source is in `hugegraph-toolchain` -- Server entrypoint scripts are baked into the built image; Hubble mounts the - Docker-local PD configuration +- Server entrypoint scripts are baked into the built image; Hubble mounts the Docker-local PD configuration - PD healthcheck endpoint: `/v1/health` - Otherwise identical env vars and structure to the quickstart file @@ -269,27 +252,11 @@ Configuration is injected via environment variables. The old `docker/configs/app | `PASSWORD` | No | — | Enables auth and sets `auth.admin_pa` | Initial administrator password; disabled init-store does not read it from stdin, but the entrypoint still applies it to the PD bootstrap path | | `HG_SERVER_INIT_STORE_ENABLED` | No | `true` | `init_store.enabled` in `rest-server.properties` | Set `false` in PD/HStore deployments so init-store skips local backend and admin initialization | -> **The built-in authenticator with `HG_SERVER_INIT_STORE_ENABLED=false` -> requires `usePD=true` and an HStore-backed `auth.graph_store`, unless -> `auth.remote_url` delegates auth elsewhere.** With init-store skipped, the -> server creates the built-in admin in PD metadata, and only an HStore auth -> graph uses the PD-backed auth manager that can read that account. init-store -> exits non-zero when the combination is unusable, rather than leaving a server -> nobody can log in to. A custom `auth.authenticator` is exempt because it -> manages its own identities. +> **The built-in authenticator with `HG_SERVER_INIT_STORE_ENABLED=false` requires `usePD=true` and an HStore-backed `auth.graph_store`, unless `auth.remote_url` delegates auth elsewhere.** With init-store skipped, the server creates the built-in admin in PD metadata, and only an HStore auth graph uses the PD-backed auth manager that can read that account. init-store exits non-zero when the combination is unusable, rather than leaving a server nobody can log in to. A custom `auth.authenticator` is exempt because it manages its own identities. > -> `docker/init_complete` is written by init-store itself, and only after it has -> initialized. A skipped run therefore records nothing, whether it was disabled -> by the variable or by the property in a mounted `rest-server.properties`, so a -> later re-enable is still able to initialize. The marker only short-circuits -> re-initialization: init-store runs on every container start, and a disabled -> one performs the fail-closed check above first, so a marker left by an -> earlier release or an earlier enabled run cannot bypass it. +> `docker/init_complete` is written by init-store itself, and only after it has initialized. A skipped run therefore records nothing, whether it was disabled by the variable or by the property in a mounted `rest-server.properties`, so a later re-enable is still able to initialize. The marker only short-circuits re-initialization: init-store runs on every container start, and a disabled one performs the fail-closed check above first, so a marker left by an earlier release or an earlier enabled run cannot bypass it. > -> The entrypoint maps **`PASSWORD` to `auth.admin_pa`** before init-store runs. -> A disabled init-store does not read the password from standard input, but the -> PD startup path uses the explicit `auth.admin_pa` value when it first creates -> the administrator. Changing it later does not rotate an existing password. +> The entrypoint maps **`PASSWORD` to `auth.admin_pa`** before init-store runs. A disabled init-store does not read the password from standard input, but the PD startup path uses the explicit `auth.admin_pa` value when it first creates the administrator. Changing it later does not rotate an existing password. The single-node Compose files also accept these deployment-level overrides: @@ -303,11 +270,7 @@ The single-node Compose files also accept these deployment-level overrides: | `HUGEGRAPH_ADMIN_PASSWORD` | required (`docker/.env`) | Initial admin password; no public default is provided | | `HUGEGRAPH_AUTH_TOKEN_SECRET` | generated | JWT signing secret; explicit values must be at least 32 bytes | -When authentication is enabled and no token secret is supplied, the Server -entrypoint generates a random secret and writes it to both authentication -configurations. The value is reused on container restart while the container -filesystem is preserved. To preserve tokens across container recreation, -generate a compatible secret once and add it to the mode-600 `docker/.env`: +When authentication is enabled and no token secret is supplied, the Server entrypoint generates a random secret and writes it to both authentication configurations. The value is reused on container restart while the container filesystem is preserved. To preserve tokens across container recreation, generate a compatible secret once and add it to the mode-600 `docker/.env`: ```bash ( @@ -352,8 +315,7 @@ generate a compatible secret once and add it to the mode-600 `docker/.env`: ) ``` -The entrypoint rejects shorter explicit values before changing either Server -configuration file. +The entrypoint rejects shorter explicit values before changing either Server configuration file. **Deprecated aliases** (still work but log a warning): @@ -366,9 +328,7 @@ configuration file. ## Port Reference -The table below reflects the published host ports in `docker-compose-3pd-3store-3server.yml`. -The single-node Compose file publishes `8620`, `8520`, `8080`, and Hubble -`8088`; Hubble defaults to host loopback. +The table below reflects the published host ports in `docker-compose-3pd-3store-3server.yml`. The single-node Compose file publishes `8620`, `8520`, `8080`, and Hubble `8088`; Hubble defaults to host loopback. | Service | Container Port | Host Port | Protocol | Purpose | |---------|---------------|-----------|----------|---------| From 35fbf7c819db375225abffb50c40adddde160190 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 13:26:30 +0800 Subject: [PATCH 5/9] refactor(docker): move Bake config under docker - move the Bake definition to docker/bake.hcl - update Docker CI to use the explicit file path - document root-level inspection and build commands --- .github/workflows/docker-build-ci.yml | 4 ++-- docker/README.md | 12 +++++++++++- docker-bake.hcl => docker/bake.hcl | 0 3 files changed, 13 insertions(+), 3 deletions(-) rename docker-bake.hcl => docker/bake.hcl (100%) diff --git a/.github/workflows/docker-build-ci.yml b/.github/workflows/docker-build-ci.yml index 89fa2bf4a6..706ae52d56 100644 --- a/.github/workflows/docker-build-ci.yml +++ b/.github/workflows/docker-build-ci.yml @@ -25,7 +25,7 @@ on: pull_request: paths: - '.github/workflows/docker-build-ci.yml' - - 'docker-bake.hcl' + - 'docker/bake.hcl' - '.dockerignore' - '.mvn/**' - 'pom.xml' @@ -83,7 +83,7 @@ jobs: run: | set -euo pipefail - docker buildx bake --print > /tmp/hugegraph-bake.json + docker buildx bake --file docker/bake.hcl --print > /tmp/hugegraph-bake.json jq -e ' .group.default.targets == [ "build-cache", diff --git a/docker/README.md b/docker/README.md index 9258690fff..5cf2ab7fa9 100644 --- a/docker/README.md +++ b/docker/README.md @@ -83,7 +83,17 @@ Uses pre-built images from Docker Hub. Best for **end users** who want to run Hu Builds images locally from source Dockerfiles. Best for **developers** who want to test local changes. Build the matching `hugegraph-toolchain` Hubble source as `local/hugegraph-hubble:dev` before starting this stack. -The publishing pipeline uses the repository-root `docker-bake.hcl` to compile the Java reactor once and build the PD, Store, HStore Server, and standalone Server runtime images from that shared result. +The publishing pipeline uses `docker/bake.hcl` from the repository root to compile the Java reactor once and build the PD, Store, HStore Server, and standalone Server runtime images from that shared result. + +Run Bake commands from the repository root. Use `--print` to inspect the resolved targets without building, or run the default group to build all four amd64/arm64 images. Loading both platforms under the same local tags requires Docker's containerd image store. + +```bash +# Inspect the resolved build graph +docker buildx bake --file docker/bake.hcl --print + +# Build the default multi-platform target group +IMAGE_TAG=local docker buildx bake --file docker/bake.hcl +``` ```bash ( diff --git a/docker-bake.hcl b/docker/bake.hcl similarity index 100% rename from docker-bake.hcl rename to docker/bake.hcl From ae8e3645e39c1bc3085eb3ccaf798727b8b6c3d1 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 13:32:44 +0800 Subject: [PATCH 6/9] chore: relocate contributor docs - move build and contribution guides under docs - update repository links to the new paths - remove tracked IntelliJ metadata and ignore .idea --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .gitignore | 4 +-- .idea/icon.png | Bin 8450 -> 0 bytes .idea/vcs.xml | 37 ------------------------ .serena/memories/key_file_locations.md | 2 +- .serena/project.yml | 2 +- README.md | 8 ++--- BUILDING.md => docs/BUILDING.md | 0 CONTRIBUTING.md => docs/CONTRIBUTING.md | 0 9 files changed, 8 insertions(+), 47 deletions(-) delete mode 100644 .idea/icon.png delete mode 100644 .idea/vcs.xml rename BUILDING.md => docs/BUILDING.md (100%) rename CONTRIBUTING.md => docs/CONTRIBUTING.md (100%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 488a778b6b..2a8a408a98 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,7 +2,7 @@ Thank you very much for contributing to Apache HugeGraph, we are happy that you want to help us improve it! Here are some tips for you: - 1. If this is your first time, please read the [contributing guidelines](https://github.com/apache/hugegraph/blob/master/CONTRIBUTING.md) + 1. If this is your first time, please read the [contributing guidelines](https://github.com/apache/hugegraph/blob/master/docs/CONTRIBUTING.md) 2. If a PR fix/close an issue, type the message "close xxx" (xxx is the link of related issue) in the content, GitHub will auto link it (Required) diff --git a/.gitignore b/.gitignore index 972d89d355..e1f546810f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,7 @@ gen-java .svn ### IntelliJ IDEA ### -.idea/* -!.idea/vcs.xml -!.idea/icon.png +.idea/ *.iws *.iml *.ipr diff --git a/.idea/icon.png b/.idea/icon.png deleted file mode 100644 index 33fb271cf1f0f8c9a0901d4e1486e9adf3613a2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8450 zcmV+dA^qNoP)PyA07*naRCr$PT?=#@)tUbPksR9)o-L2=vW;x>NCTvSP!2hTMur3og>Kr?ZD>!4 zofMKZTOcj41OiqlO(@TnQWEFoWY0p{rMraE5{H+?wp;p0Qnw2skcSm;s1wMGIF=(z z^RMom8EIxTBh8FvQ}uK>%<-gLRGhLwq%3E)QnaAJ{7w+T>n@3!gqVUg`vu3iC_<*q7i!G`wa6cSSp z1LB$P9GMpFm|lIiJ8czir2?$NeN^%i^=Gl6-a$kU*{oK$IO1;-so;%0-^P7~3l~>n*Z^yBQ#{1FYIa9$thg@ow)ScN z-h1rG)qVmS z^Qw@M1el0G&A_KV3DoZdWbjvQDFBEPAoF{o zLk+U}6-Od~*y`bp@7gha#04I<&zmk=V9D&nZh#Rh<>@yq@Fa+3Uj(#@Kv*zT0IOe- zSOW-CJ-qS#!9dm7?@q&A9v-9ofVH?O9!7vx1PZg?1rY(J|B!(TLC$B*RVoFQUd{O| zHGn`75rmS5$-0$^-y^^TFK>DP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zO73u(FjS_G z<@5dM?Uh@AJ|4|<79rIgcyONOX&D>$t89w;0$BA7Sj6VI{59IMb3S|D{biS!*u@wt zdf<_}hBaIHNn@3rF{-DI13O-fCJt>42ZU7JfgcZVw(Y3G0=C6;tU+o&$zjI$dIl_#Gayw9QF%sWnS9>6 zdF|SRkAD5jWlp@VoxWcf%hN5vUF)qp4SoFnh97+x`TSj_I953v!ymv}J|L}bc59=n zA!ujMU!S|7?}@2DFNd36igWY@u+pKhHGLwkJSDXhon~~5?K7%<(U(JY{rcnjqBGdy z2~iMyw<5>tO+upR_HWk=d+*A3qry;oJQNTGFE&xLij5-6;i~O3MjW+i#!foN7mUSD zyl(kGC$g0$W%v>Wu`bq9Te2yfWmorKB9d@1fY?BQ$0I<32zCL8f32$Se{IIEPB}Ex z-RK)&ow;lu?=yzPaolV82nk7Mpo4he2?u*#g=&G1rEY9MD*mWj$_^! zDuDS0SUen3fNfS=R;-19E!$^|@bp>IZB6lM0Pqk1*m~|G0X;RdqxN4>{UDwaA_TiGIfrk<3cBgnifIp=GzCOF7bfMZebA?K$ zG1d}9K03@#^-g=)<$7MTRa?`*V*oU__|wL>M6vqv*)QRq;@h&;f~UVWYp0+s#kE#| zIu)k!>pK8=s;!n@H86{i7CY%f!#V`(X0ETj#s0KGFiYW_jK;yaC{zD8MZ`OY*Y#AvsN_CkBOyCzX{`hNG> zO6pxim~r#E+La#RDbuVk8A~JPDc~D$p~t$4UH7u9k6bU3_^ekq9s!@fxua%^SM4k9 z`Wjg5B;~Nka^mwmFu?mI_5|KCm2yMe8wr|1XYb68+D{I9U}eD-U_1O7YA*G!#7L7B z{XN2}9WAAq3v6o|_%#51(aRezipkSvzjU0Z)`RaEOA{7FfjQ8T(&cSI3<(!_?X0Uo z)YcULJpfGb5?Co19Q~b+_gg8uWc-4vzsb5C#FJ5vd>C - - - - - - - - - - diff --git a/.serena/memories/key_file_locations.md b/.serena/memories/key_file_locations.md index 3f2a60dee0..5f2ade9424 100644 --- a/.serena/memories/key_file_locations.md +++ b/.serena/memories/key_file_locations.md @@ -41,4 +41,4 @@ - `stale.yml` — Stale issue/PR cleanup ## Docs -- `README.md`, `BUILDING.md`, `CONTRIBUTING.md`, `AGENTS.md`, `CLAUDE.md` +- `README.md`, `docs/BUILDING.md`, `docs/CONTRIBUTING.md`, `AGENTS.md`, `CLAUDE.md` diff --git a/.serena/project.yml b/.serena/project.yml index d97a3e60db..9b0f46205c 100644 --- a/.serena/project.yml +++ b/.serena/project.yml @@ -47,7 +47,7 @@ ignored_paths: - "hugegraph-server/hugegraph-test/**/tinkerpop/**" - "hugegraph-server/hugegraph-example/**" - "hugegraph-cluster-test/**" - # --- Note: target/, .flattened-pom.xml, .idea/*, apache-hugegraph-*/ already covered by .gitignore --- + # --- Note: target/, .flattened-pom.xml, .idea/, apache-hugegraph-*/ already covered by .gitignore --- # whether the project is in read-only mode # If set to true, all editing tools will be disabled and attempts to use them will result in an error diff --git a/README.md b/README.md index f4543e073f..e84260f5cc 100644 --- a/README.md +++ b/README.md @@ -263,7 +263,7 @@ bin/init-store.sh bin/start-hugegraph.sh ``` -For detailed build instructions, see [BUILDING.md](BUILDING.md) and [Build from Source Guide](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation). +For detailed build instructions, see [BUILDING.md](docs/BUILDING.md) and [Build from Source Guide](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation). @@ -328,7 +328,7 @@ For detailed architecture and development guidance, see [AGENTS.md](AGENTS.md). 2. **Set Up Your Environment** - Install Java 11+ and Maven 3.5+ - - Follow [BUILDING.md](BUILDING.md) for build instructions + - Follow [BUILDING.md](docs/BUILDING.md) for build instructions - Configure your IDE to use `.editorconfig` for code style and `style/checkstyle.xml` for Checkstyle rules 3. **Find Your First Issue** @@ -348,7 +348,7 @@ For detailed architecture and development guidance, see [AGENTS.md](AGENTS.md). - Commit format: `feat|fix|refactor(module): description` 6. **Submit Your Contribution** - - Read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines + - Read [CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines - Follow the [Contribution Guidelines](https://hugegraph.apache.org/docs/contribution-guidelines/) - Use [GitHub Desktop](https://desktop.github.com/) to simplify the PR process @@ -358,7 +358,7 @@ For detailed architecture and development guidance, see [AGENTS.md](AGENTS.md). Welcome to contribute to HugeGraph! -- **How to Contribute**: See [CONTRIBUTING.md](CONTRIBUTING.md) and [Contribution Guidelines](https://hugegraph.apache.org/docs/contribution-guidelines/) +- **How to Contribute**: See [CONTRIBUTING.md](docs/CONTRIBUTING.md) and [Contribution Guidelines](https://hugegraph.apache.org/docs/contribution-guidelines/) - **Code Style**: Configure your IDE to use `.editorconfig` for code style and `style/checkstyle.xml` for Checkstyle rules - **PR Tool**: [GitHub Desktop](https://desktop.github.com/) is recommended for simpler workflow diff --git a/BUILDING.md b/docs/BUILDING.md similarity index 100% rename from BUILDING.md rename to docs/BUILDING.md diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md From 4600a2e659aa275ab9c709f5c1ec1b3c2a40e9f0 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 13:49:36 +0800 Subject: [PATCH 7/9] docs(docker): explain local Bake builds - link the merged Bake configuration path - document host-platform builds for local changes - clarify cache and publication behavior --- docker/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 5cf2ab7fa9..f0992da823 100644 --- a/docker/README.md +++ b/docker/README.md @@ -83,7 +83,7 @@ Uses pre-built images from Docker Hub. Best for **end users** who want to run Hu Builds images locally from source Dockerfiles. Best for **developers** who want to test local changes. Build the matching `hugegraph-toolchain` Hubble source as `local/hugegraph-hubble:dev` before starting this stack. -The publishing pipeline uses `docker/bake.hcl` from the repository root to compile the Java reactor once and build the PD, Store, HStore Server, and standalone Server runtime images from that shared result. +The publishing pipeline uses [`docker/bake.hcl`](./bake.hcl) from the repository root to compile the Java reactor once and build the PD, Store, HStore Server, and standalone Server runtime images from that shared result. Run Bake commands from the repository root. Use `--print` to inspect the resolved targets without building, or run the default group to build all four amd64/arm64 images. Loading both platforms under the same local tags requires Docker's containerd image store. @@ -95,6 +95,18 @@ docker buildx bake --file docker/bake.hcl --print IMAGE_TAG=local docker buildx bake --file docker/bake.hcl ``` +Local source changes are included because Bake uses the current repository working tree as its build context. For routine development, override all targets to the host architecture so the four images still share one Maven build without requiring the multi-platform containerd image store. + +```bash +# x86_64 host +IMAGE_TAG=local docker buildx bake --file docker/bake.hcl --set '*.platform=linux/amd64' + +# ARM64 host +IMAGE_TAG=local docker buildx bake --file docker/bake.hcl --set '*.platform=linux/arm64' +``` + +These local commands can read existing Registry caches but do not publish images or write remote caches because `EXPORT_CACHE` defaults to `false`. + ```bash ( cd docker From b602ee7e25ab5f854afe7373901e3ed495b6cb78 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 14:09:47 +0800 Subject: [PATCH 8/9] fix(server): reduce high-volume task logs - move routine PD watch events from INFO to DEBUG - move per-task scheduler lifecycle logs from INFO to DEBUG - keep warnings, failures, and lifecycle signals unchanged --- .../apache/hugegraph/pd/client/KvClient.java | 2 +- .../task/DistributedTaskScheduler.java | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client/KvClient.java b/hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client/KvClient.java index 6197c891ad..cbc15bfe36 100644 --- a/hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client/KvClient.java +++ b/hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client/KvClient.java @@ -126,7 +126,7 @@ public TTLResponse putTTL(String key, String value, long ttl) throws PDException } private void onEvent(WatchResponse value, Consumer consumer) { - log.info("receive message for {},event Count:{}", value, value.getEventsCount()); + log.debug("receive message for {},event Count:{}", value, value.getEventsCount()); clientId.compareAndSet(0L, value.getClientId()); if (value.getEventsCount() != 0) { try { diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java index 8b11db9b6c..8611182991 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java @@ -137,8 +137,8 @@ public void cronSchedule() { while (!this.closed.get() && news.hasNext()) { HugeTask newTask = news.next(); - LOG.info("Try to start task({})@({}/{})", newTask.id(), - this.graphSpace, this.graphName); + LOG.debug("Try to start task({})@({}/{})", newTask.id(), + this.graphSpace, this.graphName); if (!tryStartHugeTask(newTask)) { // Task submission failed when the thread pool is full. break; @@ -272,8 +272,8 @@ public Future schedule(HugeTask task) { this.save(task); if (!this.closed.get()) { - LOG.info("Try to start task({})@({}/{}) immediately", task.id(), - this.graphSpace, this.graphName); + LOG.debug("Try to start task({})@({}/{}) immediately", task.id(), + this.graphSpace, this.graphName); tryStartHugeTask(task); } else { LOG.info("TaskScheduler has closed"); @@ -751,8 +751,8 @@ private boolean tryStartHugeTask(HugeTask task) { if (executor.getActiveCount() < executor.getMaximumPoolSize()) { TaskRunner runner = new TaskRunner<>(task); chosenExecutor.submit(runner); - LOG.info("Submit task({})@({}/{})", task.id(), - this.graphSpace, this.graphName); + LOG.debug("Submit task({})@({}/{})", task.id(), + this.graphSpace, this.graphName); return true; } @@ -770,9 +770,9 @@ protected void logCurrentState() { int olapActive = ((ThreadPoolExecutor) olapTaskExecutor).getActiveCount(); - LOG.info("Current State: gremlinTaskExecutor({}), schemaTaskExecutor" + - "({}), ephemeralTaskExecutor({}), olapTaskExecutor({})", - gremlinActive, schemaActive, ephemeralActive, olapActive); + LOG.debug("Current State: gremlinTaskExecutor({}), schemaTaskExecutor" + + "({}), ephemeralTaskExecutor({}), olapTaskExecutor({})", + gremlinActive, schemaActive, ephemeralActive, olapActive); } private LockResult tryLockTask(String taskId) { @@ -836,7 +836,7 @@ public void run() { initTaskParams(task); if (lockResult.lockSuccess() && !task.completed()) { - LOG.info("Start task({})", task.id()); + LOG.debug("Start task({})", task.id()); TaskManager.setContext(task.context()); try { @@ -861,7 +861,7 @@ public void run() { deletingTasks.remove(task.id()); unlockTask(task.id().asString(), lockResult); - LOG.info("task({}) finished.", task.id().toString()); + LOG.debug("task({}) finished.", task.id().toString()); } } } From 4dae0c744b9f4e49b173bdfec12b7548afdef5e5 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 30 Aug 2026 14:17:47 +0800 Subject: [PATCH 9/9] fix(ci): limit noisy hstore test logs - preserve production task lifecycle messages at INFO - suppress scheduler INFO only during the HStore core test - stop PD and Store startup scripts from echoing their source --- .github/workflows/pd-store-ci.yml | 2 ++ .../hugegraph/task/DistributedTaskScheduler.java | 16 ++++++++-------- .../src/assembly/travis/install-hstore.sh | 2 +- .../src/assembly/travis/start-pd.sh | 2 +- .../src/assembly/travis/start-store.sh | 2 +- .../hugegraph-test/src/main/resources/log4j2.xml | 5 +++++ 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pd-store-ci.yml b/.github/workflows/pd-store-ci.yml index d20f4ccb41..1a6825e7e4 100644 --- a/.github/workflows/pd-store-ci.yml +++ b/.github/workflows/pd-store-ci.yml @@ -378,6 +378,8 @@ jobs: $TRAVIS_DIR/run-unit-test.sh $BACKEND - name: Run core test + env: + HUGEGRAPH_TEST_TASK_LOG_LEVEL: WARN run: | $TRAVIS_DIR/run-core-test.sh $BACKEND diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java index 8611182991..57885a9d99 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/DistributedTaskScheduler.java @@ -137,8 +137,8 @@ public void cronSchedule() { while (!this.closed.get() && news.hasNext()) { HugeTask newTask = news.next(); - LOG.debug("Try to start task({})@({}/{})", newTask.id(), - this.graphSpace, this.graphName); + LOG.info("Try to start task({})@({}/{})", newTask.id(), + this.graphSpace, this.graphName); if (!tryStartHugeTask(newTask)) { // Task submission failed when the thread pool is full. break; @@ -272,8 +272,8 @@ public Future schedule(HugeTask task) { this.save(task); if (!this.closed.get()) { - LOG.debug("Try to start task({})@({}/{}) immediately", task.id(), - this.graphSpace, this.graphName); + LOG.info("Try to start task({})@({}/{}) immediately", task.id(), + this.graphSpace, this.graphName); tryStartHugeTask(task); } else { LOG.info("TaskScheduler has closed"); @@ -751,8 +751,8 @@ private boolean tryStartHugeTask(HugeTask task) { if (executor.getActiveCount() < executor.getMaximumPoolSize()) { TaskRunner runner = new TaskRunner<>(task); chosenExecutor.submit(runner); - LOG.debug("Submit task({})@({}/{})", task.id(), - this.graphSpace, this.graphName); + LOG.info("Submit task({})@({}/{})", task.id(), + this.graphSpace, this.graphName); return true; } @@ -836,7 +836,7 @@ public void run() { initTaskParams(task); if (lockResult.lockSuccess() && !task.completed()) { - LOG.debug("Start task({})", task.id()); + LOG.info("Start task({})", task.id()); TaskManager.setContext(task.context()); try { @@ -861,7 +861,7 @@ public void run() { deletingTasks.remove(task.id()); unlockTask(task.id().asString(), lockResult); - LOG.debug("task({}) finished.", task.id().toString()); + LOG.info("task({}) finished.", task.id().toString()); } } } diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hstore.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hstore.sh index f1a8373eff..dcd04f121d 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hstore.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/install-hstore.sh @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -set -ev +set -e TRAVIS_DIR=$(dirname "$0") diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/start-pd.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-pd.sh index 35e82ade40..0c137489e1 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/start-pd.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-pd.sh @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -set -ev +set -e HOME_DIR=$(pwd) diff --git a/hugegraph-server/hugegraph-dist/src/assembly/travis/start-store.sh b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-store.sh index 3e876ce9a0..353034201a 100755 --- a/hugegraph-server/hugegraph-dist/src/assembly/travis/start-store.sh +++ b/hugegraph-server/hugegraph-dist/src/assembly/travis/start-store.sh @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -set -ev +set -e HOME_DIR=$(pwd) diff --git a/hugegraph-server/hugegraph-test/src/main/resources/log4j2.xml b/hugegraph-server/hugegraph-test/src/main/resources/log4j2.xml index 30753c2c18..825dec3de0 100644 --- a/hugegraph-server/hugegraph-test/src/main/resources/log4j2.xml +++ b/hugegraph-server/hugegraph-test/src/main/resources/log4j2.xml @@ -127,6 +127,11 @@ + + + +