Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# Type-surface conformance status

Generated by `dev/build-status-matrix.py` from the type-surface runners
(`table-spec/types/`). It reports; it does not block:

- **PASS** - matches the spec-derived fixture.
- **FAIL** - a genuine divergence from the spec-derived fixture.
- **UNSUPPORTED** - a type the implementation has not built yet (a skip-list candidate).


| Implementation | Pass | Fail | Unsupported | Skip | Status |
|---|---|---|---|---|---|

## Divergences and gaps

None reported.

113 changes: 113 additions & 0 deletions .github/workflows/conformance-java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: "Conformance (Java)"

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
build:
name: build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 15
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
steps:
- name: Checkout fixtures
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check runner deps are release-clean
run: bash dev/check-runner-deps.sh
- name: Install Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: zulu
java-version: '17'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- name: Format check and grader self-test
working-directory: runners/java
run: ./gradlew spotlessCheck test

conformance-java:
name: iceberg-java type conformance ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
# Advisory: never blocks this repo's CI (tracks a moving upstream SNAPSHOT).
continue-on-error: true
steps:
- name: Checkout fixtures
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: zulu
java-version: '17'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- name: Run type conformance
id: run
working-directory: runners/java
run: |
set +e
meta="https://repository.apache.org/content/repositories/snapshots/org/apache/iceberg/iceberg-api/maven-metadata.xml"
version="$(curl -fsSL "$meta" | grep -o '<latest>[^<]*</latest>' | sed -e 's/<[^>]*>//g' | head -1)"
if [ -z "$version" ]; then
version="1.12.0-SNAPSHOT"
echo "WARN: could not resolve latest SNAPSHOT from $meta; using fallback $version" >&2
fi
echo "resolved=iceberg-api:$version" >> "$GITHUB_OUTPUT"
if ./gradlew installDist --quiet -PicebergVersion="$version"; then
build/install/conformance-java/bin/conformance-java --surface types 2>&1 | tee "$GITHUB_WORKSPACE/runner-output.txt"
code=${PIPESTATUS[0]}
else
code=2
fi
echo "code=$code" >> "$GITHUB_OUTPUT"
- name: Report results (step summary + annotations)
if: always()
env:
RUN_CODE: ${{ steps.run.outputs.code }}
RUN_RESOLVED: ${{ steps.run.outputs.resolved }}
run: >
bash "$GITHUB_WORKSPACE/dev/ci-report.sh"
iceberg-java "$GITHUB_WORKSPACE/runner-output.txt"
snapshot "$RUN_CODE"
"$RUN_RESOLVED"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ repository to a commit, runs the surfaces it opts into, and bumps that pin
deliberately. There is no central conformance gate and no pass/fail matrix
across implementations.

## Runners

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.

I'd drop this section. Runners hosted here can only test published artifacts, so conformance never gates the Iceberg commit that breaks it. Per the proposal, each implementation pins this repo and runs the fixtures in its own CI, so I'd move the Java runner into apache/iceberg as a regular test.


Reference runners that check each implementation against the fixtures live in
[`runners/`](runners/README.md), with a per-language support matrix and CI status.

## Contributing

TODO: `CONTRIBUTING.md`, covering repository layout, fixture format, and how to
Expand Down
4 changes: 4 additions & 0 deletions dev/.rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ lib
# Apache header; they are covered by the repository LICENSE and NOTICE at the root.
**/*.json
**/*.jsonl

# Vendored Gradle wrapper (upstream Gradle files, no ASF header).
**/gradle/wrapper/gradle-wrapper.properties
**/gradle/wrapper/gradle-wrapper.jar
41 changes: 41 additions & 0 deletions dev/check-runner-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Fail if a committed runner dependency file carries a local source override.
set -uo pipefail
root="$(cd "$(dirname "$0")/.." && pwd)"
fail=0

check() { # <file> <extended-regex> <message>
hits="$(grep -nE "$2" "$root/$1" 2>/dev/null)"
if [ -n "$hits" ]; then
echo "FAIL: $1 - $3"
printf '%s\n' "$hits" | sed 's/^/ /'
fail=1
fi
}

check runners/java/build.gradle 'mavenLocal|includeBuild' "committed local build reference - leaked"
check runners/java/settings.gradle 'includeBuild' "committed composite-build reference - leaked"

if [ "$fail" -eq 0 ]; then
echo "runner deps are release-clean"
else
exit 1
fi
70 changes: 70 additions & 0 deletions dev/ci-report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Render a runner's exit code and output to the CI step summary and annotations.
# Usage: ci-report.sh <impl> <runner-output-file> <lane> <exit-code> [<resolved-version>]
set -uo pipefail

impl="${1:?usage: ci-report.sh <impl> <out> <lane> <exit-code> [<resolved>]}"
out="${2:?usage: ci-report.sh <impl> <out> <lane> <exit-code> [<resolved>]}"
lane="${3:-release}"
# Missing code = the run step was skipped; default to ERROR, never PASS.
code="${4:-2}"
resolved="${5:-unknown}"

totals="$(grep -m1 '^TOTALS:' "$out" 2>/dev/null || echo 'TOTALS: (runner produced no summary - see the step log)')"
fails="$(grep -m1 '^FAIL ids:' "$out" 2>/dev/null || true)"
advisory="$(grep -m1 '^ADVISORY_FAIL ids:' "$out" 2>/dev/null || true)"
skip="$(grep -m1 '^SKIP ids:' "$out" 2>/dev/null || true)"

case "$code" in
0) verdict="PASS" ;;
1) verdict="FAIL" ;;
*) verdict="ERROR" ;;
esac

if [ "$verdict" = "FAIL" ]; then level="error"; else level="warning"; fi

# Step summary (no-op when not in CI).
if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
{
echo "### ${impl} - types conformance (${lane} lane)"
echo
echo "- result: **${verdict}**"
echo "- tested against: \`${resolved}\`"
echo
echo '```'
echo "${totals}"
[ -n "${fails}" ] && echo "${fails}"
[ -n "${advisory}" ] && echo "${advisory}"
[ -n "${skip}" ] && echo "${skip}"
echo '```'
echo
} >> "${GITHUB_STEP_SUMMARY}"
fi

# Inline annotations.
case "$verdict" in
FAIL) echo "::${level} title=${impl} ${lane} divergence::${fails:-conformance FAIL} (tested ${resolved})" ;;
ERROR) echo "::warning title=${impl} ${lane} runner error::runner exited ${code} before a verdict - see the step log" ;;
esac
[ -n "${advisory}" ] && echo "::notice title=${impl} advisory_fail (unmet SHOULD, non-blocking)::${advisory}"
[ -n "${skip}" ] && echo "::notice title=${impl} skip (skip-list candidate)::${skip}"

echo "RESULT: ${impl} [${lane}] ${verdict} (${resolved}) - ${totals}"
73 changes: 73 additions & 0 deletions runners/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# Runners

A runner parses each fixture `input` with one implementation's own type parser and
grades the result. Each lives under `runners/<language>/` with its own workflow, so
one runner's break can't redden another's.

## Support

| Runner | Surfaces | CI |
| --- | --- | --- |
| [Java](java/) | `types` | [![Java](https://github.com/nssalian/iceberg-verification/actions/workflows/conformance-java.yml/badge.svg)](https://github.com/nssalian/iceberg-verification/actions/workflows/conformance-java.yml) |
| Go | _planned_ | - |
| Rust | _planned_ | - |
| Python | _planned_ | - |

Surfaces are the fixture sets a runner opts into (`table-spec/manifest.json`); `schema`
has fixtures but no runner yet. The CI column is this repo's own run status, not a
conformance ranking of the implementations.

Each case grades into four states (full contract in `table-spec/types/README.md`):

- **pass** - matches the expectation.
- **fail** - a `must` violation; the only state that exits non-zero.
- **advisory_fail** - a failed `normative_level: should` case; reported, never blocks.
- **skip** - not run here (surface not subscribed, or the type isn't modeled).

`--surface <name>` (or `CONFORMANCE_SURFACES`) limits the run to a surface in
`table-spec/manifest.json`; the default runs every surface the runner implements. A
build or setup failure exits 2 (ERROR), distinct from a conformance `fail`. Output is
one line per case plus a summary:

```
TOTALS: N cases | pass=.. fail=.. advisory_fail=.. skip=..
FAIL ids: [...]
ADVISORY_FAIL ids: [...]
SKIP ids: [...]
```

The Java runner implements the `types` surface against the latest `iceberg-api`
SNAPSHOT (no release carries the v3 types yet). Go, Rust, Python, and a nightly lane
are not part of this change.

## Consuming the fixtures

Vendor this repo as a pinned git submodule and run the fixtures in your own CI:

```
git submodule add https://github.com/apache/iceberg-verification conformance
```

Then reuse a runner here (pointed at your build via `--include-build`, scoped with
`--surface`) or write your own check over `conformance/table-spec/<surface>/**/cases.json`:
parse `input`, compare to `decoded` (and `canonical` if present), report the four
states. Only `fail` blocks.
5 changes: 5 additions & 0 deletions runners/java/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Local-only: an iceberg clone for `--include-build` (CI resolves the Maven SNAPSHOT).
/iceberg-src/

/.gradle/
/build/
Loading
Loading