Skip to content

ci(java): compile and test the pure-Java SDK modules - #962

Open
keksmd wants to merge 2 commits into
apache:mainfrom
keksmd:java-sdk-ci
Open

ci(java): compile and test the pure-Java SDK modules#962
keksmd wants to merge 2 commits into
apache:mainfrom
keksmd:java-sdk-ci

Conversation

@keksmd

@keksmd keksmd commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Reason for this PR

No workflow compiles maven-projects/storage-api. java.yml is filtered to
maven-projects/java/** and java-info.yml to maven-projects/info/**, so a
change to the storage API merged in #958 reaches main having passed only the
license, pre-commit, and PR-title checks. Nothing proves it builds or that its
tests pass.

That gap widens with every module planned under #947 (physical IO, Parquet
backend, chunk layout, reader, writer): each would land with green checks that
never invoked javac.

What changes are included in this PR?

A GraphAr Java SDK CI workflow that, for the pure-Java SDK reactor, runs:

  • mvn -pl ${SDK_MODULES} -am spotless:check
  • mvn -pl ${SDK_MODULES} -am clean verify -Dspotless.check.skip=true
  • mvn -pl ${SDK_MODULES} -am javadoc:javadoc

The selected module list is a single SDK_MODULES environment variable, today
storage-api. Each new module extends that one line in the PR that introduces
it, which keeps the addition visible to a reviewer.

The reactor is selected by inclusion rather than by excluding java and
spark: those two aggregators enumerate their submodules inside profile-scoped
<modules> lists, so -pl '!java,!spark' still pulls graphar-datasources
into the reactor and fails on the Scala compile.

Path filters cover the SDK module directories and maven-projects/pom.xml.

Are these changes tested?

Yes, by running the workflow's exact three commands against this branch:

mvn --no-transfer-progress -pl storage-api -am spotless:check
BUILD SUCCESS

mvn --no-transfer-progress -pl storage-api -am clean verify -Dspotless.check.skip=true
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS

mvn --no-transfer-progress -pl storage-api -am javadoc:javadoc
BUILD SUCCESS

The workflow's own path filter includes .github/workflows/java-sdk.yml, so it
also runs on this pull request.

Are there any user-facing changes?

No. CI only.

Note: no module in the selected reactor declares the JaCoCo plugin yet, so this
workflow uploads no coverage report. Adding JaCoCo per module is left to the
PRs that introduce those modules.

Checklist

  • I have performed a self-review of my own code.
  • I have formatted my own code using make cpplint before submitting when changed files are in the cpp directory.
  • I have performed pre-commit run before commit the changed files.
  • I have added tests to prove my changes are effective.

No workflow builds maven-projects/storage-api. java.yml is filtered to
maven-projects/java/** and java-info.yml to maven-projects/info/**, so a
change to the storage API, or to any module layered on it, reaches main
having passed only the license and pre-commit checks. Nothing proves it
compiles.

This adds a workflow that runs spotless, verify, and javadoc over the
pure-Java SDK reactor. The module list lives in one environment variable
so each new module extends it in the pull request that introduces the
module.

Constraint: the java and spark aggregators cannot be excluded by name,
because their submodules are enumerated inside profile-scoped module
lists, so the reactor is selected by inclusion rather than exclusion.

Not-tested: no module in the selected reactor publishes a JaCoCo report
yet, so this workflow uploads no coverage.
Comment thread .github/workflows/java-sdk.yml
Comment thread .github/workflows/java-sdk.yml Outdated
Review feedback on apache#962: the workflow downloaded every dependency on
each run, which ASF Infra pays for, and it pinned an action version
three majors behind.

The Maven repository is now cached under a key built from the runner
OS and the hash of every pom in maven-projects, so a run that changes
no dependency restores instead of downloading. Build output is left
uncached: target directories restored across runs can hide a stale
class from a clean build.
@SemyonSinchenko

Copy link
Copy Markdown
Member

@SYaoJun @yangxk1 Hi! Let's merge this one? It is 100% required step.

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.

2 participants