Background / Motivation
lance-namespace currently ships a REST specification (OpenAPI) together
with three generated clients (Java / Python / Rust) and a Spring Boot
reference server. However, there is no automated mechanism to
guarantee that:
- The three language clients stay wire-compatible with the server.
- Changes to the server-side controllers do not silently break
existing consumer expectations (request shape, response schema,
error envelope).
- The
ErrorResponse (error, code, type, detail) contract
is uniformly enforced across every endpoint.
Traditional integration tests are too coarse for this: they rely on a
live server, do not pinpoint which side broke the contract, and give
no early feedback to consumer authors.
We propose adopting Pact consumer-driven
contract testing as the standard approach for cross-language API
contract assurance in this repository.
Proposal
Introduce a full Pact-based contract testing suite with a locked
"contract pack" serving as the single source of truth, covering
both Namespace and Table REST APIs (11 operations × success + 4xx
error scenarios).
APIs under contract
| Domain |
Operations |
| Namespace API |
ListNamespaces, DescribeNamespace, CreateNamespace, DropNamespace, NamespaceExists |
| Table API |
ListTables, DescribeTable, TableExists, DropTable, RegisterTable, DeregisterTable |
Each operation is covered by at least one 2xx success case and one
4xx error case with the unified ErrorResponse schema.
google doc: https://docs.google.com/document/d/1Wju0Ema10OkuDLs8tYzZ0xXqihX65k-OYabZbnc5NbI/edit?usp=sharing
Background / Motivation
lance-namespacecurrently ships a REST specification (OpenAPI) togetherwith three generated clients (Java / Python / Rust) and a Spring Boot
reference server. However, there is no automated mechanism to
guarantee that:
existing consumer expectations (request shape, response schema,
error envelope).
ErrorResponse(error,code,type,detail) contractis uniformly enforced across every endpoint.
Traditional integration tests are too coarse for this: they rely on a
live server, do not pinpoint which side broke the contract, and give
no early feedback to consumer authors.
We propose adopting Pact consumer-driven
contract testing as the standard approach for cross-language API
contract assurance in this repository.
Proposal
Introduce a full Pact-based contract testing suite with a locked
"contract pack" serving as the single source of truth, covering
both Namespace and Table REST APIs (11 operations × success + 4xx
error scenarios).
APIs under contract
ListNamespaces,DescribeNamespace,CreateNamespace,DropNamespace,NamespaceExistsListTables,DescribeTable,TableExists,DropTable,RegisterTable,DeregisterTableEach operation is covered by at least one 2xx success case and one
4xx error case with the unified
ErrorResponseschema.google doc: https://docs.google.com/document/d/1Wju0Ema10OkuDLs8tYzZ0xXqihX65k-OYabZbnc5NbI/edit?usp=sharing