-
Notifications
You must be signed in to change notification settings - Fork 10
chore(deps): update rust crate axum-test to v20 - autoclosed #946
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,7 +169,7 @@ google-cloud-storage = "1.12" | |
| google-cloud-auth = "1.10" | ||
|
|
||
| [dev-dependencies] | ||
| axum-test = { version = "18.4.1" } | ||
| axum-test = { version = "20.0.0" } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This update to axum-test v20.0.0 requires axum v0.8.8+ according to the official compatibility table, but the current axum dependency is declared as Why it matters: If Cargo resolves axum to a version < 0.8.8 (e.g., in a clean build or CI environment with cached lock files), there may be API incompatibilities between axum and axum-test that cause compilation failures or subtle runtime issues in tests. The axum-test library tightly couples to specific axum versions because it needs to understand axum's internal service types. Suggested fix: Update the axum dependency to explicitly require v0.8.8+: axum = { version = "0.8.8", features = ["multipart"] }This ensures both the production dependency and test dependency are aligned with their mutual compatibility requirements. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: Major version upgrade from 18.4.1 to 20.0.0 introduces breaking API changes that require code modifications. Why it matters: In axum-test v19.0.0, Per the v19.0.0 release notes: " Suggested fix: Either:
Example change: // Before (v18.x)
let server = TestServer::new(router).expect("Failed to create test server");
// After (v19+)
let server = TestServer::new(router);
// OR
let server = TestServer::try_new(router).expect("Failed to create test server");There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: Major version upgrade from v18.4.1 to v20.0.0 requires code changes. Why it matters: axum-test v19 introduced breaking changes that affect how The codebase has 11 instances of
While these will still compile (due to Suggested fix: Either:
Additionally, run the full test suite to verify behavioral changes in the mocked transport layer don't break any tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: axum-test v20.0.0 requires axum 0.8.8+ according to the axum-test compatibility table, but the axum dependency on line 21 is specified as Why it matters: If Cargo resolves axum to a version below 0.8.8 (e.g., 0.8.0-0.8.7), the build will fail due to version incompatibility between axum and axum-test. This creates an unstable build that depends on what version Cargo happens to resolve. Suggested fix: Update the axum dependency on line 21 to specify the minimum compatible version: axum = { version = "0.8.8", features = ["multipart"] }Alternatively, if you want to keep the broader 0.8 range, you should pin axum-test to v19.0.0 instead, which supports axum 0.8.8+ but may work with earlier 0.8.x versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Major version upgrade from 18.x to 20.x warrants test verification. Why it matters: Major version bumps typically include breaking changes. While the core Suggested fix: Run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This major version upgrade (v18 β v20) introduces a breaking API change that will cause 57 compilation errors in the test suite. Why it matters: In v18.4.1, Suggested fix: Either (1) update all call sites to remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This version upgrade introduces a breaking API change that will cause compilation failures. Why it matters: In axum-test v19+, Suggested fix: Alongside this dependency update, remove let server = axum_test::TestServer::new(service).expect("Failed to create test server");to: let server = axum_test::TestServer::new(service);If you need explicit error handling, use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: Major version upgrade from v18 to v20 introduces breaking API changes. Why it matters: In axum-test v19+, Per the v19.0.0 release notes:
Suggested fix: Either:
Affected files with this pattern:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This upgrade from v18.4.1 to v20.0.0 introduces a breaking API change that affects 46+ test locations in this codebase. Why it matters: In axum-test v19.0.0 (and therefore v20.0.0), From the v19.0.0 release notes:
Suggested fix: Replace all instances of: let server = TestServer::new(app).unwrap();With: let server = TestServer::new(app);Alternatively, if you need explicit error handling in tests, use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Major version dependency update requires verification. Why it matters: Upgrading from v18.4.1 to v20.0.0 spans two major versions (v19 and v20), which typically indicates breaking changes according to semver. While the core API surface ( Suggested fix: Before merging:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: The corresponding Why it matters: When
Suggested fix: Run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This upgrade introduces a breaking API change that will cause ~56 compilation errors across the test suite. Why it matters: In axum-test v19.0.0+, let server = axum_test::TestServer::new(router).expect("Failed to create test server");This will fail to compile because Per the v20 docs.rs: "Note: this will panic if the Suggested fix: Remove all // Before
let server = axum_test::TestServer::new(router).expect("Failed to create test server");
// After
let server = axum_test::TestServer::new(router);Alternatively, use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Consider pinning to a more specific version range or adding a comment noting why this major version was chosen. Why it matters: Major version bumps in dependencies can introduce breaking changes. While the axum-test v20 API appears compatible with current usage patterns based on docs.rs documentation, having explicit version constraints helps future maintainers understand the intent and makes debugging easier if issues arise. Suggested fix: Either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This version upgrade introduces a breaking API change that will cause 56 compilation failures. Why it matters: In axum-test v20, Suggested fix: Either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This major version upgrade (v18 β v20) introduces a breaking API change that will cause compilation failures. Why it matters: In axum-test v19.0.0+, From the v19.0.0 release notes: " Suggested fix: Either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This major version upgrade introduces breaking changes that will cause compilation failures. Why it matters: In axum-test v19.0.0+, According to the v19.0.0 release notes:
Suggested fix: Either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: Major version upgrade with breaking API change. Why it matters: In axum-test v18, This affects 56 test locations across the codebase that call Suggested fix: Decide on your error handling strategy:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This major version upgrade (18β20) introduces a breaking API change that will cause compilation failures. Why it matters: In axum-test v18.4.1, All affected files:
Suggested fix: Remove the // Before:
let server = TestServer::new(app).expect("Failed to create test server");
// After:
let server = TestServer::new(app);If any tests need custom error handling, use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Major version upgrade from 18.4.1 to 20.0.0. This skips v19 entirely and may include breaking API changes. Why it matters: The codebase has ~885 usages of axum-test APIs including Suggested fix: Verify this compiles and all tests pass by running There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This version update introduces a breaking API change that will cause widespread compilation failures. Why it matters: In axum-test v19+, the Example from line 872 of let server = axum_test::TestServer::new(router).expect("Failed to create test server");
// After update: cannot call `.expect()` because `new()` returns `TestServer`, not `Result`Suggested fix: Either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This major version upgrade (v18 β v20) introduces breaking API changes that will cause compilation failures. Why it matters: In axum-test v19.0.0, For example, in let server = axum_test::TestServer::new(router).expect("Failed to create test server");This will produce a compilation error like: "no method named Suggested fix:
Alternatively, if you want to handle errors explicitly, you could use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Consider pinning to Why it matters: According to the axum-test README, v20.1.0 requires Rust 1.88+. If your CI runs on an older Rust version, allowing automatic patch/minor upgrades could break builds unexpectedly. The current pinned version Suggested fix: Either keep as-is (pinned), or add a comment noting the MSRV: # axum-test v20+ requires Rust 1.88+
axum-test = { version = "20.0.0" }There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This version upgrade introduces a breaking API change that will cause compilation failures. Why it matters: In axum-test v19+, let server = axum_test::TestServer::new(router).expect("Failed to create test server");This will fail to compile because Suggested fix: Either:
All 56 occurrences across the test suite must be updated before this dependency bump can compile. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This major version upgrade introduces a breaking API change that will cause compilation failures. Why it matters: In axum-test v19.0.0+, From the v19.0.0 release notes:
Suggested fix: Either (a) remove all // Before (v18.x):
let server = TestServer::new(app).expect("Failed to create test server");
// After (v19+/v20.x) - option A (simplest):
let server = TestServer::new(app);
// After (v19+/v20.x) - option B (if you need Result handling):
let server = TestServer::try_new(app).expect("Failed to create test server");Affected files include:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This version bump introduces a breaking API change that will cause 47 test call sites to fail compilation. Why it matters: In axum-test v19.0.0+, Suggested fix: Either:
Affected files: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Consider updating to Why it matters: According to the axum-test compatibility matrix, version 20.1.0 is the recommended match for axum 0.8.9+, while 20.0.0 targets axum 0.8.8. This project uses axum 0.8.9 (per Suggested fix: Change the version to axum-test = { version = "20.1.0" }Note: Version 20.0.0 should still work due to axum's backward compatibility, but 20.1.0 is the officially recommended pairing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This version bump introduces a breaking API change that will cause 66 compilation errors in this repository. Why it matters: In axum-test v19.0.0+,
These will fail to compile because Affected files include:
Suggested fix: Remove the // Before:
let server = TestServer::new(app).unwrap();
// After:
let server = TestServer::new(app);Alternatively, use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This update introduces breaking API changes that will cause compilation failures. Why it matters: In axum-test v19.0.0, From the v19.0.0 release notes:
Suggested fix: Either:
Affected files:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: Consider pinning to a specific minor version for stability. Why it matters: Using Suggested fix: Use |
||
| sqlx = { version = "0.8", features = [ | ||
| "postgres", | ||
| "runtime-tokio-rustls", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: Major version upgrade from 18.4.1 to 20.0.0 (skipping v19).
Why it matters: Major version bumps typically indicate breaking changes. While the axum-test v20 documentation shows the same core APIs this codebase uses (
TestServer::new,multipart::Part,MultipartForm), there could be signature changes, trait bound modifications, or behavioral differences not visible from documentation alone. Skipping v19 entirely is unusual and warrants checking the changelog to understand what changed.Suggested fix: Verify locally that
cargo buildandcargo testsucceed with this version before merging. If possible, check the axum-test GitHub repository changelog to confirm v19 was intentionally skipped and understand what breaking changes were introduced in v19/v20.