Skip to content

Conversation

@josecelano
Copy link
Member

cargo update
    Updating crates.io index
     Locking 49 packages to latest compatible versions
    Updating async-compression v0.4.34 -> v0.4.36
    Updating async-lock v3.4.1 -> v3.4.2
    Updating axum v0.8.7 -> v0.8.8
    Updating axum-extra v0.12.2 -> v0.12.3
    Updating axum-server v0.7.3 -> v0.8.0
    Updating bumpalo v3.19.0 -> v3.19.1
    Updating cc v1.2.48 -> v1.2.50
    Updating cmake v0.1.54 -> v0.1.57
    Updating compression-codecs v0.4.33 -> v0.4.35
      Adding convert_case v0.10.0
    Updating criterion v0.8.0 -> v0.8.1
    Updating criterion-plot v0.8.0 -> v0.8.1
      Adding derive_builder v0.20.2
      Adding derive_builder_core v0.20.2
      Adding derive_builder_macro v0.20.2
    Updating derive_more v2.0.1 -> v2.1.0
    Updating derive_more-impl v2.0.1 -> v2.1.0
    Updating ferroid v0.8.7 -> v0.8.8
    Updating fs-err v3.2.0 -> v3.2.1
      Adding getset v0.1.6
    Updating hyper-util v0.1.18 -> v0.1.19
    Updating icu_properties v2.1.1 -> v2.1.2
    Updating icu_properties_data v2.1.1 -> v2.1.2
    Updating itoa v1.0.15 -> v1.0.16
    Updating libc v0.2.177 -> v0.2.178
    Updating libredox v0.1.10 -> v0.1.11
    Updating local-ip-address v0.6.5 -> v0.6.8
    Updating log v0.4.28 -> v0.4.29
    Updating mio v1.1.0 -> v1.1.1
    Updating neli v0.6.5 -> v0.7.3
    Updating neli-proc-macros v0.1.4 -> v0.2.2
    Updating portable-atomic v1.11.1 -> v1.12.0
      Adding redox_syscall v0.6.0
    Updating reqwest v0.12.24 -> v0.12.26
    Updating rustls-pki-types v1.13.1 -> v1.13.2
    Updating ryu v1.0.20 -> v1.0.21
    Updating serde_spanned v1.0.3 -> v1.0.4
    Updating simd-adler32 v0.3.7 -> v0.3.8
    Updating supports-hyperlinks v3.1.0 -> v3.2.0
    Updating testcontainers v0.26.0 -> v0.26.2
    Updating toml v0.9.8 -> v0.9.10+spec-1.1.0
    Updating toml_datetime v0.7.3 -> v0.7.5+spec-1.1.0
    Updating toml_edit v0.23.7 -> v0.23.10+spec-1.0.0
    Updating toml_parser v1.0.4 -> v1.0.6+spec-1.1.0
    Updating toml_writer v1.0.4 -> v1.0.6+spec-1.1.0
    Updating tower-http v0.6.7 -> v0.6.8
    Updating tracing v0.1.43 -> v0.1.44
    Updating tracing-core v0.1.35 -> v0.1.36
      Adding unicode-segmentation v1.12.0
    Removing windows-sys v0.59.0
note: pass `--verbose` to see 7 unchanged dependencies behind latest

@josecelano josecelano self-assigned this Dec 22, 2025
@josecelano josecelano added the Dependencies Related to Dependencies label Dec 22, 2025
```
cargo update
    Updating crates.io index
     Locking 49 packages to latest compatible versions
    Updating async-compression v0.4.34 -> v0.4.36
    Updating async-lock v3.4.1 -> v3.4.2
    Updating axum v0.8.7 -> v0.8.8
    Updating axum-extra v0.12.2 -> v0.12.3
    Updating axum-server v0.7.3 -> v0.8.0
    Updating bumpalo v3.19.0 -> v3.19.1
    Updating cc v1.2.48 -> v1.2.50
    Updating cmake v0.1.54 -> v0.1.57
    Updating compression-codecs v0.4.33 -> v0.4.35
      Adding convert_case v0.10.0
    Updating criterion v0.8.0 -> v0.8.1
    Updating criterion-plot v0.8.0 -> v0.8.1
      Adding derive_builder v0.20.2
      Adding derive_builder_core v0.20.2
      Adding derive_builder_macro v0.20.2
    Updating derive_more v2.0.1 -> v2.1.0
    Updating derive_more-impl v2.0.1 -> v2.1.0
    Updating ferroid v0.8.7 -> v0.8.8
    Updating fs-err v3.2.0 -> v3.2.1
      Adding getset v0.1.6
    Updating hyper-util v0.1.18 -> v0.1.19
    Updating icu_properties v2.1.1 -> v2.1.2
    Updating icu_properties_data v2.1.1 -> v2.1.2
    Updating itoa v1.0.15 -> v1.0.16
    Updating libc v0.2.177 -> v0.2.178
    Updating libredox v0.1.10 -> v0.1.11
    Updating local-ip-address v0.6.5 -> v0.6.8
    Updating log v0.4.28 -> v0.4.29
    Updating mio v1.1.0 -> v1.1.1
    Updating neli v0.6.5 -> v0.7.3
    Updating neli-proc-macros v0.1.4 -> v0.2.2
    Updating portable-atomic v1.11.1 -> v1.12.0
      Adding redox_syscall v0.6.0
    Updating reqwest v0.12.24 -> v0.12.26
    Updating rustls-pki-types v1.13.1 -> v1.13.2
    Updating ryu v1.0.20 -> v1.0.21
    Updating serde_spanned v1.0.3 -> v1.0.4
    Updating simd-adler32 v0.3.7 -> v0.3.8
    Updating supports-hyperlinks v3.1.0 -> v3.2.0
    Updating testcontainers v0.26.0 -> v0.26.2
    Updating toml v0.9.8 -> v0.9.10+spec-1.1.0
    Updating toml_datetime v0.7.3 -> v0.7.5+spec-1.1.0
    Updating toml_edit v0.23.7 -> v0.23.10+spec-1.0.0
    Updating toml_parser v1.0.4 -> v1.0.6+spec-1.1.0
    Updating toml_writer v1.0.4 -> v1.0.6+spec-1.1.0
    Updating tower-http v0.6.7 -> v0.6.8
    Updating tracing v0.1.43 -> v0.1.44
    Updating tracing-core v0.1.35 -> v0.1.36
      Adding unicode-segmentation v1.12.0
    Removing windows-sys v0.59.0
note: pass `--verbose` to see 7 unchanged dependencies behind latest
```
…tcp_with_timeouts

error[E0107]: missing generics for struct `axum_server::Server`
  --> packages/axum-server/src/custom_axum_server.rs:44:55
   |
44 | pub fn from_tcp_with_timeouts(socket: TcpListener) -> Server {
   |                                                       ^^^^^^ expected at least 1 generic argument

Added SocketAddr generic parameter to Server return type and Address trait bound to add_timeouts function.
…in from_tcp_rustls_with_timeouts

error[E0277]: the trait bound `RustlsAcceptor: Address` is not satisfied
   --> packages/axum-server/src/custom_axum_server.rs:49:81
    |
 49 | ... tls: RustlsConfig) -> Server<RustlsAcceptor> {
    |                           ^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound

error[E0308]: mismatched types
  --> packages/axum-server/src/custom_axum_server.rs:50:18
   |
50 |     add_timeouts(axum_server::from_tcp_rustls(socket, tls))
   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Server<RustlsAcceptor>`, found `Result<Server<SocketAddr, ...>, ...>`

Changed return type to Result<Server<SocketAddr, RustlsAcceptor>, std::io::Error> and used map to apply add_timeouts to the Result value.
…th_timeouts

error[E0308]: mismatched types
  --> packages/axum-server/src/custom_axum_server.rs:47:18
   |
47 |     add_timeouts(axum_server::from_tcp(socket))
   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Server<SocketAddr>`, found `Result<Server<SocketAddr>, Error>`

Changed return type to Result<Server<SocketAddr>, std::io::Error> and used map to apply add_timeouts to the Result value.
…eptor type

error[E0631]: type mismatch in function arguments
   --> packages/axum-server/src/custom_axum_server.rs:53:51
    |
 53 |     axum_server::from_tcp_rustls(socket, tls).map(add_timeouts)
    |                                               --- ^^^^^^^^^^^^ expected due to this
    |
    = note: expected function signature `fn(Server<_, RustlsAcceptor>) -> _`
               found function signature `fn(Server<_, DefaultAcceptor>) -> _`

Made add_timeouts generic over both Address and Acceptor types to work with both DefaultAcceptor and RustlsAcceptor.
…ls.rs

error[E0107]: missing generics for struct `axum_server::Handle`
  --> packages/axum-server/src/signals.rs:10:26
   |
10 |     handle: axum_server::Handle,
   |                          ^^^^^^ expected 1 generic argument

Added SocketAddr generic parameter to Handle type in graceful_shutdown function signature.
…n format! string

   --> console/tracker-client/src/console/clients/udp/app.rs:178:24
    |
    |  __________________^
179 | | ...       "invalid address format: \`{}\`. Expected format is host:port",
180 | | ...       tracker_socket_addr_str
181 | | ...   ));
    | |_______^

   --> console/tracker-client/src/console/clients/udp/app.rs:199:13
    |
199 | ...rr(anyhow::anyhow!("DNS resolution failed for \`{}\`", tracker_socket_addr_str))

Changed format strings to use inline variable interpolation instead of positional arguments.
…tcp_with_timeouts

error: docs for function returning `Result` missing `# Errors` section
  --> packages/axum-server/src/custom_axum_server.rs:47:1
   |
47 | pub fn from_tcp_with_timeouts(socket: TcpListener) -> ServerResult {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
  --> packages/axum-server/src/custom_axum_server.rs:47:1
   |
47 | pub fn from_tcp_with_timeouts(socket: TcpListener) -> ServerResult {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Added documentation with Errors section and removed #[must_use] attribute since Result type already has it.
…tcp_rustls_with_timeouts

error: docs for function returning `Result` missing `# Errors` section
  --> packages/axum-server/src/custom_axum_server.rs:52:1
   |
52 | pub fn from_tcp_rustls_with_timeouts(socket: TcpListener, tls: RustlsConfig) -> RustlsServerResult {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]`
  --> packages/axum-server/src/custom_axum_server.rs:52:1
   |
52 | pub fn from_tcp_rustls_with_timeouts(socket: TcpListener, tls: RustlsConfig) -> RustlsServerResult {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Added documentation with Errors section and removed #[must_use] attribute since Result type already has it.
…api-server

error[E0599]: no method named `handle` found for enum `std::result::Result<T, E>` in the current scope
  --> packages/axum-health-check-api-server/src/server.rs:120:10
    |
119 |       let running = axum_server::from_tcp(socket)
    |  ___________________-
120 | |         .handle(handle)
    | |_________-^^^^^^

Added expect() to unwrap Result before calling handle() method since from_tcp now returns Result<Server, Error>.
…m-http-tracker-server

error[E0599]: no method named `handle` found for enum `std::result::Result<T, E>` in the current scope
  --> packages/axum-http-tracker-server/src/server.rs:77:22
    |
 76 |   ...   Some(tls) => custom_axum_server::from_tcp_rustls_with_timeouts(socket, tls)
    |  ____________________-
 77 | | ...       .handle(handle)
    | |___________-^^^^^^

error[E0599]: no method named `handle` found for enum `std::result::Result<T, E>` in the current scope
  --> packages/axum-http-tracker-server/src/server.rs:85:22
    |
 84 |                   None => custom_axum_server::from_tcp_with_timeouts(socket)
    |  _________________________-
 85 | |                     .handle(handle)
    | |_____________________-^^^^^^

Added expect() calls to unwrap Result before calling handle() method for both TLS and non-TLS cases.
…m-rest-tracker-api-server

error[E0599]: no method named `handle` found for enum `std::result::Result<T, E>` in the current scope
  --> packages/axum-rest-tracker-api-server/src/server.rs:272:22
    |
271 |   ...   Some(tls) => custom_axum_server::from_tcp_rustls_with_timeouts(socket, tls)
    |  ____________________-
272 | | ...       .handle(handle)
    | |___________-^^^^^^

error[E0599]: no method named `handle` found for enum `std::result::Result<T, E>` in the current scope
  --> packages/axum-rest-tracker-api-server/src/server.rs:280:22
    |
279 |                   None => custom_axum_server::from_tcp_with_timeouts(socket)
    |  _________________________-
280 | |                     .handle(handle)
    | |_____________________-^^^^^^

Added expect() calls to unwrap Result before calling handle() method for both TLS and non-TLS cases.
… is unsupported

thread 'tokio-runtime-worker' panicked at /home/josecelano/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/axum-server-0.8.0/src/server.rs:70:30:
Registering a blocking socket with the tokio runtime is unsupported. If you wish to do anyways, please add `--cfg tokio_allow_from_blocking_fd` to your RUSTFLAGS. See github.com/tokio-rs/tokio/issues/7172 for details.

Set std::net::TcpListener instances to non-blocking mode using set_nonblocking(true) before passing them to axum-server to avoid runtime panics when registering with tokio runtime.

This is required since axum-server 0.8.0 and tokio v1.44.0 which added debug assertions to prevent blocking sockets from being registered with the tokio runtime.
Format set_nonblocking call to use multi-line formatting per rustfmt conventions.
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.44%. Comparing base (6cb7cdd) to head (eccab24).
⚠️ Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
...sole/tracker-client/src/console/clients/udp/app.rs 0.00% 2 Missing ⚠️
packages/axum-server/src/custom_axum_server.rs 60.00% 2 Missing ⚠️
packages/axum-http-tracker-server/src/server.rs 80.00% 1 Missing ⚠️
...ackages/axum-rest-tracker-api-server/src/server.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1626      +/-   ##
===========================================
- Coverage    86.51%   86.44%   -0.08%     
===========================================
  Files          289      289              
  Lines        22688    22701      +13     
  Branches     22688    22701      +13     
===========================================
- Hits         19629    19623       -6     
- Misses        2826     2848      +22     
+ Partials       233      230       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano
Copy link
Member Author

ACK eccab24

@josecelano josecelano merged commit a015619 into torrust:develop Dec 22, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies Related to Dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant