Skip to content

ENG-6268: migrate plateau to axum 0.8 - #94

Open
imp wants to merge 2 commits into
mainfrom
imp/plateau-axum08
Open

ENG-6268: migrate plateau to axum 0.8#94
imp wants to merge 2 commits into
mainfrom
imp/plateau-axum08

Conversation

@imp

@imp imp commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • catalog: drop unused axum dependency
  • transport: bump utoipa 4->5 (required transitively by utoipa-swagger-ui's axum 0.8 support); adjust PartitionSelector/SchemaChunk schema derivation and IntoParams field overrides for utoipa 5's stricter generics/schema model
  • server: axum 0.6->0.8, tower-http 0.7, utoipa-swagger-ui 9; route syntax (:name -> {name}), Server::bind -> axum::serve, FromRequest<S, B> -> FromRequest<S>, boxed(Full::new(...)) -> Body::from(...), swap axum::headers::ContentType for a direct headers dependency (axum-extra isn't needed - no typed-header extraction happens here), add OptionalFromRequestParts for the custom Query extractor since axum no longer blanket-supports Option<T> for arbitrary FromRequestParts impls
  • client: fix iteration_request sending JSON null instead of an empty TopicIterator when no position is given - silently tolerated by axum 0.6's lenient Option<Json<T>> error handling, correctly rejected by axum 0.8's stricter Json extractor

No dependency lock with fitzroy/platform - consumed via a git tag pin (v0.5.11), not a path/workspace dependency, so this can land independently of the platform-side fitzroy axum 0.8 migration (ENG-6220, currently on hold).

Stacked PR on top: reqwest 0.12 / http-stack unification (separate PR, targets this branch).

Test plan

  • cargo check --workspace
  • cargo clippy --workspace --all-targets (clean except 2 pre-existing warnings in catalog, unrelated to this change)
  • cargo fmt --all -- --check
  • cargo test --workspace (all green except one pre-existing, machine-local flake unrelated to this PR - reproduces identically on unmodified main - a local process squatting on port 3030)

- catalog: drop unused axum dependency
- transport: bump utoipa 4->5 (required transitively by utoipa-swagger-ui's
  axum 0.8 support); adjust PartitionSelector/SchemaChunk schema derivation
  and IntoParams field overrides for utoipa 5's stricter generics/schema
  model
- server: axum 0.6->0.8, tower-http 0.7, utoipa-swagger-ui 9; route syntax
  (:name -> {name}), Server::bind -> axum::serve, FromRequest<S, B> ->
  FromRequest<S>, boxed(Full::new(...)) -> Body::from(...), swap
  axum::headers::ContentType for a direct headers dependency (axum-extra
  isn't needed here - the code never does typed-header extraction), and
  add OptionalFromRequestParts for the custom Query extractor since axum
  no longer blanket-supports Option<T> for arbitrary FromRequestParts
  impls
- client: fix iteration_request sending JSON null instead of an empty
  TopicIterator when no position is given - silently tolerated by axum
  0.6's lenient Option<Json<T>> error handling, correctly rejected by
  axum 0.8's stricter Json extractor

No dependency lock with fitzroy (platform consumes plateau via a git tag
pin, not a path/workspace dependency).
topic_iterate is the one plateau-server function fitzroy calls into
directly (not over HTTP) - it took Option<Query<T>>/HeaderMap/
Option<Json<T>> and immediately unwrapped them as its first three
lines, so the axum-typed parameters were never actually needed by the
function body. Moved that unwrapping into topic_iterate_route (the
actual axum handler) instead, so topic_iterate now takes plain domain
types (TopicIterationQuery, Option<&str>, TopicIterator).

This removes half of the hard axum-version coupling between
plateau-server and fitzroy - callers no longer need matching
Query/HeaderMap/Json types to call this function. The return type
(axum::response::Response) is still coupled, since the function
genuinely does Accept-header content negotiation and builds a real
HTTP response - decoupling that needs a plain intermediate
representation and touches both plateau's and fitzroy's side, left
for whoever picks up ENG-6220.

No behavior change - pure signature refactor.
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