You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "imbajin (via GitHub)" <gi...@apache.org> on 2026/10/05 13:06:40 UTC

[PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

imbajin opened a new pull request, #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784

   ## Purpose of the PR
   
   Loader and Hubble images now use Java 17 and the same locked SDK as the core cutover. Direct builds bootstrap the SDK; the controlled CI path supplies an isolated SDK repository and provenance manifest.
   
   Original preparation and ongoing review: https://github.com/hugegraph/hugegraph-toolchain/pull/37. This PR uses the exact same organization branch, so subsequent branch fixes update both PRs.
   
   Required predecessors: https://github.com/apache/hugegraph-toolchain/pull/783.
   
   This PR targets ASF master and currently includes unmerged prerequisites. Review the module delta in the linked organization PR; merge predecessors first, then verify the upstream diff, required checks and reviews before merging. The prerequisite-union branch is an integration aid, not another merge unit.
   
   ## Main Changes
   
   - Validate required SDK POMs, JARs and packaged provenance rather than accepting artifacts solely by version.
   - Exercise the real product Dockerfiles and check runtime Java and library payloads.
   - Verify Loader import/readback and Hubble metadata persistence across container recreation.
   
   ## Verifying these changes
   
   Earlier organization image CI passed the prebuilt-SDK image path. Additional review repairs are prepared locally and have not yet reached this shared branch. Final inherited-head validation and the direct no-manifest build path remain outstanding; an earlier green run is not proof of those pending changes.
   
   ## Documentation Status
   
   Migration and runtime limitations are documented in the module guides. Review and fixes continue in the organization repository; independent upstream review suggestions will also be read and adopted. No merge, deployment or release is performed by creating this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#issuecomment-5995404497

   ## [Codecov](https://app.codecov.io/gh/apache/hugegraph-toolchain/pull/784?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `81.25000%` with `3 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 54.02%. Comparing base ([`b066b80`](https://app.codecov.io/gh/apache/hugegraph-toolchain/commit/b066b805630ca591809cfee2da2aae1395fc6b42?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0b927e6`](https://app.codecov.io/gh/apache/hugegraph-toolchain/commit/0b927e619ba5c4edee97405c7a2e9c87fef061c1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 244 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hugegraph-toolchain/pull/784?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...ava/org/apache/hugegraph/api/graphs/GraphsAPI.java](https://app.codecov.io/gh/apache/hugegraph-toolchain/pull/784?src=pr&el=tree&filepath=hugegraph-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhugegraph%2Fapi%2Fgraphs%2FGraphsAPI.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVnZWdyYXBoLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaHVnZWdyYXBoL2FwaS9ncmFwaHMvR3JhcGhzQVBJLmphdmE=) | 81.25% | [2 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/hugegraph-toolchain/pull/784?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (b066b80) and HEAD (0b927e6). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (b066b80) | HEAD (0b927e6) |
   >|------|------|------|
   >||2|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #784      +/-   ##
   ============================================
   - Coverage     62.49%   54.02%   -8.48%     
   + Complexity     1903     1177     -726     
   ============================================
     Files           262      225      -37     
     Lines          9541     6928    -2613     
     Branches        886      441     -445     
   ============================================
   - Hits           5963     3743    -2220     
   + Misses         3190     2969     -221     
   + Partials        388      216     -172     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/hugegraph-toolchain/pull/784?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4202060042


##########
hugegraph-client/assembly/travis/install-candidate-sdk.sh:
##########
@@ -36,15 +36,22 @@ export PATH="$JAVA_HOME/bin:$PATH"
 
 SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
 SOURCE_DIR=$2
-# TODO(apache/hugegraph#3263): temporary pre-merge source; after merge use apache/hugegraph and a verified ASF SHA.
-SERVER_REPOSITORY=${SERVER_REPOSITORY:-hugegraph/hugegraph}
+SERVER_REPOSITORY=${SERVER_REPOSITORY:-apache/hugegraph}
 SERVER_FETCH_REF=${SERVER_FETCH_REF:-$1}
 export SERVER_REPOSITORY SERVER_FETCH_REF
 CANDIDATE_REPO=$3
 bash "$SCRIPT_DIR/checkout-server.sh" "$1" "$SOURCE_DIR"
-# Install the entire locked reactor so Common, Core, PD and Store share one source.
+# Install the SDK and Server distribution dependency closure from one source.
+# Server cluster tests pull an unrelated released Toolchain/SDK back into this build.
 # The fixture installers retain package-only semantics and use another repository.
-(cd "$SOURCE_DIR" && mvn "-Dmaven.repo.local=$CANDIDATE_REPO" install \
+SDK_MODULES=hugegraph-server/hugegraph-dist,hugegraph-pd/hg-pd-client
+SDK_MODULES+=,hugegraph-store/hg-store-client,hugegraph-struct
+# Flatten the root too: its installed ${revision} otherwise breaks dependency
+# model reconstruction while remote-resources generates license metadata.
+(cd "$SOURCE_DIR" && mvn "-Dmaven.repo.local=$CANDIDATE_REPO" \
+    -pl "$SDK_MODULES" -am \

Review Comment:
   🧹 Blocking: no. Summary: The helper now builds four selected projects plus their dependencies, while docs/java17-migration.md still says it installs the complete locked server reactor. Please update the guide to describe the narrowed module selection so users do not expect unrelated server modules in candidate_repo. Evidence: SDK_MODULES lists hugegraph-server/hugegraph-dist, hugegraph-pd/hg-pd-client, hugegraph-store/hg-store-client, and hugegraph-struct before Maven runs with -pl and -am.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] refactor: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4274246298


##########
.github/workflows/upstream-compatibility.yml:
##########
@@ -0,0 +1,85 @@
+name: Upstream compatibility
+
+on:
+  schedule:
+    - cron: '17 3 * * *'
+  workflow_dispatch:
+  pull_request:
+    paths:
+      - '.github/workflows/upstream-compatibility.yml'
+      - '.github/actions/get-hugegraph-commit/**'
+      - '.github/actions/setup-candidate-sdk/**'
+      - 'hugegraph-client/assembly/travis/install-candidate-sdk.sh'
+      - 'hugegraph-client/assembly/travis/checkout-server.sh'
+      - '.github/scripts/verify_candidate_image_sdk.py'

Review Comment:
   Addressed by the subsequent merged [#816](https://github.com/apache/hugegraph-toolchain/pull/816). The upstream workflow is now reusable, with PR dispatch owned by the single ci.yml entry. I checked the current master policy directly: setup-java-env/action.yml, .github/configs/settings.xml and the actual hugegraph-client/assembly/travis/start-hugegraph-servers.sh path each select the upstream check. The entry has no PR path filter that can suppress those inputs. Resolving this earlier routing gap.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4199145956


##########
.github/workflows/ci.yml:
##########
@@ -85,10 +85,9 @@ jobs:
         if: steps.scope.outputs.needsFixture == 'true'
         uses: ./.github/actions/get-hugegraph-commit
         with:
-          # TODO(apache/hugegraph#3263): switch the temporary source to ASF after merge.
-          repository: hugegraph/hugegraph
-          ref: codex/cypher-minimal-compat
-          expected-commit: 4c162f539b906fa06dd83228e3691b77fa5b77d7
+          repository: apache/hugegraph
+          ref: master

Review Comment:
   Important: `ref: master` together with `expected-commit: d9abcd4...` breaks as soon as apache/hugegraph master moves. `get-hugegraph-commit/resolve.cjs` resolves `master` to the current tip and throws `Server ref moved` when it differs from the expected SHA. `checkout-server.sh` does the same thing: it fetches `SERVER_FETCH_REF` with `--depth 1` and exits on `Server checkout mismatch`. Today master is exactly d9abcd4 (`compare d9abcd4...master` returns `identical`), which is the only reason CI is green. After the next unrelated Server commit, this plan step fails, and so do `setup-candidate-sdk` (its default `ref` is now `master`), the `java17-images-ci.yml` job, and every direct `docker build` of `hugegraph-loader/Dockerfile` and `hugegraph-hubble/Dockerfile`. That includes builds from a released Toolchain source tree, which can never be fixed later. The old `codex/cypher-minimal-compat` branch was frozen, so it did not have this problem.
   
   Please fetch the pinned commit itself rather than a moving branch. GitHub serves shallow fetches by SHA: `git fetch --depth 1 origin d9abcd4317fb36128e7e4d209139ec7f3a28cdfc` against apache/hugegraph works, and `getCommit` accepts a SHA as `ref`. Concretely: use `ref: d9abcd4317fb36128e7e4d209139ec7f3a28cdfc` here and in `java17-images-ci.yml`; make it the `ref` default in `setup-candidate-sdk/action.yml`; and in both Dockerfiles and `docs/java17-migration.md`, drop `SERVER_FETCH_REF=master` (checkout-server.sh already defaults the fetch ref to the commit). The lock stays fail-closed, and advancing the baseline remains a deliberate edit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "bitflicker64 (via GitHub)" <gi...@apache.org>.
bitflicker64 commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4207005592


##########
.github/scripts/verify_candidate_image_sdk.py:
##########
@@ -20,10 +20,14 @@
 import argparse
 import hashlib
 import json
+import os
+import re
+from functools import lru_cache
+import urllib.request
 from pathlib import Path
 
 REPOSITORY = "apache/hugegraph"
-COMMIT = "d9abcd4317fb36128e7e4d209139ec7f3a28cdfc"
+COMMIT = "d9abcd"

Review Comment:
   Important: This PR replaces every full 40-character source pin with a six-character prefix (`d9abcd` here, in both Dockerfiles, `setup-candidate-sdk` defaults, `ci.yml` and `java17-images-ci.yml`; `b12425` for the 1.7.0 tag check). The full identity is resolved at build time through `GET /repos/apache/hugegraph/commits/<prefix>`. That endpoint resolves prefixes across the whole GitHub fork network, not just apache/hugegraph. When two objects share a prefix it returns HTTP 422 (`No commit found for SHA`). This already happens today: `d9abc`, `73980` and `2313c` are unique among the 85k objects of a local apache/hugegraph clone (`git rev-parse --disambiguate=<p>` prints one object), yet the API returns 422 for all three. A 24-bit prefix is also cheap to brute-force. Any GitHub user can fork apache/hugegraph and push a commit starting with `d9abcd`, and from then on `resolve.cjs`, `checkout-server.sh` and this verifier fail. Every Toolchain CI run breaks, and so does every direct `do
 cker build` of the Loader and Hubble images, including builds from a released source tree, which cannot be patched later. The direct Docker path also makes three unauthenticated API calls per image: the checkout resolver, plus this verifier twice, because `CANDIDATE_SOURCE_COMMIT` is not set there and `lru_cache` is per process. That makes offline or NAT/shared-IP builds depend on the 60 requests per hour anonymous limit. Please keep the full SHA as the pinned identity in `COMMIT`, the Dockerfile arguments, the action defaults and the workflow inputs. Shorten only the log output, which the PR already does with `[:6]` / `${X:0:6}`. With a full SHA, `checkout-server.sh` fetches directly with no API call, and the verifier compares against a constant with no network access.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4213962147


##########
hugegraph-hubble/hubble-dist/assembly/travis/run_live_hubble_smoke.py:
##########
@@ -122,12 +122,17 @@ def assert_safe_tar_member(member, work_dir):
             raise RuntimeError(f"Unsafe tar link outside work dir: {member.name}")
 
 
-def extract_tarball(tarball, work_dir):
-    with tarfile.open(tarball, "r:gz") as archive:
+def extract_archive(tarball, work_dir):
+    with tarfile.open(tarball) as archive:
         members = archive.getmembers()
         for member in members:
             assert_safe_tar_member(member, work_dir)
-        archive.extractall(work_dir, members)
+        # Recheck each member against links already written during extraction.
+        archive.extractall(work_dir, members, filter="data")

Review Comment:
   Fixed with a tarfile.data_filter capability check before archive preparation. Unsupported Python versions receive an explicit upgrade message; extraction still requires filter=data, with no unsafe fallback. Added regression cases to the existing test file; local tests were not run.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4209788672


##########
hugegraph-hubble/hubble-dist/assembly/travis/run_live_hubble_smoke.py:
##########
@@ -122,12 +122,17 @@ def assert_safe_tar_member(member, work_dir):
             raise RuntimeError(f"Unsafe tar link outside work dir: {member.name}")
 
 
-def extract_tarball(tarball, work_dir):
-    with tarfile.open(tarball, "r:gz") as archive:
+def extract_archive(tarball, work_dir):
+    with tarfile.open(tarball) as archive:
         members = archive.getmembers()
         for member in members:
             assert_safe_tar_member(member, work_dir)
-        archive.extractall(work_dir, members)
+        # Recheck each member against links already written during extraction.
+        archive.extractall(work_dir, members, filter="data")

Review Comment:
   ⚠️ Blocking: no. Summary: This call passes `filter="data"`, but `verify-hubble-issue-694.sh` runs whichever `python3` is on `PATH`; Python 3.9.16 and 3.10.11 do not accept this keyword, so the smoke test exits with `TypeError` before running. Please enforce a supported Python patch level or provide a compatible safe-filter path. Evidence: Python added extraction filters in 3.12 and backported them to security releases such as [3.9.17](https://www.python.org/downloads/release/python-3917/) and [3.10.12](https://www.python.org/downloads/release/python-31012/); see the [tarfile documentation](https://docs.python.org/3.12/library/tarfile.html#tarfile.TarFile.extractall).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: verify same-source Java 17 images [hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #784:
URL: https://github.com/apache/hugegraph-toolchain/pull/784#discussion_r4215086586


##########
.github/workflows/upstream-compatibility.yml:
##########
@@ -0,0 +1,85 @@
+name: Upstream compatibility
+
+on:
+  schedule:
+    - cron: '17 3 * * *'
+  workflow_dispatch:
+  pull_request:
+    paths:
+      - '.github/workflows/upstream-compatibility.yml'
+      - '.github/actions/get-hugegraph-commit/**'
+      - '.github/actions/setup-candidate-sdk/**'
+      - 'hugegraph-client/assembly/travis/install-candidate-sdk.sh'
+      - 'hugegraph-client/assembly/travis/checkout-server.sh'
+      - '.github/scripts/verify_candidate_image_sdk.py'

Review Comment:
   ⚠️ Blocking: no. Summary: This workflow consumes the local setup-java-env action (which supplies Maven's settings file) and runs start-hugegraph-servers.sh, but none of those paths is in pull_request.paths. A change to either action, .github/configs/settings.xml, or the server startup script can therefore skip this current-master compatibility gate; please add all three paths. Evidence: workflow steps 32–36 and 58–61; setup-java-env exports --settings .github/configs/settings.xml through MAVEN_ARGS.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org