Skip to content

refactor(loader): prepare JVM tests and resource for Java17 - #778

Merged
imbajin merged 32 commits into
apache:masterfrom
hugegraph:java17-loader-prep
Oct 5, 2026
Merged

imbajin merged 32 commits into
apache:masterfrom
hugegraph:java17-loader-prep

Conversation

@imbajin

@imbajin imbajin commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Purpose of the PR

Loader test tooling needs JVM compatibility preparation, and cleanup can leave its distinct clients open when failure-log or progress handling throws. Close both clients while preserving the primary exception, suppressed failures and input-progress semantics.

Loader cleanup and JVM preparation

Original preparation and review: hugegraph#43.

Depends on #775. Merge the shared build preparation first. This PR targets master and currently includes prerequisite changes; after the prerequisite lands, rebase this same organization branch onto the updated upstream base and revalidate the module diff before merging.

Main Changes

  • Inherit shared coverage tooling and include existing unit tests in the suite.
  • Close both distinct clients on logger/progress failures without saving progress after a logger failure or repeating close side effects.
  • Preserve test profile selection and add the scoped JVM opening required by Hive ORC.
  • Honor JAVA_HOME in launcher/converter paths and quote the selected Java executable; source/target remain Java 8.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage.
  • Already covered by Loader unit tests and launcher checks.
  • Need tests and can be verified as follows:
    • Preparation suites and profile models were validated on JDK 11 and 17.
    • Latest logger/progress failure, suppressed-error and idempotence regressions passed on native Java 17.
    • Previous file-profile validation covers ORC, Parquet, authentication and HTTPS; current-head CI is still running/queued.

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (build/test tooling only; runtime payload is unchanged by this preparation)
  • Modify configurations (CI/test configuration)
  • The public API (compatible behavior; signatures unchanged)
  • Other affects: tests and validation tooling

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

imbajin added 14 commits October 3, 2026 23:53
- manage compiler, surefire and coverage plugin versions
- keep Java 8 output and use compatible Mockito 4
- resolve optional server repositories, refs and pins
- verify checkout and package servers without install
- share authenticated startup and filter AppleDouble files
- connect repository and fetch refs to all server installers
- reuse the shared installer for Tools and Spark validation
- preserve Loader source caching with verified checkouts
- isolate fixture builds and retain separate HTTPS RPC ports
- preserve Mockito 2 interaction assertions with the equivalent API
- align test-only Byte Buddy dependencies with Mockito 4
- retain the Spring Boot 2 and Java 11 shared baseline
- run shared server selection and installer tests in one CI job
- document Maven 3.6.3 as the minimum source build version
- report missing or ambiguous server archives before exiting
- trigger push checks for client installer changes
- trigger pull request checks for the same source path
- cover the installer exercised by the existing contracts
- encode legacy graph configuration as properties
- keep task and target tests aligned with server contracts
- inherit shared compiler and coverage plugin versions
- preserve Java 8 APIs in compatibility tests
- Inherit coverage tooling and keep scoped ORC access on Java 17.
- Update test-only container support and include existing unit coverage.
- Close both distinct clients and cover shared, separate and failing closes.
- Preserve the current Java baseline; shared-base runtime validation is pending.
- Apply the ORC module opening only on JDK 17 and later.
- Keep default file-test selection when the JDK profile is active.
- Preserve the primary close exception and suppress secondary failures.
- Validate JVM option boundaries and unit/file suites on JDK 11 and 17.
- Restore profile test selection without global file-test defaults.
- Keep scoped ORC access and late coverage on JDK 11/17 test JVMs.
- Mark client cleanup closed even when either client throws.
- Cover primary, secondary and dual failures followed by retry.
- disable persisted checkout credentials in the contract job
- preserve read-only source checkout permissions
- retain the existing local Git fixture contracts
- Give each HTTPS test its own client and clean it up only when opened.
- Clear the client even when closing fails so teardown cannot reuse it.
- Prepare the pinned official trust store once per class and verify downloads.
- Compile and probe negative builder lifecycle on JDK 11 and 17 without server writes.
- report missing or ambiguous Loader server archives
- stop before shared server startup
- cover stale archives on a cached install
- encode absent legacy clone config as empty text
- verify the actual HTTP request body and route
- cover rejected null and nested config values
- close both clients when logger or progress work fails
- preserve primary and suppressed cleanup failures
- retain skipped progress saving and close idempotence
@github-actions github-actions Bot added hubble hugegraph-hubble loader hugegraph-loader client hugegraph-client tools hugegraph-tools spark labels Oct 4, 2026
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.27%. Comparing base (b066b80) to head (7c1ca96).
⚠️ Report is 246 commits behind head on master.

Files with missing lines Patch % Lines
.../apache/hugegraph/loader/executor/LoadOptions.java 0.00% 2 Missing and 1 partial ⚠️
.../apache/hugegraph/loader/executor/LoadContext.java 86.66% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b066b80) and HEAD (7c1ca96). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b066b80) HEAD (7c1ca96)
2 1
Additional details and impacted files
@@              Coverage Diff              @@
##             master     #778       +/-   ##
=============================================
- Coverage     62.49%   52.27%   -10.23%     
+ Complexity     1903      986      -917     
=============================================
  Files           262      111      -151     
  Lines          9541     5875     -3666     
  Branches        886      755      -131     
=============================================
- Hits           5963     3071     -2892     
+ Misses         3190     2561      -629     
+ Partials        388      243      -145     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- close the loopback request stream after reading
- retain HTTP body and route assertions
- verify the existing client unit suite
- describe cleanup of all loader clients
- preserve cleanup order and exception handling
- verify the existing cleanup unit suite
- bind cached archives to repository and commit
- reject unverified caches without altering their contents
- version the Loader CI cache key for provenance
- cover cache identity and preservation with local fixtures
- Keep one active run per workflow and PR
- Preserve push and manual workflow executions
- Cover CI workflows on this PR target branch
- Keep one active run per workflow and PR
- Preserve push and manual workflow executions
- Cover CI workflows on this PR target branch
- group labeler runs by PR and event
- cancel older metadata updates for the same PR
- preserve independent workflow runs
- group labeler runs by PR and event
- cancel older metadata updates for the same PR
- preserve independent workflow runs
- return failure for malformed or incomplete options
- keep help output successful before arity checks
- exercise real parser process exits and usage output
- decouple progress parsing from functional clients
- remove unused Microsoft feeds from the temporary runner
- retain Playwright browser dependency installation
- preserve Ubuntu sources and package signature checks
- retain standard property escaping for legacy servers
- encode spaces without Commons parser trimming
- verify leading trailing and all-space string values
- keep empty clone and scalar validation behavior

@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: no. Summary: The LoadContext cleanup now closes both distinct clients with the primary exception preserved, and the CLI exit codes are fixed; the new unit tests run in loader CI (UnitTestSuite 33 tests passing). One Minor launcher diagnosability regression. Score 8/10. Evidence: exact-head worktree review of the full diff, LoadContext/LoadOptions call sites, loader-ci (11) job log, and a local reproduction of the launcher exit path under set -eo pipefail.

Comment thread hugegraph-loader/assembly/static/bin/hugegraph-loader.sh
- encode non-ASCII config characters as Unicode escapes
- retain whitespace and literal backslash semantics
- verify ASCII bodies across three charset encodings
- merge upstream master after shared build preparation
- retain upstream fixture and cache provenance fixes
- preserve client compatibility changes and regressions
- preserve final build preparation files
- connect upstream squash history
- share synchronization across dependent branches
- absorb upstream client compatibility fixes
- retain shared preparation history
- align dependent branches with upstream master
- absorb finalized shared build preparation
- include merged client compatibility fixes
- preserve independent module changes
- validate Java before probing its version
- preserve the existing setup diagnostic
- cover missing Java and supported launcher options
- preserve the exact upstream master content
- link the finalized client preparation history
- keep organization module review diffs focused
- preserve the verified module file tree
- reconcile organization and upstream client history
- keep review diffs relative to the merged client
@github-actions github-actions Bot removed hubble hugegraph-hubble client hugegraph-client tools hugegraph-tools spark labels Oct 5, 2026
@imbajin imbajin changed the title fix(loader): prepare JVM tests and resource cleanup refactor(loader): prepare JVM tests and resource for Java17 Oct 5, 2026
@imbajin
imbajin merged commit 9827ec8 into apache:master Oct 5, 2026
10 of 12 checks passed
@imbajin
imbajin deleted the java17-loader-prep branch October 5, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loader hugegraph-loader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants