Skip to content

refactor(build): prepare Java 17 and cluster test foundation (1/3) - #3261

Open
contrueCT wants to merge 13 commits into
apache:masterfrom
hugegraph:task/tp381-1-java17-foundation
Open

contrueCT wants to merge 13 commits into
apache:masterfrom
hugegraph:task/tp381-1-java17-foundation

Conversation

@contrueCT

@contrueCT contrueCT commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of the PR

Part 1 of a three-PR upgrade series targeting apache/hugegraph:master. Establish a Java 17 build and runtime baseline while retaining TinkerPop 3.5.1.

Merge order: apache#3261 (Java 17 foundation) → apache#3262 (query semantics) → apache#3263 (TinkerPop upgrade). All three PRs target master directly. This PR is the prerequisite for the query-semantics and TinkerPop-upgrade PRs.

Source: hugegraph/hugegraph#231, submitted directly from hugegraph:task/tp381-1-java17-foundation. The local validation statements below are carried over from that source PR; CI on this ASF PR head remains the merge gate.

Main Changes

  • Align compiler, test plugins, JVM options, launchers, Docker images and cluster-test process handling on Java 17. Use Groovy 2.5.23 as a temporary compatibility pin: 2.5.14 cannot read Java 17 classes. Part 3 replaces it with Groovy 4.
  • Carry the GraphId allocation/repair work already reviewed in #163, together with the Java 17 work from #183 and #194.
  • Declare Commons Configuration 2.10.1 and Commons Text 1.11.0 in the release LICENSE, matching the dependency inventory.
  • The current community master already contains upstream apache#3157 and apache#3220; these are baseline changes and are excluded from this PR diff.

Verifying these changes

  • Already covered by existing tests: Java 17 launcher contracts, process-wait helpers, backend/serializer registration, auth reflection, and ordered scans under the Gremlin sandbox.
  • Local validation: Java 17 formatting and all-module clean compile passed. A local HTTP fixture verified that the actual PD startup script waits through 503/401 responses, accepts readiness HTTP 200, and fails on persistent unauthorized responses.
  • CI results remain the merge gate. The Groovy compatibility pin is the new integration adjustment requiring attention beyond the previously reviewed inputs.

Does this PR potentially affect the following parts?

  • Dependencies
  • Modify configurations
  • The public API
  • Other affects: minimum build/runtime JDK and cluster test lifecycle
  • Nope

Documentation Status

Repository documentation is included in docs/BUILDING.md, the README and PD/Store deployment guides. License declarations and the dependency inventory are updated for the Groovy compatibility pin.

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.82014% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.63%. Comparing base (176fb56) to head (0e30e3b).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ain/java/org/apache/hugegraph/util/Reflection.java 20.00% 16 Missing ⚠️
...rg/apache/hugegraph/store/meta/GraphIdManager.java 85.96% 8 Missing and 8 partials ⚠️
...ugegraph/backend/serializer/SerializerFactory.java 33.33% 1 Missing and 1 partial ⚠️
...ugegraph/backend/store/BackendProviderFactory.java 50.00% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (176fb56) and HEAD (0e30e3b). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (176fb56) HEAD (0e30e3b)
7 4
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3261      +/-   ##
============================================
- Coverage     41.57%   34.63%   -6.95%     
+ Complexity     7311     5915    -1396     
============================================
  Files           793      774      -19     
  Lines         69106    66913    -2193     
  Branches       9258     8943     -315     
============================================
- Hits          28730    23173    -5557     
- Misses        37098    41023    +3925     
+ Partials       3278     2717     -561     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: yes. Summary: The Java 17 move also changes the published hugegraph-common and hugegraph-rpc jars from Java 8 bytecode to Java 17 bytecode, which downstream projects that still target Java 8 and 11 cannot load. The cluster-test changes in this PR are also not exercised by any CI run on this head, because the Cluster Test CI workflow is disabled in the repository. Evidence: Built hugegraph-common at bdce410 with JDK 17 and ran javap on a compiled class (major version 61; master compiles this module with source/target 1.8). gh api actions/workflows shows Cluster Test CI as disabled_manually and no run exists for this head. The three new minicluster unit tests pass locally on JDK 17.

Comment thread hugegraph-commons/pom.xml
@@ -132,8 +130,6 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: removing <source>${compiler.source}</source> / <target>${compiler.target}</target> (1.8) here means hugegraph-common and hugegraph-rpc now inherit maven.compiler.release=17 from the root pom. These are published library artifacts, not only server internals. I built hugegraph-common at this head with JDK 17 and javap -v on a compiled class reports major version: 61 (Java 17). On master the module compiles to Java 8 bytecode. apache/hugegraph-toolchain consumes hugegraph-common through ${hugegraph.version} and still compiles with compiler.source/target 1.8 and runs client CI on Java 11. hugegraph-computer also depends on it with target 11 and CI on Java 8 and 11. Once a release from this line ships, those projects get UnsupportedClassVersionError when they bump the dependency. The PR description lists the server/PD/Store runtime JDK as affected but not the commons libraries. Please either keep hugegraph-commons on a lower release, for example <maven.compiler.release>8</maven.compiler.release> (or 11) in hugegraph-commons/pom.xml, or state the commons baseline change explicitly in the PR and line it up with toolchain and computer before merge.

- name: Run simple cluster test
run: |
mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-test -am -P simple-cluster-test
timeout 45m mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-test \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: this PR changes the cluster-test lifecycle (AbstractEnv start timeouts, ServerNodeWrapper port readiness, Gremlin port rewriting, pd.peers in the template) and adds EnvUtilTest, GremlinServerConfigTest and AbstractNodeWrapperTest, but none of it ran on this head. gh api repos/apache/hugegraph/actions/workflows reports Cluster Test CI as disabled_manually, and its last run was in October 2025. No other active workflow builds hugegraph-cluster-test with tests. The PR body says CI on this head is the merge gate, so the lane that covers the "cluster test foundation" part of the title is missing from that gate. I ran mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-minicluster locally on JDK 17 and the three new unit tests pass. The simple and multi cluster suites, which depend on the new readiness logic, are still unverified. Please get Cluster Test CI re-enabled and run against this head, or link a passing run of both cluster profiles on this exact SHA, before merge.

Comment thread hugegraph-server/hugegraph-test/conf/jvm-test-module.options Outdated
- remove Commons from required checks
- require the Java 17 memory Server check
- retain analysis and license checks
- avoid claiming TinkerPop 3.8.1 in the foundation
- describe shared TinkerPop and Kryo access needs
- retain the test and runtime permission boundary
- update both Store dependencies to Fastjson 1.2.84
- align the release license and dependency inventory
- retain the Fastjson 1.x dependency contract
- override the legacy client transitive dependency
- retain the existing client and production versions
- remove obsolete release inventory entries
@imbajin imbajin mentioned this pull request Oct 4, 2026
3 of 9 tasks

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: yes. Summary: The new FixGraphIdControllerTest never runs in CI, so the controller-level validation that this PR adds to /update_graph_id has no test that runs. Separately, the .asf.yaml change drops the Commons build from the required status checks instead of moving it to Java 17. The two open findings from bitflicker64 at this head (Java 17 bytecode in the published hugegraph-common and hugegraph-rpc jars, and the disabled Cluster Test CI workflow) still apply and are not repeated here. Evidence: store job log for run 37172218875 at 7e6da14 (every surefire:test (default-test) @ hg-store-node reports Tests run: 0 under the auto-detected JUnitPlatformProvider), hugegraph-store/hg-store-test/pom.xml store-core-test includes, and git diff 176fb56d..7e6da142 -- .asf.yaml.

Comment thread .asf.yaml
- check-license
- build-server (memory, 11)
- build-commons (11)
- build-server (memory, 17)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: This removes build-commons (11) from the required checks but does not add build-commons (17), so Commons test failures no longer block merges to master.

commons-ci.yml still runs on every pull_request with no path filter, and at this head it reports the check as build-commons (17). Only the server check was renamed to 17. The Commons unit and RPC suites were a merge gate before this PR and are no longer one after it. That matters more in this series, because this PR also changes the Commons compiler target and dependency versions (commons-configuration2 2.10.1, commons-lang3 3.18.0).

Requested change: add - build-commons (17) under contexts, or say in the PR description why Commons is being dropped as a merge gate.

Move existing controller cases into the Store test module.
Select the controller class in the core test profile.
Retain the existing validation assertions.
Use the existing Node JUnit Platform provider.
Keep controller tests alongside the Node implementation.
Remove the cross-module core test include.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants