Skip to content

Comments

[order] build / refactor : upgrade http dependencies for API server#51

Merged
metalalive merged 9 commits intomasterfrom
order-mgt-dev/build/upgrade-http-dependency
Oct 4, 2025
Merged

[order] build / refactor : upgrade http dependencies for API server#51
metalalive merged 9 commits intomasterfrom
order-mgt-dev/build/upgrade-http-dependency

Conversation

@metalalive
Copy link
Owner

No description provided.

- add log messages to API endpoint
- seperate environment variables for different purposes, some for app
  servers in dev env and others for smoke test

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- TODO , fix errors due to breaking changes in axum / hyper migration

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- new version of axum respects only curly bracket `{myvar}` when extracing
  captures from URI path , obsolate style `:myvar` starting with colon
  has been no longer supported and will cause panic.

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- replace `Hyper::Body` (removed in hyper v1) with `BoxBody<Bytes, Infallible>`
- bridge the gap between hyper's `http1::handshake` and tokio's TCP
  stream and TLS connector, by TokioIo wrapper
- adjust `SendRequest` and `Request` in function signatures

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
….8 and hyper v1

- Remove unused `http_body::Body` trait import and eliminate generic type
  parameter HB from route type definitions. Axum v0.8 no longer requires
  explicit body type parameters for routing
- modify edit billing/shipping handler query params, use deserializable
  struct to extract multiple optional query params (for axum v0.8).
- Replace hyper v0.14 server builder with axum::serve() function:
  - Remove Limited/HyperBody type parameters
  - Update `net_server_listener` to async `net_listener` with `TcpListener`
  - Restructure middleware layering for per-connection services
  - Improve error handling with Result return type

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- Replace deprecated hyper v0.14 types with v1 equivalents:
  - Update `Connection` and `SendRequest` types from hyper client API
  - Replace `Body::data()` with `Body::frame()`, `into_data()`, and
   `BodyExt` trait from `http_body_util` for body utilities
  - bridge the gap between hyper v1 handshake function and tokio's TCP
    stream, using `hyper_util` TokioIo adapter
  - Update TypedHeader from `axum` to `axum_extra`
  - Add Clone derive to AppAuthedClaim for axum v0.8 compatibility
  - Replace `async_trait` macro with native async fn in `FromRequestParts`
  - Fix error handling: change is_connect() to is_closed()

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- remove generic type parameters from `app_web_service` and routing
- update `net_server_listener` to async `net_listener` that returns
  `TcpListener`
- replace `HyperServer::try_bind` with `TcpListener::bind`
- update middleware types to remove generic RespBody parameters
- replace http_body::Body trait methods: `poll_data` with `poll_frame`
- update ShutdownExpRespBody to use `http_body_util::Full`
- remove `poll_trailers` implementation (deprecated in http-body v1)
- remove phantom data usage in ShutdownDetection layer

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
- replace hyper v0.14 body types with axum v0.8 equivalents
- replace HyperBody with AxumBody throughout the entire test
- replace `Body::data()` with `Body::frame()` and `into_data()`
- remove generic type parameters from `WebServiceRoute`
- update response body extraction with proper error handling

Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
Signed-off-by: T.H. <7197142+metalalive@users.noreply.github.com>
@metalalive metalalive self-assigned this Oct 4, 2025
@metalalive metalalive added build issues related to build tools devlopment environment order-processing test labels Oct 4, 2025
@metalalive metalalive merged commit 5d2d414 into master Oct 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build issues related to build tools devlopment environment order-processing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant