ENG-6268: migrate plateau to axum 0.8 - #94
Open
imp wants to merge 2 commits into
Open
Conversation
- 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).
4 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PartitionSelector/SchemaChunkschema derivation andIntoParamsfield overrides for utoipa 5's stricter generics/schema model:name->{name}),Server::bind->axum::serve,FromRequest<S, B>->FromRequest<S>,boxed(Full::new(...))->Body::from(...), swapaxum::headers::ContentTypefor a directheadersdependency (axum-extra isn't needed - no typed-header extraction happens here), addOptionalFromRequestPartsfor the customQueryextractor since axum no longer blanket-supportsOption<T>for arbitraryFromRequestPartsimplsiteration_requestsending JSONnullinstead of an emptyTopicIteratorwhen no position is given - silently tolerated by axum 0.6's lenientOption<Json<T>>error handling, correctly rejected by axum 0.8's stricterJsonextractorNo 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 --workspacecargo clippy --workspace --all-targets(clean except 2 pre-existing warnings in catalog, unrelated to this change)cargo fmt --all -- --checkcargo 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)