Skip to content

[gateway] Add the Gateway runtime, common HTTP layer, lifecycle, and test infrastructure - #3963

Open
beryllw wants to merge 7 commits into
apache:mainfrom
beryllw:gateway-g1-foundation
Open

[gateway] Add the Gateway runtime, common HTTP layer, lifecycle, and test infrastructure#3963
beryllw wants to merge 7 commits into
apache:mainfrom
beryllw:gateway-g1-foundation

Conversation

@beryllw

@beryllw beryllw commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3958

First PR of FIP-49: the Gateway runtime and HTTP foundation the later Gateway APIs build on. Authentication, the Fluss backend, and the data APIs come in follow-up issues, so this PR has no Fluss runtime dependency yet.

Distilled from the FIP-49 PoC, whose foundation was written by @gstamatakis95 and is credited via Co-authored-by.

Brief change log

  • fluss-gateway/ as an independent Cargo workspace, library plus executable.
  • Configuration: one gateway.yaml of flat dotted keys, env and CLI overrides, strict validation, stable exit codes (2 = config, 1 = serving, 0 = clean drain).
  • Common HTTP layer: error envelope, request IDs, unknown-route 404, body limit (413), request deadline (504).
  • GET /health returning {status, uptime_ms}, the one health endpoint FIP-49 defines; it keeps answering while the process drains and guarded routes answer 503.
  • Lifecycle: REST and metrics listeners, task supervision, SIGTERM draining, failure propagation.
  • OpenAPI 3.1 generated from the typed router and checked in, with CI drift and validation gates.

Tests

61 unit tests (config, error taxonomy, middleware, drain deadlines, OpenAPI document), the HTTP contract over a real listener, the compiled binary's startup/health/SIGTERM/exit codes, and a harness self-test that starts the fixed-version dockerized Fluss cluster. CI runs the E2E job so it fails rather than skips when a selected scenario cannot start.

API and Format

New endpoints GET /health and GET /v1/openapi.json, described by the checked-in OpenAPI document. No change to existing APIs or storage formats.

Documentation

Module-level rustdoc, enforced by cargo doc -D warnings. User-facing documentation is tracked by the FIP-49 documentation issue.

@beryllw
beryllw force-pushed the gateway-g1-foundation branch 2 times, most recently from 831c85f to fc487d0 Compare August 12, 2026 11:59
beryllw and others added 3 commits August 12, 2026 20:09
Introduces fluss-gateway as an independent Cargo workspace with library and executable entry points: strict configuration with stable exit codes, the shared error envelope, request-id/body-size/deadline middleware, the FIP-49 GET /health endpoint, REST and metrics listeners, task supervision with SIGTERM draining, and the OpenAPI 3.1 document generated from the typed router.

Co-authored-by: gstamatakis95 <126914070+gstamatakis95@users.noreply.github.com>
…uster harness

Covers the shared HTTP contract over a real listener, the compiled binary's startup, health, SIGTERM draining and exit codes, and a self-test of the fixed-version dockerized Fluss cluster harness that later capabilities reuse for their end-to-end suites.

Co-authored-by: gstamatakis95 <126914070+gstamatakis95@users.noreply.github.com>
Runs the gateway workspace's build, unit tests, license headers, formatting, clippy and rustdoc, checks the checked-in OpenAPI document for drift and validates it externally, and runs the end-to-end suite in a job that fails rather than skipping silently when a selected scenario cannot start.

Co-authored-by: gstamatakis95 <126914070+gstamatakis95@users.noreply.github.com>
@beryllw
beryllw force-pushed the gateway-g1-foundation branch from fc487d0 to f6e94e7 Compare August 12, 2026 12:11
… rename the harness job

Co-authored-by: gstamatakis95 <126914070+gstamatakis95@users.noreply.github.com>
@beryllw
beryllw marked this pull request as ready for review August 12, 2026 14:32
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.

[FIP-49][gateway] Add the Gateway runtime, common HTTP layer, lifecycle, and test infrastructure

1 participant