Skip to content

feat(tracker-core): migrate SQLite and MySQL drivers to sqlx 0.8#2

Draft
josecelano wants to merge 212 commits into
developfrom
1717-1525-05-migrate-sqlite-and-mysql-to-sqlx
Draft

feat(tracker-core): migrate SQLite and MySQL drivers to sqlx 0.8#2
josecelano wants to merge 212 commits into
developfrom
1717-1525-05-migrate-sqlite-and-mysql-to-sqlx

Conversation

@josecelano
Copy link
Copy Markdown
Owner

Closes torrust#1717

Migrates the SQLite and MySQL persistence drivers from the sync r2d2 stack to async sqlx 0.8.

Tasks

  • Task 1: Add sqlx 0.8 dependency and async error conversions
  • Task 2: Async SQLite driver (databases/sqlx/sqlite/)
  • Task 3: Async MySQL driver (databases/sqlx/mysql/)
  • Task 4: Switch commit — replace r2d2 drivers, update consumers, remove old deps

Notes

  • Each task is a separate commit; the branch compiles and all tests pass after each task.
  • Schema initialisation uses raw sqlx::query() DDL; no sqlx::migrate!() macro.
  • MySQL tests gated by TORRUST_TRACKER_CORE_RUN_MYSQL_DRIVER_TEST=true.

josecelano and others added 30 commits January 26, 2026 13:06
reqwest 0.13 made the  feature optional and disabled by default.
This commit adds the  feature to the reqwest dependency in the
rest-tracker-api-client package to restore query parameter functionality.
ac47c1b fix: suppress clippy warnings for large error types in config tests (Jose Celano)
457a020 fix: enable reqwest query feature for API compatibility (Jose Celano)
8dde9c3 chore(deps): update dependencies (Jose Celano)

Pull request description:

  ```
  cargo update
      Updating crates.io index
       Locking 109 packages to latest compatible versions
      Updating arc-swap v1.7.1 -> v1.8.0
      Updating async-compression v0.4.36 -> v0.4.37
        Adding aws-lc-rs v1.15.4
        Adding aws-lc-sys v0.37.0
      Updating axum-core v0.5.5 -> v0.5.6
      Updating axum-extra v0.12.3 -> v0.12.5
      Updating bigdecimal v0.4.9 -> v0.4.10
      Updating cc v1.2.50 -> v1.2.54
        Adding cesu8 v1.1.0
      Updating chrono v0.4.42 -> v0.4.43
      Updating clap v4.5.53 -> v4.5.54
      Updating clap_builder v4.5.53 -> v4.5.54
      Updating clap_lex v0.7.6 -> v0.7.7
        Adding combine v4.6.7
      Updating compression-codecs v0.4.35 -> v0.4.36
        Adding dunce v1.0.5
      Updating ferroid v0.8.8 -> v0.8.9
      Updating filetime v0.2.26 -> v0.2.27
      Updating find-msvc-tools v0.1.5 -> v0.1.8
      Updating flate2 v1.1.5 -> v1.1.8
        Adding foldhash v0.2.0
      Updating fs-err v3.2.1 -> v3.2.2
        Adding fs_extra v1.3.0
      Updating getrandom v0.2.16 -> v0.2.17
      Updating h2 v0.4.12 -> v0.4.13
      Updating hashlink v0.10.0 -> v0.11.0
      Removing hyper-tls v0.6.0
      Updating indexmap v2.12.1 -> v2.13.0
      Updating iri-string v0.7.9 -> v0.7.10
      Updating itoa v1.0.16 -> v1.0.17
        Adding jni v0.21.1
        Adding jni-sys v0.3.0
      Updating js-sys v0.3.83 -> v0.3.85
      Updating libc v0.2.178 -> v0.2.180
      Updating libm v0.2.15 -> v0.2.16
      Updating libredox v0.1.11 -> v0.1.12
      Updating libsqlite3-sys v0.35.0 -> v0.36.0
      Updating local-ip-address v0.6.8 -> v0.6.9
        Adding lru-slab v0.1.2
      Updating num-conv v0.1.0 -> v0.2.0
        Adding openssl-probe v0.2.1
      Updating portable-atomic v1.12.0 -> v1.13.0
      Updating proc-macro2 v1.0.103 -> v1.0.106
      Updating prost v0.14.1 -> v0.14.3
      Updating prost-derive v0.14.1 -> v0.14.3
      Updating prost-types v0.14.1 -> v0.14.3
        Adding quinn v0.11.9
        Adding quinn-proto v0.11.13
        Adding quinn-udp v0.5.14
      Updating quote v1.0.42 -> v1.0.44
      Updating r2d2_sqlite v0.31.0 -> v0.32.0
      Updating rand_core v0.9.3 -> v0.9.5
      Updating redox_syscall v0.6.0 -> v0.7.0
      Updating reqwest v0.12.28 -> v0.13.1
      Updating rkyv v0.7.45 -> v0.7.46
      Updating rkyv_derive v0.7.45 -> v0.7.46
        Adding rsqlite-vfs v0.1.0
      Updating rusqlite v0.37.0 -> v0.38.0
      Updating rust_decimal v1.39.0 -> v1.40.0
      Updating rustc-demangle v0.1.26 -> v0.1.27
      Updating rustls v0.23.35 -> v0.23.36
      Updating rustls-native-certs v0.8.2 -> v0.8.3
      Updating rustls-pki-types v1.13.2 -> v1.14.0
        Adding rustls-platform-verifier v0.6.2
        Adding rustls-platform-verifier-android v0.1.1
      Updating rustls-webpki v0.103.8 -> v0.103.9
      Updating ryu v1.0.21 -> v1.0.22
      Updating schemars v1.1.0 -> v1.2.0
      Updating serde_json v1.0.146 -> v1.0.149
      Updating signal-hook-registry v1.4.7 -> v1.4.8
      Updating socket2 v0.6.1 -> v0.6.2
        Adding sqlite-wasm-rs v0.5.2
      Updating subprocess v0.2.9 -> v0.2.13
      Updating syn v2.0.111 -> v2.0.114
      Updating tempfile v3.23.0 -> v3.24.0
      Updating testcontainers v0.26.2 -> v0.26.3
      Updating thiserror v2.0.17 -> v2.0.18
      Updating thiserror-impl v2.0.17 -> v2.0.18
      Updating time v0.3.44 -> v0.3.46
      Updating time-core v0.1.6 -> v0.1.8
      Updating time-macros v0.2.24 -> v0.2.26
      Updating tokio v1.48.0 -> v1.49.0
      Removing tokio-native-tls v0.3.1
      Updating tokio-stream v0.1.17 -> v0.1.18
      Updating tokio-util v0.7.17 -> v0.7.18
      Updating toml v0.9.10+spec-1.1.0 -> v0.9.11+spec-1.1.0
      Updating tower v0.5.2 -> v0.5.3
      Updating url v2.5.7 -> v2.5.8
      Updating uuid v1.19.0 -> v1.20.0
      Updating wasip2 v1.0.1+wasi-0.2.4 -> v1.0.2+wasi-0.2.9
      Updating wasm-bindgen v0.2.106 -> v0.2.108
      Updating wasm-bindgen-futures v0.4.56 -> v0.4.58
      Updating wasm-bindgen-macro v0.2.106 -> v0.2.108
      Updating wasm-bindgen-macro-support v0.2.106 -> v0.2.108
      Updating wasm-bindgen-shared v0.2.106 -> v0.2.108
      Updating web-sys v0.3.83 -> v0.3.85
        Adding webpki-root-certs v1.0.5
      Updating webpki-roots v1.0.4 -> v1.0.5
        Adding windows-sys v0.45.0
        Adding windows-targets v0.42.2
        Adding windows_aarch64_gnullvm v0.42.2
        Adding windows_aarch64_msvc v0.42.2
        Adding windows_i686_gnu v0.42.2
        Adding windows_i686_msvc v0.42.2
        Adding windows_x86_64_gnu v0.42.2
        Adding windows_x86_64_gnullvm v0.42.2
        Adding windows_x86_64_msvc v0.42.2
      Updating wit-bindgen v0.46.0 -> v0.51.0
      Updating zerocopy v0.8.31 -> v0.8.34
      Updating zerocopy-derive v0.8.31 -> v0.8.34
        Adding zmij v1.0.17
  note: pass `--verbose` to see 7 unchanged dependencies behind latest
  ``

ACKs for top commit:
  josecelano:
    ACK ac47c1b

Tree-SHA512: 0a8bad1f29515a0ca384b8cdbfcd79d94f64b136ea28a6070905fd042d30cc7765097a9ad7b041af35f835b292dd054aba847e461f1f203c5f0e34dd4a5b0849
```
cargo update
    Updating crates.io index
     Locking 98 packages to latest compatible versions
    Updating anyhow v1.0.100 -> v1.0.102
    Updating arc-swap v1.8.0 -> v1.8.2
    Updating async-compression v0.4.37 -> v0.4.40
    Updating async-executor v1.13.3 -> v1.14.0
    Updating aws-lc-rs v1.15.4 -> v1.16.0
    Updating aws-lc-sys v0.37.0 -> v0.37.1
    Updating bitflags v2.10.0 -> v2.11.0
    Updating bollard v0.19.4 -> v0.20.1
    Updating bollard-stubs v1.49.1-rc.28.4.0 -> v1.52.1-rc.29.1.3
    Updating bumpalo v3.19.1 -> v3.20.2
    Updating bytemuck v1.24.0 -> v1.25.0
    Updating bytes v1.11.0 -> v1.11.1
    Updating cc v1.2.54 -> v1.2.56
      Adding chacha20 v0.10.0
      Adding cipher v0.5.0
    Updating clap v4.5.54 -> v4.5.60
    Updating clap_builder v4.5.54 -> v4.5.60
    Updating clap_derive v4.5.49 -> v4.5.55
    Updating clap_lex v0.7.7 -> v1.0.0
    Updating compression-codecs v0.4.36 -> v0.4.37
      Adding cpufeatures v0.3.0
    Updating criterion v0.8.1 -> v0.8.2
    Updating criterion-plot v0.8.1 -> v0.8.2
      Adding crypto-common v0.2.0
    Updating deranged v0.5.5 -> v0.5.6
      Adding env_filter v1.0.0
    Updating env_logger v0.8.4 -> v0.11.9
    Updating find-msvc-tools v0.1.8 -> v0.1.9
    Updating flate2 v1.1.8 -> v1.1.9
    Updating fs-err v3.2.2 -> v3.3.0
    Updating futures v0.3.31 -> v0.3.32
    Updating futures-channel v0.3.31 -> v0.3.32
    Updating futures-core v0.3.31 -> v0.3.32
    Updating futures-executor v0.3.31 -> v0.3.32
    Updating futures-io v0.3.31 -> v0.3.32
    Updating futures-macro v0.3.31 -> v0.3.32
    Updating futures-sink v0.3.31 -> v0.3.32
    Updating futures-task v0.3.31 -> v0.3.32
    Updating futures-util v0.3.31 -> v0.3.32
      Adding getrandom v0.4.1
      Adding hybrid-array v0.4.7
    Updating hyper-util v0.1.19 -> v0.1.20
    Updating iana-time-zone v0.1.64 -> v0.1.65
      Adding id-arena v2.3.0
      Adding inout v0.2.2
      Adding leb128fmt v0.1.0
    Updating libc v0.2.180 -> v0.2.182
    Updating local-ip-address v0.6.9 -> v0.6.10
    Updating memchr v2.7.6 -> v2.8.0
    Updating native-tls v0.2.14 -> v0.2.18
    Updating neli v0.7.3 -> v0.7.4
    Removing openssl-probe v0.1.6
    Updating portable-atomic v1.13.0 -> v1.13.1
    Updating portable-atomic-util v0.2.4 -> v0.2.5
    Updating predicates v3.1.3 -> v3.1.4
    Updating predicates-core v1.0.9 -> v1.0.10
    Updating predicates-tree v1.0.12 -> v1.0.13
      Adding prettyplease v0.2.37
    Updating quickcheck v1.0.3 -> v1.1.0
      Adding rand v0.10.0
      Adding rand_core v0.10.0
    Updating redox_syscall v0.7.0 -> v0.7.1
    Updating regex v1.12.2 -> v1.12.3
    Updating regex-automata v0.4.13 -> v0.4.14
    Updating regex-syntax v0.8.8 -> v0.8.9
    Updating reqwest v0.13.1 -> v0.13.2
    Removing rustls-pemfile v2.2.0
    Updating ryu v1.0.22 -> v1.0.23
    Updating schemars v1.2.0 -> v1.2.1
    Removing security-framework v2.11.1
    Removing security-framework v3.5.1
      Adding security-framework v3.7.0
    Updating security-framework-sys v2.15.0 -> v2.17.0
    Updating siphasher v1.0.1 -> v1.0.2
    Updating slab v0.4.11 -> v0.4.12
    Updating subprocess v0.2.13 -> v0.2.15
    Updating syn v2.0.114 -> v2.0.117
    Updating system-configuration v0.6.1 -> v0.7.0
    Updating tempfile v3.24.0 -> v3.25.0
    Updating testcontainers v0.26.3 -> v0.27.0
    Updating time v0.3.46 -> v0.3.47
    Updating time-macros v0.2.26 -> v0.2.27
    Updating toml v0.9.11+spec-1.1.0 -> v0.9.12+spec-1.1.0 (available: v1.0.3+spec-1.1.0)
    Updating toml_parser v1.0.6+spec-1.1.0 -> v1.0.9+spec-1.1.0
    Updating tonic v0.14.2 -> v0.14.5
    Updating tonic-prost v0.14.2 -> v0.14.5
    Updating unicode-ident v1.0.22 -> v1.0.24
    Updating ureq v3.1.4 -> v3.2.0
    Updating uuid v1.20.0 -> v1.21.0
      Adding wasip3 v0.4.0+wasi-0.3.0-rc-2026-01-06
      Adding wasm-encoder v0.244.0
      Adding wasm-metadata v0.244.0
      Adding wasmparser v0.244.0
    Updating webpki-root-certs v1.0.5 -> v1.0.6
    Removing webpki-roots v1.0.5
      Adding wit-bindgen-core v0.51.0
      Adding wit-bindgen-rust v0.51.0
      Adding wit-bindgen-rust-macro v0.51.0
      Adding wit-component v0.244.0
      Adding wit-parser v0.244.0
    Updating zerocopy v0.8.34 -> v0.8.39
    Updating zerocopy-derive v0.8.34 -> v0.8.39
    Updating zmij v1.0.17 -> v1.0.21
note: pass `--verbose` to see 7 unchanged dependencies behind latest
```
BREAKING CHANGE: cipher crate pinned to v0.4 for compatibility with blowfish

- Replace Rng import with RngExt for sample_iter method in rand 0.10
- Pin cipher crate to v0.4 to match blowfish dependency constraints
- Add explicit generic-array dependency to udp-tracker-core
- Import GenericArray directly from generic_array crate
- Update Keeper trait in crypto/keys.rs to use BlockEncrypt + BlockDecrypt bounds
- Add BlockEncrypt and BlockDecrypt trait imports to connection_cookie.rs
- Fix imports in:
  - packages/tracker-core/src/authentication/key/peer_key.rs
  - packages/udp-tracker-core/src/crypto/ephemeral_instance_keys.rs
  - packages/udp-tracker-core/src/crypto/keys.rs
  - packages/test-helpers/src/random.rs
  - src/console/ci/e2e/tracker_container.rs
f737ace fix: resolve compilation errors after dependency updates (Jose Celano)
046d5c9 chore(deps): update dependencies (Jose Celano)

Pull request description:

  ```
  cargo update
      Updating crates.io index
       Locking 98 packages to latest compatible versions
      Updating anyhow v1.0.100 -> v1.0.102
      Updating arc-swap v1.8.0 -> v1.8.2
      Updating async-compression v0.4.37 -> v0.4.40
      Updating async-executor v1.13.3 -> v1.14.0
      Updating aws-lc-rs v1.15.4 -> v1.16.0
      Updating aws-lc-sys v0.37.0 -> v0.37.1
      Updating bitflags v2.10.0 -> v2.11.0
      Updating bollard v0.19.4 -> v0.20.1
      Updating bollard-stubs v1.49.1-rc.28.4.0 -> v1.52.1-rc.29.1.3
      Updating bumpalo v3.19.1 -> v3.20.2
      Updating bytemuck v1.24.0 -> v1.25.0
      Updating bytes v1.11.0 -> v1.11.1
      Updating cc v1.2.54 -> v1.2.56
        Adding chacha20 v0.10.0
        Adding cipher v0.5.0
      Updating clap v4.5.54 -> v4.5.60
      Updating clap_builder v4.5.54 -> v4.5.60
      Updating clap_derive v4.5.49 -> v4.5.55
      Updating clap_lex v0.7.7 -> v1.0.0
      Updating compression-codecs v0.4.36 -> v0.4.37
        Adding cpufeatures v0.3.0
      Updating criterion v0.8.1 -> v0.8.2
      Updating criterion-plot v0.8.1 -> v0.8.2
        Adding crypto-common v0.2.0
      Updating deranged v0.5.5 -> v0.5.6
        Adding env_filter v1.0.0
      Updating env_logger v0.8.4 -> v0.11.9
      Updating find-msvc-tools v0.1.8 -> v0.1.9
      Updating flate2 v1.1.8 -> v1.1.9
      Updating fs-err v3.2.2 -> v3.3.0
      Updating futures v0.3.31 -> v0.3.32
      Updating futures-channel v0.3.31 -> v0.3.32
      Updating futures-core v0.3.31 -> v0.3.32
      Updating futures-executor v0.3.31 -> v0.3.32
      Updating futures-io v0.3.31 -> v0.3.32
      Updating futures-macro v0.3.31 -> v0.3.32
      Updating futures-sink v0.3.31 -> v0.3.32
      Updating futures-task v0.3.31 -> v0.3.32
      Updating futures-util v0.3.31 -> v0.3.32
        Adding getrandom v0.4.1
        Adding hybrid-array v0.4.7
      Updating hyper-util v0.1.19 -> v0.1.20
      Updating iana-time-zone v0.1.64 -> v0.1.65
        Adding id-arena v2.3.0
        Adding inout v0.2.2
        Adding leb128fmt v0.1.0
      Updating libc v0.2.180 -> v0.2.182
      Updating local-ip-address v0.6.9 -> v0.6.10
      Updating memchr v2.7.6 -> v2.8.0
      Updating native-tls v0.2.14 -> v0.2.18
      Updating neli v0.7.3 -> v0.7.4
      Removing openssl-probe v0.1.6
      Updating portable-atomic v1.13.0 -> v1.13.1
      Updating portable-atomic-util v0.2.4 -> v0.2.5
      Updating predicates v3.1.3 -> v3.1.4
      Updating predicates-core v1.0.9 -> v1.0.10
      Updating predicates-tree v1.0.12 -> v1.0.13
        Adding prettyplease v0.2.37
      Updating quickcheck v1.0.3 -> v1.1.0
        Adding rand v0.10.0
        Adding rand_core v0.10.0
      Updating redox_syscall v0.7.0 -> v0.7.1
      Updating regex v1.12.2 -> v1.12.3
      Updating regex-automata v0.4.13 -> v0.4.14
      Updating regex-syntax v0.8.8 -> v0.8.9
      Updating reqwest v0.13.1 -> v0.13.2
      Removing rustls-pemfile v2.2.0
      Updating ryu v1.0.22 -> v1.0.23
      Updating schemars v1.2.0 -> v1.2.1
      Removing security-framework v2.11.1
      Removing security-framework v3.5.1
        Adding security-framework v3.7.0
      Updating security-framework-sys v2.15.0 -> v2.17.0
      Updating siphasher v1.0.1 -> v1.0.2
      Updating slab v0.4.11 -> v0.4.12
      Updating subprocess v0.2.13 -> v0.2.15
      Updating syn v2.0.114 -> v2.0.117
      Updating system-configuration v0.6.1 -> v0.7.0
      Updating tempfile v3.24.0 -> v3.25.0
      Updating testcontainers v0.26.3 -> v0.27.0
      Updating time v0.3.46 -> v0.3.47
      Updating time-macros v0.2.26 -> v0.2.27
      Updating toml v0.9.11+spec-1.1.0 -> v0.9.12+spec-1.1.0 (available: v1.0.3+spec-1.1.0)
      Updating toml_parser v1.0.6+spec-1.1.0 -> v1.0.9+spec-1.1.0
      Updating tonic v0.14.2 -> v0.14.5
      Updating tonic-prost v0.14.2 -> v0.14.5
      Updating unicode-ident v1.0.22 -> v1.0.24
      Updating ureq v3.1.4 -> v3.2.0
      Updating uuid v1.20.0 -> v1.21.0
        Adding wasip3 v0.4.0+wasi-0.3.0-rc-2026-01-06
        Adding wasm-encoder v0.244.0
        Adding wasm-metadata v0.244.0
        Adding wasmparser v0.244.0
      Updating webpki-root-certs v1.0.5 -> v1.0.6
      Removing webpki-roots v1.0.5
        Adding wit-bindgen-core v0.51.0
        Adding wit-bindgen-rust v0.51.0
        Adding wit-bindgen-rust-macro v0.51.0
        Adding wit-component v0.244.0
        Adding wit-parser v0.244.0
      Updating zerocopy v0.8.34 -> v0.8.39
      Updating zerocopy-derive v0.8.34 -> v0.8.39
      Updating zmij v1.0.17 -> v1.0.21
  note: pass `--verbose` to see 7 unchanged dependencies behind latest
  ```

ACKs for top commit:
  josecelano:
    ACK f737ace

Tree-SHA512: 7f20ff965409da9ec6c871584f2714a08b49351ed50948a2adb678595f64db93b045424e3c57843ec01328c3f82705ad58079754dc95459dff29317fca06511e
```
cargo update
    Updating crates.io index
     Locking 35 packages to latest compatible versions
    Updating async-compression v0.4.40 -> v0.4.41
    Updating aws-lc-rs v1.16.0 -> v1.16.1
    Updating aws-lc-sys v0.37.1 -> v0.38.0
    Updating chrono v0.4.43 -> v0.4.44
    Updating deranged v0.5.6 -> v0.5.8
    Updating derive_utils v0.15.0 -> v0.15.1
    Updating io-enum v1.2.0 -> v1.2.1
    Updating ipnet v2.11.0 -> v2.12.0
    Updating js-sys v0.3.85 -> v0.3.91
    Updating libredox v0.1.12 -> v0.1.14
    Updating libz-sys v1.1.23 -> v1.1.24
    Updating linux-raw-sys v0.11.0 -> v0.12.1
    Updating owo-colors v4.2.3 -> v4.3.0
    Updating pin-project v1.1.10 -> v1.1.11
    Updating pin-project-internal v1.1.10 -> v1.1.11
    Updating pin-project-lite v0.2.16 -> v0.2.17
    Updating piper v0.2.4 -> v0.2.5
      Adding plain v0.2.3
    Updating redox_syscall v0.7.1 -> v0.7.3
    Updating regex-syntax v0.8.9 -> v0.8.10
    Updating rustix v1.1.3 -> v1.1.4
    Updating rustls v0.23.36 -> v0.23.37
    Updating serde_with v3.16.1 -> v3.17.0
    Updating serde_with_macros v3.16.1 -> v3.17.0
    Updating tempfile v3.25.0 -> v3.26.0
    Updating testcontainers v0.27.0 -> v0.27.1
    Updating tokio-macros v2.6.0 -> v2.6.1
    Updating wasm-bindgen v0.2.108 -> v0.2.114
    Updating wasm-bindgen-futures v0.4.58 -> v0.4.64
    Updating wasm-bindgen-macro v0.2.108 -> v0.2.114
    Updating wasm-bindgen-macro-support v0.2.108 -> v0.2.114
    Updating wasm-bindgen-shared v0.2.108 -> v0.2.114
    Updating web-sys v0.3.85 -> v0.3.91
    Updating zerocopy v0.8.39 -> v0.8.40
    Updating zerocopy-derive v0.8.39 -> v0.8.40
note: pass `--verbose` to see 9 unchanged dependencies behind latest
```
Resolves clippy::collapsible_match lint by moving the inner if condition
into the match arm guard for the Pagination { limit: 1, offset: 1 } case.
7e322eb ci: upgrade actions/upload-artifact from v6 to v7 in generate_coverage_pr workflow (Jose Celano)
29edbb6 fix: collapse nested if into match arm guard in pagination test (Jose Celano)
ed0937b chore(deps): update dependencies (Jose Celano)

Pull request description:

  ```
  cargo update
      Updating crates.io index
       Locking 35 packages to latest compatible versions
      Updating async-compression v0.4.40 -> v0.4.41
      Updating aws-lc-rs v1.16.0 -> v1.16.1
      Updating aws-lc-sys v0.37.1 -> v0.38.0
      Updating chrono v0.4.43 -> v0.4.44
      Updating deranged v0.5.6 -> v0.5.8
      Updating derive_utils v0.15.0 -> v0.15.1
      Updating io-enum v1.2.0 -> v1.2.1
      Updating ipnet v2.11.0 -> v2.12.0
      Updating js-sys v0.3.85 -> v0.3.91
      Updating libredox v0.1.12 -> v0.1.14
      Updating libz-sys v1.1.23 -> v1.1.24
      Updating linux-raw-sys v0.11.0 -> v0.12.1
      Updating owo-colors v4.2.3 -> v4.3.0
      Updating pin-project v1.1.10 -> v1.1.11
      Updating pin-project-internal v1.1.10 -> v1.1.11
      Updating pin-project-lite v0.2.16 -> v0.2.17
      Updating piper v0.2.4 -> v0.2.5
        Adding plain v0.2.3
      Updating redox_syscall v0.7.1 -> v0.7.3
      Updating regex-syntax v0.8.9 -> v0.8.10
      Updating rustix v1.1.3 -> v1.1.4
      Updating rustls v0.23.36 -> v0.23.37
      Updating serde_with v3.16.1 -> v3.17.0
      Updating serde_with_macros v3.16.1 -> v3.17.0
      Updating tempfile v3.25.0 -> v3.26.0
      Updating testcontainers v0.27.0 -> v0.27.1
      Updating tokio-macros v2.6.0 -> v2.6.1
      Updating wasm-bindgen v0.2.108 -> v0.2.114
      Updating wasm-bindgen-futures v0.4.58 -> v0.4.64
      Updating wasm-bindgen-macro v0.2.108 -> v0.2.114
      Updating wasm-bindgen-macro-support v0.2.108 -> v0.2.114
      Updating wasm-bindgen-shared v0.2.108 -> v0.2.114
      Updating web-sys v0.3.85 -> v0.3.91
      Updating zerocopy v0.8.39 -> v0.8.40
      Updating zerocopy-derive v0.8.39 -> v0.8.40
  note: pass `--verbose` to see 9 unchanged dependencies behind latest
  ```

ACKs for top commit:
  josecelano:
    ACK 7e322eb

Tree-SHA512: f675f90b386c222006d44c010e25016105e248a31e609e14ee73447c91fa31efe804d17dc645bc7d9aacd1d7dfa26eb4996edc469406ac55f182a812854f47f2
…heck test to avoid race condition

de47145 fix: add sleep after HTTP server stop in health check test to avoid race condition (Jose Celano)

Pull request description:

  The test `it_should_return_error_when_http_service_was_stopped_after_registration` was flaky on nightly Rust because the OS can keep a TCP port in `CLOSE_WAIT`/`TIME_WAIT` briefly after the server stops, causing the health check to still return `Ok` instead of `Error`.\n\nAdds a 100ms sleep after `stop().await` to let the OS fully release the TCP port before the health check runs.

ACKs for top commit:
  josecelano:
    ACK de47145

Tree-SHA512: 1318dc780aa12072a0738c4f36b46ddba1db28a1daa3615a1d5b68305f1902a7d82bf76012a999dc78287b02a0a88ebe33919edfde6eb518a81e3b2796fbae47
```
    Updating crates.io index
     Locking 104 packages to latest compatible versions
    Updating anstream v0.6.21 -> v1.0.0
    Updating anstyle v1.0.13 -> v1.0.14
    Updating anstyle-parse v0.2.7 -> v1.0.0
    Updating arc-swap v1.8.2 -> v1.9.1
    Updating astral-tokio-tar v0.5.6 -> v0.6.0
    Updating aws-lc-rs v1.16.1 -> v1.16.2
    Updating aws-lc-sys v0.38.0 -> v0.39.1
    Updating bollard v0.20.1 -> v0.20.2
    Updating borsh v1.6.0 -> v1.6.1
    Updating borsh-derive v1.6.0 -> v1.6.1
    Updating cc v1.2.56 -> v1.2.59
    Updating clap v4.5.60 -> v4.6.0
    Updating clap_builder v4.5.60 -> v4.6.0
    Updating clap_derive v4.5.55 -> v4.6.0
    Updating clap_lex v1.0.0 -> v1.1.0
    Updating cmake v0.1.57 -> v0.1.58
    Updating colorchoice v1.0.4 -> v1.0.5
    Updating darling v0.21.3 -> v0.23.0
    Updating darling_core v0.21.3 -> v0.23.0
    Updating darling_macro v0.21.3 -> v0.23.0
    Updating env_filter v1.0.0 -> v1.0.1
    Updating env_logger v0.11.9 -> v0.11.10
    Updating fastrand v2.3.0 -> v2.4.1
    Updating fragile v2.0.1 -> v2.1.0
    Updating getrandom v0.4.1 -> v0.4.2
    Updating hyper v1.8.1 -> v1.9.0
    Updating icu_collections v2.1.1 -> v2.2.0
    Updating icu_locale_core v2.1.1 -> v2.2.0
    Updating icu_normalizer v2.1.1 -> v2.2.0
    Updating icu_normalizer_data v2.1.1 -> v2.2.0
    Updating icu_properties v2.1.2 -> v2.2.0
    Updating icu_properties_data v2.1.2 -> v2.2.0
    Updating icu_provider v2.1.1 -> v2.2.0
    Updating indexmap v2.13.0 -> v2.13.1
    Updating iri-string v0.7.10 -> v0.7.12
    Updating itoa v1.0.17 -> v1.0.18
    Removing jni-sys v0.3.0
      Adding jni-sys v0.3.1
      Adding jni-sys v0.4.1
      Adding jni-sys-macros v0.4.1
    Updating js-sys v0.3.91 -> v0.3.94
    Updating libc v0.2.182 -> v0.2.184
    Updating libredox v0.1.14 -> v0.1.15
    Updating libsqlite3-sys v0.36.0 -> v0.37.0
    Updating libz-sys v1.1.24 -> v1.1.28
    Updating litemap v0.8.1 -> v0.8.2
    Updating local-ip-address v0.6.10 -> v0.6.11
    Updating mio v1.1.1 -> v1.2.0
    Updating num-conv v0.2.0 -> v0.2.1
    Updating once_cell v1.21.3 -> v1.21.4
    Updating openssl v0.10.75 -> v0.10.76
    Updating openssl-sys v0.9.111 -> v0.9.112
    Updating portable-atomic-util v0.2.5 -> v0.2.6
    Updating potential_utf v0.1.4 -> v0.1.5
    Updating proc-macro-crate v3.4.0 -> v3.5.0
    Updating quinn-proto v0.11.13 -> v0.11.14
    Updating quote v1.0.44 -> v1.0.45
      Adding r-efi v6.0.0
    Updating r2d2_sqlite v0.32.0 -> v0.33.0
    Updating rusqlite v0.38.0 -> v0.39.0
    Updating rust_decimal v1.40.0 -> v1.41.0
    Updating rustc-hash v2.1.1 -> v2.1.2
    Updating rustls-webpki v0.103.9 -> v0.103.10
    Updating schannel v0.1.28 -> v0.1.29
    Updating semver v1.0.27 -> v1.0.28
    Updating serde_spanned v1.0.4 -> v1.1.1
    Updating serde_with v3.17.0 -> v3.18.0
    Updating serde_with_macros v3.17.0 -> v3.18.0
    Updating simd-adler32 v0.3.8 -> v0.3.9
    Updating socket2 v0.6.2 -> v0.6.3
    Updating tempfile v3.26.0 -> v3.27.0
    Updating terminal_size v0.4.3 -> v0.4.4
    Updating testcontainers v0.27.1 -> v0.27.2
    Updating tinystr v0.8.2 -> v0.8.3
    Updating tinyvec v1.10.0 -> v1.11.0
    Updating tokio v1.49.0 -> v1.51.0
    Updating tokio-macros v2.6.1 -> v2.7.0
      Adding toml_datetime v1.1.1+spec-1.1.0
    Updating toml_edit v0.23.10+spec-1.0.0 -> v0.25.10+spec-1.1.0
    Updating toml_parser v1.0.9+spec-1.1.0 -> v1.1.2+spec-1.1.0
    Updating toml_writer v1.0.6+spec-1.1.0 -> v1.1.1+spec-1.1.0
    Updating tracing-subscriber v0.3.22 -> v0.3.23
    Updating unicode-segmentation v1.12.0 -> v1.13.2
    Updating ureq v3.2.0 -> v3.3.0
    Updating ureq-proto v0.5.3 -> v0.6.0
    Removing utf-8 v0.7.6
      Adding utf8-zero v0.8.1
    Updating uuid v1.21.0 -> v1.23.0
    Updating wasm-bindgen v0.2.114 -> v0.2.117
    Updating wasm-bindgen-futures v0.4.64 -> v0.4.67
    Updating wasm-bindgen-macro v0.2.114 -> v0.2.117
    Updating wasm-bindgen-macro-support v0.2.114 -> v0.2.117
    Updating wasm-bindgen-shared v0.2.114 -> v0.2.117
    Updating web-sys v0.3.91 -> v0.3.94
    Removing winnow v0.7.14
      Adding winnow v0.7.15
      Adding winnow v1.0.1
    Updating writeable v0.6.2 -> v0.6.3
    Updating yoke v0.8.1 -> v0.8.2
    Updating yoke-derive v0.8.1 -> v0.8.2
    Updating zerocopy v0.8.40 -> v0.8.48
    Updating zerocopy-derive v0.8.40 -> v0.8.48
    Updating zerofrom v0.1.6 -> v0.1.7
    Updating zerofrom-derive v0.1.6 -> v0.1.7
    Updating zerotrie v0.2.3 -> v0.2.4
    Updating zerovec v0.11.5 -> v0.11.6
    Updating zerovec-derive v0.11.2 -> v0.11.3
note: pass `--verbose` to see 9 unchanged dependencies behind latest
```
1228a2b chore(deps): update dependencies (Jose Celano)

Pull request description:

  ```
      Updating crates.io index
       Locking 104 packages to latest compatible versions
      Updating anstream v0.6.21 -> v1.0.0
      Updating anstyle v1.0.13 -> v1.0.14
      Updating anstyle-parse v0.2.7 -> v1.0.0
      Updating arc-swap v1.8.2 -> v1.9.1
      Updating astral-tokio-tar v0.5.6 -> v0.6.0
      Updating aws-lc-rs v1.16.1 -> v1.16.2
      Updating aws-lc-sys v0.38.0 -> v0.39.1
      Updating bollard v0.20.1 -> v0.20.2
      Updating borsh v1.6.0 -> v1.6.1
      Updating borsh-derive v1.6.0 -> v1.6.1
      Updating cc v1.2.56 -> v1.2.59
      Updating clap v4.5.60 -> v4.6.0
      Updating clap_builder v4.5.60 -> v4.6.0
      Updating clap_derive v4.5.55 -> v4.6.0
      Updating clap_lex v1.0.0 -> v1.1.0
      Updating cmake v0.1.57 -> v0.1.58
      Updating colorchoice v1.0.4 -> v1.0.5
      Updating darling v0.21.3 -> v0.23.0
      Updating darling_core v0.21.3 -> v0.23.0
      Updating darling_macro v0.21.3 -> v0.23.0
      Updating env_filter v1.0.0 -> v1.0.1
      Updating env_logger v0.11.9 -> v0.11.10
      Updating fastrand v2.3.0 -> v2.4.1
      Updating fragile v2.0.1 -> v2.1.0
      Updating getrandom v0.4.1 -> v0.4.2
      Updating hyper v1.8.1 -> v1.9.0
      Updating icu_collections v2.1.1 -> v2.2.0
      Updating icu_locale_core v2.1.1 -> v2.2.0
      Updating icu_normalizer v2.1.1 -> v2.2.0
      Updating icu_normalizer_data v2.1.1 -> v2.2.0
      Updating icu_properties v2.1.2 -> v2.2.0
      Updating icu_properties_data v2.1.2 -> v2.2.0
      Updating icu_provider v2.1.1 -> v2.2.0
      Updating indexmap v2.13.0 -> v2.13.1
      Updating iri-string v0.7.10 -> v0.7.12
      Updating itoa v1.0.17 -> v1.0.18
      Removing jni-sys v0.3.0
        Adding jni-sys v0.3.1
        Adding jni-sys v0.4.1
        Adding jni-sys-macros v0.4.1
      Updating js-sys v0.3.91 -> v0.3.94
      Updating libc v0.2.182 -> v0.2.184
      Updating libredox v0.1.14 -> v0.1.15
      Updating libsqlite3-sys v0.36.0 -> v0.37.0
      Updating libz-sys v1.1.24 -> v1.1.28
      Updating litemap v0.8.1 -> v0.8.2
      Updating local-ip-address v0.6.10 -> v0.6.11
      Updating mio v1.1.1 -> v1.2.0
      Updating num-conv v0.2.0 -> v0.2.1
      Updating once_cell v1.21.3 -> v1.21.4
      Updating openssl v0.10.75 -> v0.10.76
      Updating openssl-sys v0.9.111 -> v0.9.112
      Updating portable-atomic-util v0.2.5 -> v0.2.6
      Updating potential_utf v0.1.4 -> v0.1.5
      Updating proc-macro-crate v3.4.0 -> v3.5.0
      Updating quinn-proto v0.11.13 -> v0.11.14
      Updating quote v1.0.44 -> v1.0.45
        Adding r-efi v6.0.0
      Updating r2d2_sqlite v0.32.0 -> v0.33.0
      Updating rusqlite v0.38.0 -> v0.39.0
      Updating rust_decimal v1.40.0 -> v1.41.0
      Updating rustc-hash v2.1.1 -> v2.1.2
      Updating rustls-webpki v0.103.9 -> v0.103.10
      Updating schannel v0.1.28 -> v0.1.29
      Updating semver v1.0.27 -> v1.0.28
      Updating serde_spanned v1.0.4 -> v1.1.1
      Updating serde_with v3.17.0 -> v3.18.0
      Updating serde_with_macros v3.17.0 -> v3.18.0
      Updating simd-adler32 v0.3.8 -> v0.3.9
      Updating socket2 v0.6.2 -> v0.6.3
      Updating tempfile v3.26.0 -> v3.27.0
      Updating terminal_size v0.4.3 -> v0.4.4
      Updating testcontainers v0.27.1 -> v0.27.2
      Updating tinystr v0.8.2 -> v0.8.3
      Updating tinyvec v1.10.0 -> v1.11.0
      Updating tokio v1.49.0 -> v1.51.0
      Updating tokio-macros v2.6.1 -> v2.7.0
        Adding toml_datetime v1.1.1+spec-1.1.0
      Updating toml_edit v0.23.10+spec-1.0.0 -> v0.25.10+spec-1.1.0
      Updating toml_parser v1.0.9+spec-1.1.0 -> v1.1.2+spec-1.1.0
      Updating toml_writer v1.0.6+spec-1.1.0 -> v1.1.1+spec-1.1.0
      Updating tracing-subscriber v0.3.22 -> v0.3.23
      Updating unicode-segmentation v1.12.0 -> v1.13.2
      Updating ureq v3.2.0 -> v3.3.0
      Updating ureq-proto v0.5.3 -> v0.6.0
      Removing utf-8 v0.7.6
        Adding utf8-zero v0.8.1
      Updating uuid v1.21.0 -> v1.23.0
      Updating wasm-bindgen v0.2.114 -> v0.2.117
      Updating wasm-bindgen-futures v0.4.64 -> v0.4.67
      Updating wasm-bindgen-macro v0.2.114 -> v0.2.117
      Updating wasm-bindgen-macro-support v0.2.114 -> v0.2.117
      Updating wasm-bindgen-shared v0.2.114 -> v0.2.117
      Updating web-sys v0.3.91 -> v0.3.94
      Removing winnow v0.7.14
        Adding winnow v0.7.15
        Adding winnow v1.0.1
      Updating writeable v0.6.2 -> v0.6.3
      Updating yoke v0.8.1 -> v0.8.2
      Updating yoke-derive v0.8.1 -> v0.8.2
      Updating zerocopy v0.8.40 -> v0.8.48
      Updating zerocopy-derive v0.8.40 -> v0.8.48
      Updating zerofrom v0.1.6 -> v0.1.7
      Updating zerofrom-derive v0.1.6 -> v0.1.7
      Updating zerotrie v0.2.3 -> v0.2.4
      Updating zerovec v0.11.5 -> v0.11.6
      Updating zerovec-derive v0.11.2 -> v0.11.3
  note: pass `--verbose` to see 9 unchanged dependencies behind latest
  ```

ACKs for top commit:
  josecelano:
    ACK 1228a2b

Tree-SHA512: 793ca0ebf4dcdf7e736554f7d71eee8716361db707517067906c1db693b2ea75524bd55fca0102df1ee9d8150ace62e3f71cd606daf294638de13cc89d7d2417
Move the project-specific word list from the inline 'words' array in
cSpell.json into a dedicated project-words.txt dictionary file, following
the same pattern used in other Torrust organisation repositories.

Update packages/metrics/cSpell.json to reference the shared dictionary
instead of maintaining its own inline word list.

Closes torrust#1484
…json

48e9606 refactor: extract project dictionary from cSpell.json (Jose Celano)

Pull request description:

  ## Summary

  Closes torrust#1484

  Move the project-specific word list from the inline `words` array in `cSpell.json` into a dedicated `project-words.txt` dictionary file, following the same pattern used in other Torrust organisation repositories (e.g. [torrust-index](https://github.com/torrust/torrust-index/blob/develop/cspell.json) and [torrust-tracker-deployer](https://github.com/torrust/torrust-tracker-deployer/blob/main/cspell.json)).

  ## Changes

  - `cSpell.json` — replaced the inline `words` array with a `dictionaryDefinitions` entry pointing to `./project-words.txt`, added `$schema` and `version` fields, and added `ignorePaths` for `target` and `/project-words.txt`
  - `packages/metrics/cSpell.json` — replaced its own inline `words` array with the same shared dictionary reference (`../../project-words.txt`)
  - `project-words.txt` (new) — contains all project-specific words previously listed in both config files

  ## Testing

  `cspell "**" --no-progress` produces the same set of results as on `develop` (pre-existing warnings in binary/generated files, third-party C code, and SVGs — none introduced by this change).

ACKs for top commit:
  josecelano:
    ACK 48e9606

Tree-SHA512: 8f0df3e92acc43ba3fb2a3eb408670f16c7ee25b4f3471a755ffd8906a4f571703a86163f3cf2e87e52cb3b05f6b5a0599cf692c277e97a790b9d5710c530af3
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ates

4f3f195 chore(deps): bump docker/build-push-action from 6 to 7 (dependabot[bot])
2c78850 chore(deps): bump docker/setup-buildx-action from 3 to 4 (dependabot[bot])
504135d chore(deps): bump docker/metadata-action from 5 to 6 (dependabot[bot])
c88f66c chore(deps): bump docker/login-action from 3 to 4 (dependabot[bot])

Pull request description:

  This PR consolidates the following Dependabot updates into one branch and PR:\n\n- torrust#1670: bump docker/build-push-action from 6 to 7\n- torrust#1668: bump docker/setup-buildx-action from 3 to 4\n- torrust#1667: bump docker/metadata-action from 5 to 6\n- torrust#1666: bump docker/login-action from 3 to 4\n\nEach dependency update was applied as a separate commit.

ACKs for top commit:
  josecelano:
    ACK 4f3f195

Tree-SHA512: 0f8d85b99934d0d859199f2bfd587dc49c9744ab57708204d037198dae44d317a70efde8b347944d0d1362773282a7e07e6a99a981a5fbdbc4222e678de35792
… tool

1d3ba50 ci(lint): switch testing workflow to internal linting tool (Jose Celano)
7085250 fix(lint/toml): normalize taplo formatting across workspace (Jose Celano)
0e174af fix(lint/yaml): resolve workflow yamllint issues (Jose Celano)
b654fa5 fix(lint/markdown): resolve markdownlint violations (Jose Celano)
f9b59f0 fix(lint/cspell): configure ignores and dictionary for repo (Jose Celano)
bc1f8cc fix(lint/clippy): resolve pedantic duration and style violations (Jose Celano)
fa3b491 ci(lint): add linter config files (Jose Celano)
f2612dc docs(issue-523): add internal linting implementation plan (Jose Celano)

Pull request description:

  ## Summary
  - implement issue torrust#523 using internal Torrust linting tool instead of MegaLinter
  - add/adapt linter config files for markdown, yaml, and toml
  - fix lint violations by category (clippy, cspell, markdown, yaml, toml) with separate commits
  - update .github/workflows/testing.yaml static-analysis job to run linter all

  ## Why
  Use the organization internal linting workflow for consistent lint behavior across Torrust repositories.

  ## Validation
  - local linter all passes

  ## Related
  - Closes torrust#523

ACKs for top commit:
  josecelano:
    ACK 1d3ba50

Tree-SHA512: 14ce3772b280c3f1e47bcdebd91e46dacc2f4aa5911c41e8bf118cffeed80cc6b4fe20d6e98a63fe028afa94cb2a9828da225fcd5b715914ea2f024fa6703311
…mporary sqlx staging tree

Closes Task 6 of subissue 1717-1525-05.

- Delete dead temporary staging tree under packages/tracker-core/src/databases/sqlx/
  (canonical async drivers and traits live in databases/driver/ and databases/traits/).
- Remove obsolete dependencies r2d2, r2d2_sqlite (rusqlite re-export), and r2d2_mysql
  from packages/tracker-core/Cargo.toml.
- Drop legacy compatibility surface from databases/error.rs:
  remove ConnectionPool variant and From impls for r2d2::Error, r2d2_sqlite::rusqlite::Error,
  r2d2_mysql::mysql::Error and r2d2_mysql::mysql::UrlError; update tests and module docs.
- Replace From<r2d2_sqlite::rusqlite::Error> with From<sqlx::Error> in
  authentication/key/mod.rs and update the related test.
- Refresh stale r2d2_* doc comments in the canonical SQLite and MySQL driver modules.
- Update subissue spec to mark Task 6 acceptance items as done.
The persistence benchmark used to fail intermittently when running the
MySQL driver because sqlx does not retry the first connection. The
official mysql container emits 'ready for connections' twice (first on
the unix socket during init, then on TCP), so we now wait for the
second occurrence on stderr and additionally ping with SELECT 1 in a
short retry loop before initializing the schema.

Add the new technical terms (finalises, mysqld, syscall, testcontainer)
to the project dictionary so cspell stays happy across follow-up
benchmark documentation.
Compare the post-sqlx persistence benchmark against the 2026-04-28
baseline on the same hardware. MySQL totals are ~13-16% faster (mysql
8.4: 7381->6231 ms, mysql 8.0: 7633->6678 ms), with notable per-op wins
on the whitelist/keys removal paths. SQLite totals shift within
expected jitter on a 100-op suite. Conclusion: no regression introduced
by the SQLx migration.

Also document in initialize_database that the function will panic if
the underlying database is not yet accepting connections (sqlx does
not retry the first query) or if any other sqlx::Error occurs while
creating the schema.
… changes

When a commit set has to be split into multiple focused commits and
project-words.txt has been touched, do not try to assign each new
dictionary entry to the commit that introduced its term. Commit all
project-words.txt changes first (as a single commit, or folded into
the first logical commit), then create the focused commits for the
real changes. This keeps the cspell linter green at every commit and
keeps the substantive commits focused on their real intent.
INSERT ... ON DUPLICATE KEY UPDATE legitimately reports rows_affected() == 0 when the row already exists with the same value (no-op update). Treating that as a failure produced spurious InsertFailed errors. Drop the rows_affected() == 0 check for save_torrent_aggregate_metric and save_torrent_downloads in the MySQL driver; real failures still surface as Err from execute().

Addresses Copilot review items #3 and torrust#4 on PR torrust#1718.
…rdown

The schema teardown for both the SQLite and MySQL drivers was missing a DROP TABLE for torrent_aggregate_metrics, leaving the table behind after rollback. Add the missing statement so test/setup teardown leaves a clean schema.

Addresses Copilot review items torrust#5 and torrust#6 on PR torrust#1718.
…t overflow

Replace silent unsigned_abs() coercion of i64 valid_until timestamps loaded from the database with a parse_valid_until helper that rejects negative values as Error::MalformedDatabaseRecord (timestamps before the Unix epoch are not representable as DurationSinceUnixEpoch).

Replace usize::try_from(rows_affected).unwrap_or(0) in the auth-key and whitelist stores (SQLite + MySQL) with proper error propagation as Error::MalformedDatabaseRecord, so a u64 row count that does not fit in usize is no longer silently squashed to 0.

Addresses Copilot review items torrust#8, torrust#11, torrust#12, #13, #14 and torrust#15 on PR torrust#1718.
SqliteConnectOptions::from_str(&format!("sqlite://{db_path}")) reinterprets the leading segment of a relative path (e.g. ./storage/...) as the URL authority, which mangles the resolved file path. Build the options directly with SqliteConnectOptions::new().filename(db_path) so the path is preserved verbatim.

Addresses Copilot review item torrust#10 on PR torrust#1718.
Replace the fixed 10-iteration yield_now() loop in it_should_persist_the_number_of_completed_peers_for_each_torrent_into_the_database with a tokio::time::timeout(5s, ...) wrapper plus a 50 ms sleep between attempts. The test now fails loudly on a stalled system rather than silently after an arbitrary burst of immediate retries.

Addresses Copilot review item #1 on PR torrust#1718.
Re-add the #[must_use] attribute on setup() (lost in an earlier refactor) so callers cannot accidentally drop the returned (Configuration, AppContainer) tuple, and fix the "Setup can file" typo in the panics section to "Setup can fail".

Addresses Copilot review items #2 and torrust#9 on PR torrust#1718.
`ON CONFLICT ... DO UPDATE` may legitimately report `rows_affected() == 0`
when the existing row already holds the same value (no-op update). The
previous code treated that as an `InsertFailed` error, which could turn
benign re-saves into spurious failures.

Drop the `rows_affected() == 0` check on the SQLite `save_torrent_aggregate_metric`
and `save_torrent_downloads` upserts (mirroring the MySQL fix in 5512ac3).
A real failure still surfaces as `Err` from `execute()`. Also remove the
now-unused `std::panic::Location` import in `sqlite/mod.rs`.

Addresses Copilot review comment #16 on PR torrust#1718.
…ermediate state

In `it_should_persist_the_number_of_completed_peers_for_each_torrent_into_the_database`,
the retry loop previously asserted `swarm_metadata.downloads() == 1` on the
first observation. If the background event listener has stored the row but
not yet updated the in-memory `downloads` counter, that assertion would
panic the test instead of letting the bounded `tokio::time::timeout` wait
for the desired state.

Change the check to `if downloads() == 1 { break true }` so the timeout
actually governs the wait and intermediate observations are tolerated.

Addresses Copilot review comment #17 on PR torrust#1718.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant