-
Notifications
You must be signed in to change notification settings - Fork 154
Upgrade to Axum 0.8 and update dependencies #4083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jmg-duarte
wants to merge
10
commits into
jmgd/axum/orderbook-2
Choose a base branch
from
jmgd/axum/8
base: jmgd/axum/orderbook-2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
This commit migrates the orderbook HTTP API from the warp web framework to axum. The migration includes: - Replace warp filters with axum Router and handlers - Update HTTP status codes to match axum conventions (422 for JSON deserialization errors, proper 400/404 distinction) - Restructure API with centralized AppState shared across handlers - Implement axum-compatible middleware for metrics and tracing - Remove warp dependency and related tracing utilities - Update e2e tests to reflect new HTTP behavior Breaking changes: - Invalid JSON payloads now return 422 (Unprocessable Entity) instead of 400 - Path parameter validation now returns 400 for malformed values - Error response format remains compatible 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Fixed critical issues identified in PR review: - Fixed route conflicts by using .merge() for multiple HTTP methods on same paths - Changed get_trades_v2 to use database_read instead of database_write - Reorganized routes alphabetically by prefix using .nest() for better maintainability - Made METRIC_LABELS a module-level const for reusability - Removed convert_json_response helper (too simple to warrant abstraction) - Optimized Arc wrapping by using trait references directly - Applied per-method middleware before merging to ensure correct metric labels - Simplified test code by removing unnecessary verbose match expressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Updates Axum from 0.6 to 0.8 along with related ecosystem dependencies: - axum 0.6.20 -> 0.8.8 - tower 0.4.13/0.5.3 -> 0.5.3 (unified) - tower-http 0.4.4/0.6.8 -> 0.6.8 (unified) - hyper 0.14.32 -> 1.8.1 - reqwest 0.11.27/0.12.28 -> 0.13.1 - tonic 0.11.0/0.13.1 -> 0.14.2 - console-subscriber 0.3.0 -> 0.5.0 Updates API compatibility across all services (autopilot, driver, orderbook, solvers) and test infrastructure (e2e tests, mocks) to work with new Axum extractors and response types. Fixes observability integration with updated tracing-axum layer and metrics collection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Axum 0.8 changed path parameter syntax from `:param` to `{param}`.
Updated all route definitions across:
- autopilot: /native_price/{token}
- driver tests: /api/v1/app_data/{app_data}
- orderbook v1 API: account, app_data, orders, solver_competition, token,
transactions, and users routes
- orderbook v2 API: solver_competition routes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
45e0f9a to
9af007d
Compare
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.
Description
Updates Axum from 0.6 to 0.8 along with related ecosystem dependencies:
Changes
How to test
Compilation, E2E tests, staging