Skip to content

Align Java integration fixtures with VGI conformance #33

Align Java integration fixtures with VGI conformance

Align Java integration fixtures with VGI conformance #33

Workflow file for this run

# Copyright 2026 Query Farm LLC - https://query.farm
#
# Unit tests and a javadoc build for the SDK itself. The Integration suite
# workflow covers the protocol end-to-end against a real DuckDB, but it only
# ever compiles the example worker -- vgi/src/test carried 278 JUnit tests that
# nothing in CI ran. This workflow is that gate.
#
# vgi-rpc-java is built from source here for the same reason integration.yml
# does it (see the pin's comment there); keep VGI_RPC_JAVA_REF in step with it.
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
# The vgi-rpc-java revision built from source via the composite include. The
# composite substitutes the `farm.query:vgirpc` coordinate declared in
# vgi/build.gradle.kts, so this ref -- not the declared version -- is what
# :vgi:compileJava actually compiles and runs against here. A stale pin fails
# as `cannot find symbol` on whatever the newer vgirpc added, or, as below, as
# a runtime marshalling error.
#
# This is an UNTAGGED SHA on vgi-rpc-java main, not a release, because no
# release contains the fix these sources need. v0.23.0 and v0.23.1 both ship a
# `writeListElement` whose ArrowType switch has no LargeBinary case, so
# serializing InitRequest.split_tokens (a large_binary List<byte[]>) throws
# `unsupported list element type: LargeBinary` -- which is exactly how
# PlanClientRoundTripTest.plansAndRedeemsEverySplitAcrossPagination fails when
# it redeems a table_function_plan split. Fixed by vgi-rpc-java 306e182.
# Move this back to a tag once a vgirpc release >= that commit is cut, and
# bump `farm.query:vgirpc` in vgi/build.gradle.kts to it in the same change --
# until then the PUBLISHED vgi-java cannot redeem a split, because it resolves
# the published vgirpc 0.23.x. Keep in step with the identical pin in
# integration.yml.
VGI_RPC_JAVA_REF: 920dc42cb7d7e652d582de7fbb5b0b7ee3836a34
jobs:
test:
name: Unit tests (JDK 25)
runs-on: ubuntu-latest
steps:
- name: Checkout vgi-java
uses: actions/checkout@v4
- name: Checkout pinned vgi-rpc-java
uses: actions/checkout@v4
with:
repository: Query-farm/vgi-rpc-java
ref: ${{ env.VGI_RPC_JAVA_REF }}
path: vgi-rpc-java
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: gradle-${{ runner.os }}-
- name: Unit tests
run: ./gradlew --no-daemon :vgi:test
env:
VGI_RPC_JAVA_DIR: ${{ github.workspace }}/vgi-rpc-java
# The published artifact carries javadoc, so a doc comment that does not
# build is a broken release, not a warning.
- name: Javadoc
run: ./gradlew --no-daemon :vgi:javadoc
env:
VGI_RPC_JAVA_DIR: ${{ github.workspace }}/vgi-rpc-java
- name: Upload test report on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: vgi/build/reports/tests/test