Skip to content

Use shared Iroh-aware Java worker CLI #148

Use shared Iroh-aware Java worker CLI

Use shared Iroh-aware Java worker CLI #148

Workflow file for this run

# Copyright 2026 Query Farm LLC - https://query.farm
#
# Runs the canonical vgi integration sqllogictest suite against the Java
# example worker on every push / PR. Rather than building the C++ extension
# from source, it drives a prebuilt standalone `haybarn-unittest` (the
# DuckDB/Haybarn sqllogictest runner) and installs the SIGNED vgi extension
# from the Haybarn community channel + its deps from core. The .test files
# come from a pinned Query-farm/vgi checkout; ci/preprocess-require.awk turns
# each `require <ext>` gate into an explicit INSTALL+LOAD so the standalone
# runner (which links none of these extensions) can run them.
#
# See ci/README.md for the full design and the version-pin coupling.
name: Integration suite
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: integration-${{ github.ref }}
cancel-in-progress: true
env:
# The Query-farm/vgi commit whose test/sql/integration suite we run.
#
# This MUST be the same commit the community channel's vgi extension is built
# from -- see `repo.ref` in Query-farm-haybarn/haybarn-community-extensions
# extensions/vgi/description.yml -- because the extension is installed live
# (`INSTALL vgi FROM community`) and is NOT pinned here. The .test files and
# the extension binary are two halves of one client; skewing them tests a
# client against another client's tests.
#
# It was `main` (floating), which is how the 2026-08-26 upstream trio
# 27b6ded / f10b9bc / a0eb66b broke all three lanes: those commits added the
# `reason=secret_dependent` result-cache assertion to
# cache/secret_ineligible.test and the shared callable-discovery RPC-count
# assertion to macro/macros.test, TOGETHER WITH the C++ client code that
# satisfies them. The suite picked up the tests; the published extension did
# not have the code. Neither is a Java worker defect -- both files pass
# against a from-source extension built at vgi main with this same worker.
#
# Bump deliberately, in lockstep with the community republish, and
# re-validate locally (see ci/README.md "Version pins").
VGI_REF: 40891ac19b84ad8d545e6d3853104cebfaef8cb3
# The Haybarn release providing the prebuilt haybarn-unittest binary is
# resolved to the latest release at run time (see the "Resolve latest haybarn
# release" step) so the unittest host stays ABI-compatible with the rebuilt
# community-published vgi extension, mirroring the vgi-typescript CI.
# The vgi-rpc-java revision built from source (composite include) for the
# worker's HTTP features. The composite substitutes the `farm.query:vgirpc`
# coordinate declared in vgi/build.gradle.kts, so this ref, not the declared
# version, is what the worker actually compiles against. An untagged SHA
# rather than a tag: see the pin's full comment in ci.yml, and keep the two
# in step.
VGI_RPC_JAVA_REF: 920dc42cb7d7e652d582de7fbb5b0b7ee3836a34
jobs:
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# launch: the AF_UNIX worker pool. shm: same, plus the POSIX
# shared-memory side channel (VGI_RPC_SHM_SIZE_BYTES). http: the whole
# suite over the stateless HTTP transport (state-token continuations),
# mirroring vgi's `make test_http`.
- { lane: launch }
- { lane: shm, shm_bytes: '67108864' }
- { lane: http, transport: http }
name: integration (${{ matrix.lane }})
steps:
- name: Checkout vgi-java
uses: actions/checkout@v4
- name: Checkout pinned vgi test suite
uses: actions/checkout@v4
with:
repository: Query-farm/vgi
ref: ${{ env.VGI_REF }}
path: vgi-upstream
# Build the vgirpc RPC layer from source (composite include) so the worker
# picks up the HTTP features the integration suite needs (gzip negotiation,
# sticky cookies) ahead of the next published vgirpc release.
- 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: Build example worker
run: ./gradlew --no-daemon :vgi-example-worker:installDist
env:
VGI_RPC_JAVA_DIR: ${{ github.workspace }}/vgi-rpc-java
- name: Resolve latest haybarn release
run: |
REL=$(gh release view --repo Query-farm-haybarn/haybarn --json tagName --jq .tagName)
echo "HAYBARN_RELEASE=$REL" >> "$GITHUB_ENV"
echo "Latest haybarn release: $REL"
env:
GH_TOKEN: ${{ github.token }}
- name: Download haybarn-unittest
run: |
gh release download "$HAYBARN_RELEASE" \
--repo Query-farm-haybarn/haybarn \
--pattern 'haybarn_unittest-linux-amd64.zip' \
--output /tmp/haybarn-unittest.zip --clobber
unzip -o -q /tmp/haybarn-unittest.zip -d /tmp/haybarn-unittest
UNITTEST=$(find /tmp/haybarn-unittest -name 'haybarn-unittest' -type f | head -1)
chmod +x "$UNITTEST"
echo "HAYBARN_UNITTEST=$UNITTEST" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ github.token }}
- name: Run integration suite (${{ matrix.lane }})
run: ci/run-integration.sh
env:
VGI_SRC: ${{ github.workspace }}/vgi-upstream
VGI_WORKER_BIN: ${{ github.workspace }}/vgi-example-worker/build/install/vgi-example-worker/bin/vgi-example-worker
# Empty for the launch lane; run-integration.sh drops an empty value.
VGI_RPC_SHM_SIZE_BYTES: ${{ matrix.shm_bytes || '' }}
# launch (default) unless the lane selects the http transport.
TRANSPORT: ${{ matrix.transport || 'launch' }}
# JDK 25 + native access for the worker JVM (FFM shm, haybarn_jdbc).
JAVA_TOOL_OPTIONS: --enable-native-access=ALL-UNNAMED