From 340ede27b3d0ae1dbd60fec8eff3cff41405aa64 Mon Sep 17 00:00:00 2001 From: Dandelion Date: Mon, 4 Dec 2023 20:56:01 +0800 Subject: [PATCH 1/5] fix: the api version is outdated --- .github/workflows/client-ci.yml | 2 +- .../src/main/java/org/apache/hugegraph/driver/HugeClient.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client-ci.yml b/.github/workflows/client-ci.yml index e414921d1..f1448f807 100644 --- a/.github/workflows/client-ci.yml +++ b/.github/workflows/client-ci.yml @@ -69,6 +69,6 @@ jobs: mvn test -Dtest=FuncTestSuite - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3.0.0 + uses: codecov/codecov-action@v3 with: file: target/jacoco.xml diff --git a/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java b/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java index e3c9045bf..9aac60f50 100644 --- a/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java +++ b/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java @@ -109,7 +109,7 @@ private void initManagers(RestClient client, String graph) { private void checkServerApiVersion() { VersionUtil.Version apiVersion = VersionUtil.Version.of(this.version.getApiVersion()); - VersionUtil.check(apiVersion, "0.38", "0.70", "hugegraph-api in server"); + VersionUtil.check(apiVersion, "0.38", "0.81", "hugegraph-api in server"); this.client.apiVersion(apiVersion); } From 4d6fd5d8d62d968e81970f99b7b17c80e1f03d5c Mon Sep 17 00:00:00 2001 From: Dandelion Date: Mon, 4 Dec 2023 21:54:31 +0800 Subject: [PATCH 2/5] fix dockerfile to aviod hubble use client:1.0.0 --- hugegraph-hubble/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hugegraph-hubble/Dockerfile b/hugegraph-hubble/Dockerfile index 4518d82f9..2ae677a63 100644 --- a/hugegraph-hubble/Dockerfile +++ b/hugegraph-hubble/Dockerfile @@ -26,6 +26,9 @@ RUN set -x \ COPY . /pkg WORKDIR /pkg +RUN set -x \ + && mvn install -pl hugegraph-client,hugegraph-loader -am -Dmaven.javadoc.skip=true -DskipTests -ntp + RUN set -x \ && cd /pkg/hugegraph-hubble/ \ && mvn package -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true From 60e04075377718abdb735bb515e1214dd4ef3993 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:19:27 +0800 Subject: [PATCH 3/5] Update hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java --- .../src/main/java/org/apache/hugegraph/driver/HugeClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java b/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java index 9aac60f50..0965e605c 100644 --- a/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java +++ b/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java @@ -109,6 +109,8 @@ private void initManagers(RestClient client, String graph) { private void checkServerApiVersion() { VersionUtil.Version apiVersion = VersionUtil.Version.of(this.version.getApiVersion()); + # TODO: find a way to keep the range of api version correct automatically + # 0.81 equals to the {latest_api_version} +10 VersionUtil.check(apiVersion, "0.38", "0.81", "hugegraph-api in server"); this.client.apiVersion(apiVersion); } From 07a1a7c40b20bdf05644df1b123e935399c324c7 Mon Sep 17 00:00:00 2001 From: Dandelion Date: Tue, 5 Dec 2023 10:56:01 +0800 Subject: [PATCH 4/5] fix: increase the depth for git clone --- .../assembly/travis/install-hugegraph-from-source.sh | 2 +- .../hubble-dist/assembly/travis/download-hugegraph.sh | 2 +- .../assembly/travis/install-hugegraph-from-source.sh | 2 +- .../assembly/travis/install-hugegraph-from-source.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hugegraph-client/assembly/travis/install-hugegraph-from-source.sh b/hugegraph-client/assembly/travis/install-hugegraph-from-source.sh index fe9024077..df912fb0a 100755 --- a/hugegraph-client/assembly/travis/install-hugegraph-from-source.sh +++ b/hugegraph-client/assembly/travis/install-hugegraph-from-source.sh @@ -26,7 +26,7 @@ HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git" GIT_DIR=hugegraph # download code and compile -git clone --depth 100 ${HUGEGRAPH_GIT_URL} $GIT_DIR +git clone --depth 150 ${HUGEGRAPH_GIT_URL} $GIT_DIR cd "${GIT_DIR}" git checkout "${COMMIT_ID}" mvn package -DskipTests -Dmaven.javadoc.skip=true -ntp diff --git a/hugegraph-hubble/hubble-dist/assembly/travis/download-hugegraph.sh b/hugegraph-hubble/hubble-dist/assembly/travis/download-hugegraph.sh index 7813cc3ba..38a7032c0 100755 --- a/hugegraph-hubble/hubble-dist/assembly/travis/download-hugegraph.sh +++ b/hugegraph-hubble/hubble-dist/assembly/travis/download-hugegraph.sh @@ -26,7 +26,7 @@ HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git" GIT_DIR=hugegraph # download code and compile -git clone --depth 100 $HUGEGRAPH_GIT_URL $GIT_DIR +git clone --depth 150 $HUGEGRAPH_GIT_URL $GIT_DIR cd "${GIT_DIR}" git checkout "${COMMIT_ID}" mvn package -DskipTests -Dmaven.javadoc.skip=true -ntp diff --git a/hugegraph-loader/assembly/travis/install-hugegraph-from-source.sh b/hugegraph-loader/assembly/travis/install-hugegraph-from-source.sh index 60adcfacd..202f45691 100755 --- a/hugegraph-loader/assembly/travis/install-hugegraph-from-source.sh +++ b/hugegraph-loader/assembly/travis/install-hugegraph-from-source.sh @@ -24,7 +24,7 @@ fi COMMIT_ID=$1 HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git" -git clone --depth 100 ${HUGEGRAPH_GIT_URL} hugegraph +git clone --depth 150 ${HUGEGRAPH_GIT_URL} hugegraph cd hugegraph git checkout "${COMMIT_ID}" mvn package -DskipTests -Dmaven.javadoc.skip=true -ntp diff --git a/hugegraph-tools/assembly/travis/install-hugegraph-from-source.sh b/hugegraph-tools/assembly/travis/install-hugegraph-from-source.sh index 5b3b2637c..45de8924c 100755 --- a/hugegraph-tools/assembly/travis/install-hugegraph-from-source.sh +++ b/hugegraph-tools/assembly/travis/install-hugegraph-from-source.sh @@ -25,7 +25,7 @@ HUGEGRAPH_GIT_URL="https://github.com/apache/hugegraph.git" GIT_DIR=hugegraph # download code and compile -git clone --depth 100 $HUGEGRAPH_GIT_URL $GIT_DIR +git clone --depth 150 $HUGEGRAPH_GIT_URL $GIT_DIR cd "${GIT_DIR}" git checkout "${COMMIT_ID}" mvn package -DskipTests -Dmaven.javadoc.skip=true -ntp From 5f5285e5c93ae19bb17c03cddccde278edca6f11 Mon Sep 17 00:00:00 2001 From: Dandelion <49650772+aroundabout@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:04:34 +0800 Subject: [PATCH 5/5] Update hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java --- .../src/main/java/org/apache/hugegraph/driver/HugeClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java b/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java index 0965e605c..caa48586d 100644 --- a/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java +++ b/hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java @@ -109,8 +109,8 @@ private void initManagers(RestClient client, String graph) { private void checkServerApiVersion() { VersionUtil.Version apiVersion = VersionUtil.Version.of(this.version.getApiVersion()); - # TODO: find a way to keep the range of api version correct automatically - # 0.81 equals to the {latest_api_version} +10 + // TODO: find a way to keep the range of api version correct automatically + // 0.81 equals to the {latest_api_version} +10 VersionUtil.check(apiVersion, "0.38", "0.81", "hugegraph-api in server"); this.client.apiVersion(apiVersion); }