Skip to content

Iceberg REST Phase 1 [1/3]: OpenAPI spec and codegen infrastructure#498

Open
cbb330 wants to merge 2 commits intolinkedin:mainfrom
cbb330:chbush/iceberg-rest-1-codegen
Open

Iceberg REST Phase 1 [1/3]: OpenAPI spec and codegen infrastructure#498
cbb330 wants to merge 2 commits intolinkedin:mainfrom
cbb330:chbush/iceberg-rest-1-codegen

Conversation

@cbb330
Copy link
Collaborator

@cbb330 cbb330 commented Mar 11, 2026

Summary

Part 1 of 3 for Iceberg REST Catalog support (split from #497 for reviewability).

Vendors the upstream Apache Iceberg REST OpenAPI spec (v1.10) and wires Polaris-aligned contract-first codegen into the Gradle build.

Changes

  • Client-facing API Changes
  • Internal API Changes
  • Bug Fixes
  • New Features
  • Performance Improvements
  • Code Style
  • Refactoring
  • Documentation
  • Tests

Internal API Changes

  • spec/iceberg-rest-catalog-open-api.yaml: Upstream Iceberg REST spec vendored as source of truth (unchanged from Apache Iceberg 1.10)

New Features

  • services/tables/build.gradle: Codegen tasks (setUpOpenApiCliForIcebergRest, validateIcebergRestOpenApiSpec, generateIcebergRestOpenApiServer) with importMappings/typeMappings mapping spec schemas to real Iceberg library types (no model generation). Post-processing for Iceberg 1.10-only types mapped to Object (compatibility with our 1.5.2 fork). compileJava depends on codegen; check depends on spec validation.
  • jackson-databind-nullable dependency for generated code

Review guidance

The spec file is 4,955 lines of vendored upstream — just confirm the source. The interesting review is the ~120 lines of build.gradle additions (codegen config, type mappings, post-processing).

Testing Done

  • Manually Tested on local docker setup. Please include commands ran, and their output.
  • Added new tests for the changes made.
  • Updated existing tests to reflect the changes made.
  • No tests added or updated. Please explain why. If unsure, please feel free to ask for help.

Tests are in PR 3/3. This PR adds only build infrastructure; ./gradlew :services:tables:compileJava validates the generated interfaces compile.

Additional Information

  • Breaking Changes
  • Deprecations
  • Large PR broken into smaller PRs, and PR plan linked in the description.

PR Stack (merge in order)

  1. Iceberg REST Phase 1 [1/3]: OpenAPI spec and codegen infrastructure #498 — OpenAPI spec and codegen infrastructure ← you are here
  2. Iceberg REST Phase 1 [2/3]: Controller, serde, and exception handling #499 — Controller, serde, and exception handling
  3. Iceberg REST Phase 1 [3/3]: Tests and CI #500 — Tests and CI

Vendor the upstream Apache Iceberg REST OpenAPI spec (v1.10) and wire
Polaris-aligned codegen into the services/tables Gradle build:

- spec/iceberg-rest-catalog-open-api.yaml: upstream spec as source of truth
- Gradle tasks: setUpOpenApiCliForIcebergRest, validateIcebergRestOpenApiSpec,
  generateIcebergRestOpenApiServer with importMappings/typeMappings to map
  spec schemas to real Iceberg library types (no model generation)
- Post-processing for Iceberg 1.10-only types mapped to Object (compatibility
  with our 1.5.2 fork)
- compileJava depends on codegen; check depends on spec validation
- jackson-databind-nullable dependency for generated code
- Strip non-upstream comments (CODE_COPIED_TO_POLARIS, version marker) so
  the vendored spec is byte-for-byte identical to apache-iceberg-1.10.0
- Add verifyIcebergRestSpecSync Gradle task that downloads the upstream spec
  from the pinned tag and fails if it differs from the vendored copy
- Wire verifyIcebergRestSpecSync into the check task so CI catches drift
@cbb330 cbb330 force-pushed the chbush/iceberg-rest-1-codegen branch from 64083e8 to f9966a6 Compare March 11, 2026 23:23
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.

1 participant