richiebachala opened a new pull request, #2190: URL: https://github.com/apache/iceberg-go/pull/2190
Part of #1691. Adds an opt-in integration test that runs the catalog conformance suite against [Apache Polaris](https://polaris.apache.org/), a second REST catalog implementation alongside the Java REST fixture. ## Why A single fixture can mask client-side divergences. Both rename fixes from #2165 (409 to `ErrTableAlreadyExists`) and #2173 (missing-namespace 404 to `ErrNoSuchNamespace`) were REST client mapping bugs. Running the same suite against an independent server is the cheapest way to catch the next one. ## Changes - `catalog/rest/polaris_conformance_test.go`: `TestPolarisCatalogConformance`, behind the `integration` build tag. - **Opt-in:** skipped unless `POLARIS_URI` is set, so the existing integration job is unaffected. - Once enabled, `POLARIS_CREDENTIAL` (`client_id:client_secret`) and `POLARIS_WAREHOUSE` are required rather than defaulted, so a misconfiguration fails loudly instead of silently using built-in credentials. - Uses scope `PRINCIPAL_ROLE:ALL`; Polaris rejects the client's default `catalog` scope with `invalid_scope`. - `CONTRIBUTING.md`: setup for a local Polaris server with file storage, pinned to `apache/polaris:1.8.0`. - The catalog role needs `CATALOG_MANAGE_CONTENT`: the client sends `X-Iceberg-Access-Delegation: vended-credentials` by default, which Polaris authorizes with `TABLE_WRITE_DATA`. Without the grant, every table test fails with `ForbiddenException`. ## Design notes - **Opt-in vs CI.** I asked on #1691 whether Polaris should be a service in `internal/recipe/docker-compose.yml`. Opt-in is the lighter default: it adds no image to every integration run. Happy to move it into the compose file and CI if you'd prefer the coverage on every PR. - **No bootstrap in the test.** Creating the Polaris catalog and grant from the test would mean adding a Polaris management-API client to iceberg-go's tests, which seemed out of scope. The setup lives in CONTRIBUTING instead. ## Testing - All 27 conformance subtests pass against `apache/polaris:1.8.0`. - The CONTRIBUTING block was run verbatim under `bash -e` against a fresh container and passes. Rerunning the `go test` step against the same catalog also passes. - With `POLARIS_URI` unset, the test skips, and `TestRestCatalogConformance` passes against the Java fixture. - `go vet -tags integration` and `golangci-lint`: no findings in the new file. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
