From 867bdf0de10b1faf01ba81bb5671bad7f11e1cf5 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 10 Oct 2026 16:46:22 +0000 Subject: [PATCH 1/5] Upgrade to rust 1.99 --- Cargo.toml | 2 +- cloud-sql-connector/CHANGELOG.md | 6 +++++ cmd-proc/CHANGELOG.md | 6 +++++ git-proc/CHANGELOG.md | 6 +++++ greenhell/CHANGELOG.md | 2 +- mlambda/CHANGELOG.md | 2 +- mmigration/CHANGELOG.md | 2 +- mmigration/src/defined_migrations.rs | 28 ++++++-------------- mmigration/tests/integration_load_fixture.rs | 8 +++--- ociman/CHANGELOG.md | 4 +++ pg-client/CHANGELOG.md | 4 +++ pg-ephemeral/CHANGELOG.md | 4 +++ rust-toolchain.toml | 2 +- stack-deploy/CHANGELOG.md | 2 +- stratosphere-core/CHANGELOG.md | 2 +- stratosphere-generator/CHANGELOG.md | 2 +- stratosphere/CHANGELOG.md | 2 +- typed-reqwest/CHANGELOG.md | 4 +++ wtt/CHANGELOG.md | 7 +---- 19 files changed, 55 insertions(+), 40 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c9efa405..26068392 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ resolver = "3" [workspace.package] authors = ["Markus Schirp "] edition = "2024" -rust-version = "1.98" +rust-version = "1.99" [workspace.dependencies] # Pinned to 1.129 as global `cargo update` resolves to 1.119 due to a diff --git a/cloud-sql-connector/CHANGELOG.md b/cloud-sql-connector/CHANGELOG.md index d1d4369f..71109ef7 100644 --- a/cloud-sql-connector/CHANGELOG.md +++ b/cloud-sql-connector/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.7.0 ### Fixed diff --git a/cmd-proc/CHANGELOG.md b/cmd-proc/CHANGELOG.md index fae541af..a6f484e6 100644 --- a/cmd-proc/CHANGELOG.md +++ b/cmd-proc/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.6.2 ### Added diff --git a/git-proc/CHANGELOG.md b/git-proc/CHANGELOG.md index c27eb2b6..2dc9f310 100644 --- a/git-proc/CHANGELOG.md +++ b/git-proc/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.6.0 ### Breaking Changes diff --git a/greenhell/CHANGELOG.md b/greenhell/CHANGELOG.md index f22bce87..e66c3017 100644 --- a/greenhell/CHANGELOG.md +++ b/greenhell/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.0.1 diff --git a/mlambda/CHANGELOG.md b/mlambda/CHANGELOG.md index ebb626fe..95ab11c9 100644 --- a/mlambda/CHANGELOG.md +++ b/mlambda/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.0.1 diff --git a/mmigration/CHANGELOG.md b/mmigration/CHANGELOG.md index 22c8de8f..0625c047 100644 --- a/mmigration/CHANGELOG.md +++ b/mmigration/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.0.1 diff --git a/mmigration/src/defined_migrations.rs b/mmigration/src/defined_migrations.rs index 82beb376..26a2d52b 100644 --- a/mmigration/src/defined_migrations.rs +++ b/mmigration/src/defined_migrations.rs @@ -15,15 +15,9 @@ pub enum AddError { #[error("Expected next defined migration index: {expected} got: {got}")] NonConsecutive { expected: Index, got: Index }, #[error(transparent)] - IndexError { - #[from] - source: IndexError, - }, + IndexError(#[from] IndexError), #[error(transparent)] - PendingError { - #[from] - source: PendingError, - }, + PendingError(#[from] PendingError), } #[derive(Clone, Copy, Debug, Eq, PartialEq, thiserror::Error)] @@ -37,10 +31,7 @@ pub enum PendingError { #[error("Initial migration needs to be indexed at 0, got: {got}!")] InitialIndex { got: Index }, #[error(transparent)] - IndexError { - #[from] - source: IndexError, - }, + IndexError(#[from] IndexError), } #[derive(Debug, thiserror::Error)] @@ -64,10 +55,7 @@ pub enum LoadError { #[error("Migration file name is not valid UTF-8: {path}")] NonUtf8FileName { path: std::path::PathBuf }, #[error(transparent)] - AddError { - #[from] - source: AddError, - }, + AddError(#[from] AddError), } fn parse_migration_file_name(file_name: &str) -> Result<(Index, MigrationName), String> { @@ -220,7 +208,7 @@ impl DefinedMigrations { self.0.remove(&index); } - return Err(AddError::PendingError { source }); + return Err(AddError::PendingError(source)); } Ok(()) @@ -321,9 +309,9 @@ mod tests { let mut defined = DefinedMigrations::new(); assert_eq!( - Err(AddError::PendingError { - source: PendingError::InitialIndex { got: 1_u32.into() }, - }), + Err(AddError::PendingError(PendingError::InitialIndex { + got: 1_u32.into() + })), defined.add(pending(1, "example", "SELECT 1")) ); } diff --git a/mmigration/tests/integration_load_fixture.rs b/mmigration/tests/integration_load_fixture.rs index 8885436a..79fc4cb0 100644 --- a/mmigration/tests/integration_load_fixture.rs +++ b/mmigration/tests/integration_load_fixture.rs @@ -104,7 +104,7 @@ fn load_defined_migrations_with_invalid_filename_returns_error() { fn load_defined_migrations_with_non_consecutive_indexes_returns_add_error() { let error = DefinedMigrations::load(&fixture_dir("non_consecutive_after_initial")).unwrap_err(); - let LoadError::AddError { source } = error else { + let LoadError::AddError(source) = error else { panic!("expected AddError"); }; @@ -121,14 +121,12 @@ fn load_defined_migrations_with_non_consecutive_indexes_returns_add_error() { fn load_defined_migrations_with_non_initial_index_returns_pending_add_error() { let error = DefinedMigrations::load(&fixture_dir("initial_non_zero")).unwrap_err(); - let LoadError::AddError { source } = error else { + let LoadError::AddError(source) = error else { panic!("expected AddError"); }; assert_eq!( - AddError::PendingError { - source: PendingError::InitialIndex { got: 1_u32.into() } - }, + AddError::PendingError(PendingError::InitialIndex { got: 1_u32.into() }), source ); } diff --git a/ociman/CHANGELOG.md b/ociman/CHANGELOG.md index 269279f1..828f1700 100644 --- a/ociman/CHANGELOG.md +++ b/ociman/CHANGELOG.md @@ -12,6 +12,10 @@ errors — and every error aggregating them — exceed the size at which the value is worth moving around by value. +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.8.0 ### Breaking Changes diff --git a/pg-client/CHANGELOG.md b/pg-client/CHANGELOG.md index 9887c00c..7b34478c 100644 --- a/pg-client/CHANGELOG.md +++ b/pg-client/CHANGELOG.md @@ -10,6 +10,10 @@ `=`, so the first `=` is unambiguously the separator and everything after it is the value. +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.6.0 ### Breaking Changes diff --git a/pg-ephemeral/CHANGELOG.md b/pg-ephemeral/CHANGELOG.md index 263ab45b..262e49f0 100644 --- a/pg-ephemeral/CHANGELOG.md +++ b/pg-ephemeral/CHANGELOG.md @@ -27,6 +27,10 @@ Parameters feed the seed cache key, so a top-level parameter invalidates the cached images of every instance. +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.6.1 ### Added diff --git a/rust-toolchain.toml b/rust-toolchain.toml index fa3eb9f2..dacf45fa 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.98" +channel = "1.99" targets = [ "aarch64-unknown-linux-musl", "aarch64-unknown-linux-gnu", diff --git a/stack-deploy/CHANGELOG.md b/stack-deploy/CHANGELOG.md index 636a59d7..d1a7cdbf 100644 --- a/stack-deploy/CHANGELOG.md +++ b/stack-deploy/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.0.3 diff --git a/stratosphere-core/CHANGELOG.md b/stratosphere-core/CHANGELOG.md index 96d1bcad..58b4fb15 100644 --- a/stratosphere-core/CHANGELOG.md +++ b/stratosphere-core/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.1.0 diff --git a/stratosphere-generator/CHANGELOG.md b/stratosphere-generator/CHANGELOG.md index d8486bb8..ab3d8980 100644 --- a/stratosphere-generator/CHANGELOG.md +++ b/stratosphere-generator/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.1.0 diff --git a/stratosphere/CHANGELOG.md b/stratosphere/CHANGELOG.md index d6778f5c..4d0b3797 100644 --- a/stratosphere/CHANGELOG.md +++ b/stratosphere/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Raised minimum supported Rust version to 1.95. +- Raised minimum supported Rust version to 1.99. ## 0.1.0 diff --git a/typed-reqwest/CHANGELOG.md b/typed-reqwest/CHANGELOG.md index 932b9c61..6b4f2a27 100644 --- a/typed-reqwest/CHANGELOG.md +++ b/typed-reqwest/CHANGELOG.md @@ -24,6 +24,10 @@ constructed or borrowed and then discarded. Decoders continue to be registered through the `ContentTypes` methods that take closures. +### Changed + +- Raised minimum supported Rust version to 1.99. + ## 0.1.0 ### Added diff --git a/wtt/CHANGELOG.md b/wtt/CHANGELOG.md index 6bbcdcd5..9774086a 100644 --- a/wtt/CHANGELOG.md +++ b/wtt/CHANGELOG.md @@ -1,15 +1,10 @@ # Changelog -## Unreleased - -### Changed - -- Raised minimum supported Rust version to 1.95. - ## 0.1.0 - Bump version to 0.1.0 - Remove pre-1.0 stability warning from README +- Raised minimum supported Rust version to 1.99. ## 0.0.7 From a5c967d14fc4a968dd7e88d65aef596631b92dd6 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 10 Oct 2026 17:12:07 +0000 Subject: [PATCH 2/5] Remove rustls-pemfile dependency --- Cargo.lock | 12 +----------- Cargo.toml | 1 - cloud-sql-connector/CHANGELOG.md | 14 +++++++++++++- cloud-sql-connector/Cargo.toml | 3 +-- cloud-sql-connector/src/lib.rs | 7 +++++++ cloud-sql-connector/src/tls.rs | 14 ++++++-------- 6 files changed, 28 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b683ae4d..e7544d41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -884,7 +884,7 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cloud-sql-connector" -version = "0.7.0" +version = "0.8.0" dependencies = [ "google-cloud-auth", "google-cloud-gax", @@ -895,7 +895,6 @@ dependencies = [ "rcgen", "rsa", "rustls", - "rustls-pemfile", "thiserror", "time", "tokio", @@ -3612,15 +3611,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.14.1" diff --git a/Cargo.toml b/Cargo.toml index 26068392..40662965 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,7 +65,6 @@ reqwest = { version = "0.13", features = ["json", "query", "rustls"], default-fe rsa = { version = "0.9", features = ["pem"] } rustix = { version = "1", features = ["fs", "process"] } rustls = "0.23" -rustls-pemfile = "2" semver = "1" serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["arbitrary_precision", "indexmap"] } diff --git a/cloud-sql-connector/CHANGELOG.md b/cloud-sql-connector/CHANGELOG.md index 71109ef7..f2274cf0 100644 --- a/cloud-sql-connector/CHANGELOG.md +++ b/cloud-sql-connector/CHANGELOG.md @@ -1,10 +1,22 @@ # Changelog -## Unreleased +## 0.8.0 + +### Breaking Changes + +- Malformed certificate PEM from the Cloud SQL Admin API now reports as the new + `Error::CertificatePem`, which carries the underlying PEM parse error as its + source, rather than as `Error::Io`. `Error::Io` is now only ever a genuine + I/O failure — opening the socket or the TLS handshake — so matching it to + detect a bad certificate no longer works. `Error::NoCertificatesInPem` is + unchanged and still reports PEM data containing no certificate section. ### Changed - Raised minimum supported Rust version to 1.99. +- Dropped the `rustls-pemfile` dependency. Certificate PEM parsing now uses the + PEM support in `rustls-pki-types`, which was already in the dependency tree + via `rustls`. ## 0.7.0 diff --git a/cloud-sql-connector/Cargo.toml b/cloud-sql-connector/Cargo.toml index 061482e4..c25c1f02 100644 --- a/cloud-sql-connector/Cargo.toml +++ b/cloud-sql-connector/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloud-sql-connector" -version = "0.7.0" +version = "0.8.0" edition.workspace = true authors.workspace = true rust-version.workspace = true @@ -23,7 +23,6 @@ log.workspace = true nom.workspace = true rsa.workspace = true rustls.workspace = true -rustls-pemfile.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["io-util", "net", "sync"] } tokio-rustls.workspace = true diff --git a/cloud-sql-connector/src/lib.rs b/cloud-sql-connector/src/lib.rs index 01349e1b..7076881e 100644 --- a/cloud-sql-connector/src/lib.rs +++ b/cloud-sql-connector/src/lib.rs @@ -44,6 +44,13 @@ const RSA_KEY_BITS: usize = 2048; /// Cloud SQL connector errors. #[derive(Debug, thiserror::Error)] pub enum Error { + /// Certificate PEM data from the API is malformed. + #[error("failed to parse certificate from PEM data")] + CertificatePem { + /// The underlying PEM parse error. + #[source] + source: rustls::pki_types::pem::Error, + }, /// Cloud SQL API client builder error. #[error(transparent)] ClientBuilder(#[from] google_cloud_gax::client_builder::Error), diff --git a/cloud-sql-connector/src/tls.rs b/cloud-sql-connector/src/tls.rs index 58ed25c4..840baf72 100644 --- a/cloud-sql-connector/src/tls.rs +++ b/cloud-sql-connector/src/tls.rs @@ -5,13 +5,13 @@ //! certificate authenticates the server identity, so hostname verification //! is skipped. -use std::io::BufReader; use std::sync::Arc; use std::time::{Duration, SystemTime}; use google_cloud_sql_v1::model::ConnectSettings; use rustls::RootCertStore; use rustls::client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier}; +use rustls::pki_types::pem::{self, PemObject}; use rustls::pki_types::{CertificateDer, PrivateKeyDer, ServerName, UnixTime}; use crate::Error; @@ -149,13 +149,11 @@ pub(crate) fn cert_not_after(cert: &CertificateDer<'_>) -> Result Result, Error> { - let mut reader = BufReader::new(pem.as_bytes()); - - rustls_pemfile::certs(&mut reader) - .next() - .ok_or(Error::NoCertificatesInPem)? - .map_err(Error::from) +pub(crate) fn parse_pem_cert(input: &str) -> Result, Error> { + CertificateDer::from_pem_slice(input.as_bytes()).map_err(|source| match source { + pem::Error::NoItemsFound => Error::NoCertificatesInPem, + source => Error::CertificatePem { source }, + }) } #[cfg(test)] From a28aea8fee60a0726a23a3f4a74feef20e5ce196 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 10 Oct 2026 17:27:59 +0000 Subject: [PATCH 3/5] Remove rsa dependency --- Cargo.lock | 134 +------------------------------ Cargo.toml | 3 +- clippy.toml | 7 +- cloud-sql-connector/CHANGELOG.md | 11 +++ cloud-sql-connector/Cargo.toml | 3 +- cloud-sql-connector/src/lib.rs | 64 +++++++++------ 6 files changed, 60 insertions(+), 162 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7544d41..aa833cf5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -886,14 +886,15 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" name = "cloud-sql-connector" version = "0.8.0" dependencies = [ + "aws-lc-rs", "google-cloud-auth", "google-cloud-gax", "google-cloud-sql-v1", "ipnet", "log", "nom 8.0.0", + "pem-rfc7468", "rcgen", - "rsa", "rustls", "thiserror", "time", @@ -962,12 +963,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - [[package]] name = "const-oid" version = "0.10.2" @@ -1185,17 +1180,6 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" -[[package]] -name = "der" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" -dependencies = [ - "const-oid 0.9.6", - "pem-rfc7468", - "zeroize", -] - [[package]] name = "der-parser" version = "10.0.0" @@ -1233,7 +1217,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid 0.9.6", "crypto-common 0.1.6", ] @@ -1244,7 +1227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.0", - "const-oid 0.10.2", + "const-oid", "crypto-common 0.2.2", "ctutils", "zeroize", @@ -2373,9 +2356,6 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -dependencies = [ - "spin 0.9.8", -] [[package]] name = "leb128fmt" @@ -2395,12 +2375,6 @@ version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" -[[package]] -name = "libm" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" - [[package]] name = "libredox" version = "0.1.17" @@ -2794,22 +2768,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-bigint-dig" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" -dependencies = [ - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.8.6", - "smallvec", - "zeroize", -] - [[package]] name = "num-conv" version = "0.2.2" @@ -2825,17 +2783,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2843,7 +2790,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -3103,27 +3049,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der", - "pkcs8", - "spki", -] - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.33" @@ -3282,23 +3207,13 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ - "rand_chacha 0.9.0", + "rand_chacha", "rand_core 0.9.5", ] @@ -3313,16 +3228,6 @@ dependencies = [ "rand_core 0.10.1", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0" @@ -3527,26 +3432,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rsa" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" -dependencies = [ - "const-oid 0.9.6", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8", - "rand_core 0.6.4", - "signature", - "spki", - "subtle", - "zeroize", -] - [[package]] name = "rustc-hash" version = "2.1.2" @@ -3921,7 +3806,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.7", "rand_core 0.6.4", ] @@ -3996,16 +3880,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" diff --git a/Cargo.toml b/Cargo.toml index 40662965..058a8eaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ rust-version = "1.99" # Pinned to 1.129 as global `cargo update` resolves to 1.119 due to a # crc/crc-fast version conflict. 1.119 pulls in lru 0.12.5, which has a # security advisory (GHSA-2qph-qpvm-2qf7). 1.129 pulls in lru 0.16.3. +aws-lc-rs = "1" aws-sdk-s3 = { version = "1.133", default-features = false } async-stream = "0.3" chrono = { version = "0.4", features = ["serde"] } @@ -53,6 +54,7 @@ mmigration = { path = "mmigration" } nom = "8" nom-language = "0.1" ociman = { version = "0.9.0", path = "ociman" } +pem-rfc7468 = { version = "0.7", features = ["alloc"] } pg-client = { version = "0.6.1", path = "pg-client", features = ["sqlx"] } pg-ephemeral = { version = "0.7.0", path = "pg-ephemeral" } pretty_assertions = "1.4" @@ -62,7 +64,6 @@ quote = "1" rand = "0.10" regex-lite = "0.1.9" reqwest = { version = "0.13", features = ["json", "query", "rustls"], default-features = false } -rsa = { version = "0.9", features = ["pem"] } rustix = { version = "1", features = ["fs", "process"] } rustls = "0.23" semver = "1" diff --git a/clippy.toml b/clippy.toml index 9501ff51..046a6a02 100644 --- a/clippy.toml +++ b/clippy.toml @@ -24,7 +24,6 @@ allowed-duplicate-crates = [ # Source: sqlx-postgres -> rand 0.8, pg-ephemeral -> rand 0.10 "rand", "rand_core", - "rand_chacha", # Transitive from rand 0.8/0.10 split, plus ring (crypto) uses getrandom 0.2 # Source: rand 0.8 -> getrandom 0.2, rand 0.10 -> getrandom 0.4 @@ -34,12 +33,11 @@ allowed-duplicate-crates = [ "cpufeatures", # sha2 0.11 (direct dep) vs 0.10 (transitive from aws-sdk, google-cloud, msqlx) - # Also causes duplicate digest, crypto-common, block-buffer, const-oid + # Also causes duplicate digest, crypto-common, block-buffer "sha2", "digest", "crypto-common", "block-buffer", - "const-oid", # untrusted 0.7.1 vs 0.9.0. NOT ring (we compile no ring) — untrusted is a # tiny zero-dependency, no-C, pure-Rust byte-input parser. aws-lc-rs's @@ -53,9 +51,6 @@ allowed-duplicate-crates = [ # We use nom 8 while most of the ecosystem still depends on nom 7 "nom", - # libredox 0.1 requires redox_syscall 0.7, while other crates still use 0.5 - "redox_syscall", - # getrandom 0.3 -> r-efi 5.x, getrandom 0.4 -> r-efi 6.x "r-efi", diff --git a/cloud-sql-connector/CHANGELOG.md b/cloud-sql-connector/CHANGELOG.md index f2274cf0..e0a967de 100644 --- a/cloud-sql-connector/CHANGELOG.md +++ b/cloud-sql-connector/CHANGELOG.md @@ -10,6 +10,11 @@ I/O failure — opening the socket or the TLS handshake — so matching it to detect a bad certificate no longer works. `Error::NoCertificatesInPem` is unchanged and still reports PEM data containing no certificate section. +- `Error::Pkcs8` and `Error::Spki` are **removed**, replaced by + `Error::PrivateKeyEncode` and `Error::PublicKeyEncode`, which name the key + being encoded rather than the encoding standard. `Error::RsaKeyGeneration` no + longer carries a payload. None of the three carries a source error any more, + because the underlying key generation and encoding failures report no detail. ### Changed @@ -17,6 +22,12 @@ - Dropped the `rustls-pemfile` dependency. Certificate PEM parsing now uses the PEM support in `rustls-pki-types`, which was already in the dependency tree via `rustls`. +- Dropped the `rsa` dependency. The ephemeral certificate key pair is now + generated by `aws-lc-rs`, already in the dependency tree via `rustls`, which + removes the pure-Rust bignum stack (`rsa`, `num-bigint-dig`, `pkcs1`, + `pkcs8`, `spki`, `der`) and generates the key in native code. The public key + is armored with `pem-rfc7468` for the API's PEM-encoded `public_key` field; + the key size is unchanged at RSA 2048. ## 0.7.0 diff --git a/cloud-sql-connector/Cargo.toml b/cloud-sql-connector/Cargo.toml index c25c1f02..fee0ad7e 100644 --- a/cloud-sql-connector/Cargo.toml +++ b/cloud-sql-connector/Cargo.toml @@ -15,13 +15,14 @@ categories = ["database"] workspace = true [dependencies] +aws-lc-rs.workspace = true google-cloud-auth.workspace = true google-cloud-gax.workspace = true google-cloud-sql-v1.workspace = true ipnet.workspace = true log.workspace = true nom.workspace = true -rsa.workspace = true +pem-rfc7468.workspace = true rustls.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["io-util", "net", "sync"] } diff --git a/cloud-sql-connector/src/lib.rs b/cloud-sql-connector/src/lib.rs index 7076881e..4e0d1b98 100644 --- a/cloud-sql-connector/src/lib.rs +++ b/cloud-sql-connector/src/lib.rs @@ -16,12 +16,12 @@ use std::path::Path; use std::sync::Arc; use std::time::{Duration, SystemTime}; +use aws_lc_rs::encoding::{AsDer as _, Pkcs8V1Der, PublicKeyX509Der}; +use aws_lc_rs::rsa::{KeyPair, KeySize}; +use aws_lc_rs::signature::KeyPair as _; use google_cloud_auth::credentials::Credentials; use google_cloud_sql_v1::client::SqlConnectService; use google_cloud_sql_v1::model::{ConnectSettings, IpMapping, SqlIpAddressType, SslCert}; -use rsa::RsaPrivateKey; -use rsa::pkcs8::EncodePrivateKey as _; -use rsa::pkcs8::EncodePublicKey as _; use rustls::pki_types::{PrivateKeyDer, ServerName}; use tokio::io::copy_bidirectional; use tokio::net::{TcpListener, TcpStream, UnixListener}; @@ -38,8 +38,11 @@ const CLOUD_SQL_PORT: u16 = 3307; /// lapse. const CERT_REFRESH_MARGIN: Duration = Duration::from_secs(4 * 60); -/// RSA key size in bits for ephemeral certificate requests. -const RSA_KEY_BITS: usize = 2048; +/// RSA key size for ephemeral certificate requests. +const RSA_KEY_SIZE: KeySize = KeySize::Rsa2048; + +/// PEM label for an X.509 `SubjectPublicKeyInfo` document (RFC 7468 section 13). +const PEM_LABEL_PUBLIC_KEY: &str = "PUBLIC KEY"; /// Cloud SQL connector errors. #[derive(Debug, thiserror::Error)] @@ -87,21 +90,21 @@ pub enum Error { /// No primary IP address found for the instance. #[error("no primary IP address found for Cloud SQL instance")] NoPrimaryIp, - /// PKCS#8 encoding error. - #[error("failed to encode RSA key: {0}")] - Pkcs8(#[from] rsa::pkcs8::Error), + /// RSA private key could not be encoded as PKCS#8 DER. + #[error("failed to encode RSA private key")] + PrivateKeyEncode, + /// RSA public key could not be encoded as SubjectPublicKeyInfo PEM. + #[error("failed to encode RSA public key")] + PublicKeyEncode, /// RSA key generation error. - #[error("failed to generate RSA key: {0}")] - RsaKeyGeneration(#[from] rsa::Error), + #[error("failed to generate RSA key")] + RsaKeyGeneration, /// Server CA certificate PEM is empty. #[error("server CA certificate PEM is empty")] ServerCaCertEmpty, /// Server CA certificate missing from API response. #[error("server CA certificate missing from connectSettings response")] ServerCaCertMissing, - /// SPKI encoding error. - #[error("failed to encode RSA public key: {0}")] - Spki(#[from] rsa::pkcs8::spki::Error), /// TLS configuration error. #[error("TLS configuration error: {0}")] TlsConfig(#[from] rustls::Error), @@ -154,8 +157,8 @@ struct ConnectInfoFetcher { instance: String, /// GCP project ID. project: String, - /// RSA private key for ephemeral certificate requests. - rsa_private_key: RsaPrivateKey, + /// RSA key pair for ephemeral certificate requests. + rsa_key_pair: KeyPair, } impl ConnectInfoFetcher { @@ -186,18 +189,31 @@ impl ConnectInfoFetcher { /// Encode the RSA private key as PKCS#8 DER for TLS. fn private_key_der(&self) -> Result, Error> { - let der = self.rsa_private_key.to_pkcs8_der()?; + let der: Pkcs8V1Der<'static> = self + .rsa_key_pair + .as_der() + .map_err(|_| Error::PrivateKeyEncode)?; + Ok(PrivateKeyDer::Pkcs8( - rustls::pki_types::PrivatePkcs8KeyDer::from(der.as_bytes().to_vec()), + rustls::pki_types::PrivatePkcs8KeyDer::from(der.as_ref().to_vec()), )) } - /// Encode the RSA public key as PEM for the Cloud SQL Admin API. + /// Encode the RSA public key as `SubjectPublicKeyInfo` PEM, the form the + /// Cloud SQL Admin API's `public_key` field takes. fn public_key_pem(&self) -> Result { - Ok(self - .rsa_private_key - .to_public_key() - .to_public_key_pem(rsa::pkcs8::LineEnding::LF)?) + let der: PublicKeyX509Der<'static> = self + .rsa_key_pair + .public_key() + .as_der() + .map_err(|_| Error::PublicKeyEncode)?; + + pem_rfc7468::encode_string( + PEM_LABEL_PUBLIC_KEY, + pem_rfc7468::LineEnding::LF, + der.as_ref(), + ) + .map_err(|_| Error::PublicKeyEncode) } } @@ -329,13 +345,13 @@ impl Dialer { instance: impl Into, client: SqlConnectService, ) -> Result { - let rsa_private_key = RsaPrivateKey::new(&mut rsa::rand_core::OsRng, RSA_KEY_BITS)?; + let rsa_key_pair = KeyPair::generate(RSA_KEY_SIZE).map_err(|_| Error::RsaKeyGeneration)?; let fetcher = ConnectInfoFetcher { client, instance: instance.into(), project: project.into(), - rsa_private_key, + rsa_key_pair, }; Ok(Self { From 1ec7405c73f0fedb63a7c8d91aaa5cd3262a7c40 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 10 Oct 2026 17:59:55 +0000 Subject: [PATCH 4/5] Remove dirs dependency --- Cargo.lock | 89 ++++++++-------------------------- Cargo.toml | 1 - ociman/CHANGELOG.md | 3 ++ ociman/Cargo.toml | 1 - ociman/src/config.rs | 2 +- pg-ephemeral/CHANGELOG.md | 9 ++++ pg-ephemeral/Cargo.toml | 1 - pg-ephemeral/src/cache_lock.rs | 33 +++++++++++-- wtt/CHANGELOG.md | 3 ++ wtt/Cargo.toml | 1 - wtt/src/config.rs | 4 +- 11 files changed, 68 insertions(+), 79 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa833cf5..d03a917e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,7 +79,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -90,7 +90,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -241,9 +241,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.17.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" +checksum = "b281d307588d634de920874890732659e2e7672f72b5e10e81badc1a8a83621e" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -252,14 +252,15 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.41.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" +checksum = "9bff6c3b54fad79a2e60b8102caf565819711497c1f5f092f49508e2f5c31b27" dependencies = [ "cc", "cmake", "dunce", "fs_extra", + "pkg-config", ] [[package]] @@ -1061,9 +1062,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.18" +version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" dependencies = [ "crossbeam-utils", ] @@ -1233,27 +1234,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.61.2", -] - [[package]] name = "displaydoc" version = "0.2.6" @@ -1337,7 +1317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1778,9 +1758,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.14" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" dependencies = [ "atomic-waker", "bytes", @@ -2375,15 +2355,6 @@ version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" -[[package]] -name = "libredox" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" -dependencies = [ - "libc", -] - [[package]] name = "libsqlite3-sys" version = "0.37.0" @@ -2798,7 +2769,6 @@ version = "0.9.0" dependencies = [ "clap", "cmd-proc", - "dirs", "env_logger", "hex", "indoc", @@ -2879,12 +2849,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "outref" version = "0.5.2" @@ -2986,7 +2950,6 @@ dependencies = [ "clap", "cmd-proc", "comfy-table", - "dirs", "env_logger", "git-proc", "hex", @@ -3314,17 +3277,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror", -] - [[package]] name = "ref-cast" version = "1.0.25" @@ -3466,14 +3418,14 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.40" +version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" +checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ "aws-lc-rs", "log", @@ -3524,7 +3476,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3535,9 +3487,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" dependencies = [ "aws-lc-rs", "ring", @@ -3862,7 +3814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -4732,7 +4684,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5071,7 +5023,6 @@ version = "0.1.0" dependencies = [ "clap", "cmd-proc", - "dirs", "env_logger", "git-proc", "log", diff --git a/Cargo.toml b/Cargo.toml index 058a8eaf..46d36751 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,6 @@ chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.6", features = ["derive"] } cmd-proc = { version = "0.6.2", path = "cmd-proc" } comfy-table = "7" -dirs = "6" env_logger = "0.11" fluent-uri = { version = "0.4", features = ["net"] } git-proc = { version = "0.6.0", path = "git-proc" } diff --git a/ociman/CHANGELOG.md b/ociman/CHANGELOG.md index 828f1700..d366adbe 100644 --- a/ociman/CHANGELOG.md +++ b/ociman/CHANGELOG.md @@ -15,6 +15,9 @@ ### Changed - Raised minimum supported Rust version to 1.99. +- Dropped the `dirs` dependency. The home directory behind the default + configuration path now comes from `std::env::home_dir()`, which resolves it + identically. ## 0.8.0 diff --git a/ociman/Cargo.toml b/ociman/Cargo.toml index 4a73d769..071d770b 100644 --- a/ociman/Cargo.toml +++ b/ociman/Cargo.toml @@ -20,7 +20,6 @@ workspace = true [dependencies] clap.workspace = true cmd-proc.workspace = true -dirs.workspace = true hex.workspace = true ipnet.workspace = true tokio.workspace = true diff --git a/ociman/src/config.rs b/ociman/src/config.rs index dfe77462..39ec2118 100644 --- a/ociman/src/config.rs +++ b/ociman/src/config.rs @@ -36,7 +36,7 @@ impl Config { #[must_use] pub fn default_config_path() -> PathBuf { - dirs::home_dir() + std::env::home_dir() .expect("HOME directory not found") .join(".config/ociman.toml") } diff --git a/pg-ephemeral/CHANGELOG.md b/pg-ephemeral/CHANGELOG.md index 262e49f0..bb0fdfe7 100644 --- a/pg-ephemeral/CHANGELOG.md +++ b/pg-ephemeral/CHANGELOG.md @@ -30,6 +30,15 @@ ### Changed - Raised minimum supported Rust version to 1.99. +- Dropped the `dirs` dependency. The cache lock directory is now resolved from + `$XDG_RUNTIME_DIR`, `$XDG_STATE_HOME` and `$XDG_CACHE_HOME` directly, in that + order of preference, falling back to `$HOME/.local/state` and `$HOME/.cache` + where the specification defines a default. The precedence and the Linux paths + are unchanged. On macOS the lock directory moves out of + `~/Library/Caches/pg-ephemeral/locks` to `~/.local/state/pg-ephemeral/locks`, + because the XDG layout now applies on every platform. Locks are host-local + coordination state only, so a lock left behind in the old location is never + consulted again and nothing needs migrating. ## 0.6.1 diff --git a/pg-ephemeral/Cargo.toml b/pg-ephemeral/Cargo.toml index c5d523cd..47eb219d 100644 --- a/pg-ephemeral/Cargo.toml +++ b/pg-ephemeral/Cargo.toml @@ -21,7 +21,6 @@ workspace = true clap.workspace = true cmd-proc.workspace = true comfy-table.workspace = true -dirs.workspace = true env_logger.workspace = true git-proc.workspace = true hex.workspace = true diff --git a/pg-ephemeral/src/cache_lock.rs b/pg-ephemeral/src/cache_lock.rs index 93338252..0d7108a3 100644 --- a/pg-ephemeral/src/cache_lock.rs +++ b/pg-ephemeral/src/cache_lock.rs @@ -137,16 +137,43 @@ fn lock_path(image_name: &ociman::reference::Name) -> Option Some(path) } +const XDG_RUNTIME_DIR: cmd_proc::EnvVariableName = + cmd_proc::EnvVariableName::from_static_or_panic("XDG_RUNTIME_DIR"); + +const XDG_STATE_HOME: cmd_proc::EnvVariableName = + cmd_proc::EnvVariableName::from_static_or_panic("XDG_STATE_HOME"); + +const XDG_CACHE_HOME: cmd_proc::EnvVariableName = + cmd_proc::EnvVariableName::from_static_or_panic("XDG_CACHE_HOME"); + /// Per-user base directory for lock files. Prefers the runtime dir /// (`$XDG_RUNTIME_DIR`, mode 0700), falling back to the state then cache dir — /// all owned by the current user under a non-shared parent, so no other user /// can squat the path. `None` when none resolve (e.g. no `$HOME`); callers /// then refuse to fall back to a world-shared location. fn lock_dir() -> Option { - let mut path = dirs::runtime_dir() - .or_else(dirs::state_dir) - .or_else(dirs::cache_dir)?; + let mut path = base_dir(&XDG_RUNTIME_DIR, None) + .or_else(|| base_dir(&XDG_STATE_HOME, Some(".local/state"))) + .or_else(|| base_dir(&XDG_CACHE_HOME, Some(".cache")))?; path.push("pg-ephemeral"); path.push("locks"); Some(path) } + +/// One XDG base directory: the variable's value when it is an absolute path — +/// the specification requires relative values be ignored — otherwise `$HOME` +/// joined with the specification's default, for the variables that define one. +fn base_dir( + name: &cmd_proc::EnvVariableName, + home_relative: Option<&str>, +) -> Option { + if let Ok(value) = name.read() { + let path = std::path::PathBuf::from(value.as_str()); + + if path.is_absolute() { + return Some(path); + } + } + + Some(std::env::home_dir()?.join(home_relative?)) +} diff --git a/wtt/CHANGELOG.md b/wtt/CHANGELOG.md index 9774086a..ab7e90fb 100644 --- a/wtt/CHANGELOG.md +++ b/wtt/CHANGELOG.md @@ -5,6 +5,9 @@ - Bump version to 0.1.0 - Remove pre-1.0 stability warning from README - Raised minimum supported Rust version to 1.99. +- Dropped the `dirs` dependency. The home directory behind the default + configuration and worktree paths now comes from `std::env::home_dir()`, + which resolves it identically. ## 0.0.7 diff --git a/wtt/Cargo.toml b/wtt/Cargo.toml index 8c4ff0a1..84c53738 100644 --- a/wtt/Cargo.toml +++ b/wtt/Cargo.toml @@ -17,7 +17,6 @@ workspace = true [dependencies] clap.workspace = true git-proc.workspace = true -dirs.workspace = true env_logger.workspace = true log.workspace = true nom.workspace = true diff --git a/wtt/src/config.rs b/wtt/src/config.rs index cb9f3aff..23e3ee7b 100644 --- a/wtt/src/config.rs +++ b/wtt/src/config.rs @@ -10,7 +10,7 @@ pub struct Config { impl Default for Config { fn default() -> Self { - let home = dirs::home_dir().expect("HOME directory not found"); + let home = std::env::home_dir().expect("HOME directory not found"); Self { bare_clone_dir: home.join(".local/share/wtt/bare"), worktree_dir: home.join("devel"), @@ -70,7 +70,7 @@ impl Config { #[must_use] pub fn default_config_path() -> PathBuf { - dirs::home_dir() + std::env::home_dir() .expect("HOME directory not found") .join(".config/wtt.toml") } From 29248d83888efe20a7ae64e45d420a6680bb3f4d Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 10 Oct 2026 19:31:38 +0000 Subject: [PATCH 5/5] Upgrade dependencies --- Cargo.lock | 439 +++++++++++++++++++------------------ Cargo.toml | 8 +- clippy.toml | 15 +- pg-ephemeral/Cargo.toml | 2 +- pg-ephemeral/src/config.rs | 51 ++++- 5 files changed, 289 insertions(+), 226 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d03a917e..d0864a93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,7 +79,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -90,14 +90,14 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.102" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "arc-swap" @@ -203,9 +203,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-config" -version = "1.8.18" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33f815b73a3899c03b380d543532e5865f230dce9678d108dc10732a8682275" +checksum = "b8d7b388a9fc3a6db15a5ec778c38b354eff1364882c94d08e0252f7a47dcaa4" dependencies = [ "aws-credential-types", "aws-runtime", @@ -220,7 +220,7 @@ dependencies = [ "aws-types", "bytes", "fastrand", - "http 1.4.1", + "http", "time", "tokio", "tracing", @@ -229,9 +229,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.14" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f20799b373a1be121fe3005fba0c2090af9411573878f224df44b42727fcaf7" +checksum = "e93964ffdaf57857f544be3666a5f57570bb699e934700f11b49708f61bb556e" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -265,9 +265,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.7.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ed8e8c52d2dc2390ad9f15647fe663f71e9780b4262c190fbb823a32721566" +checksum = "2b8a9911551b4ea6ca13805ef52ed96f7d2bbb43cc3b4a14cb0776a71f33cfaa" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -281,10 +281,8 @@ dependencies = [ "bytes", "bytes-utils", "fastrand", - "http 0.2.12", - "http 1.4.1", - "http-body 0.4.6", - "http-body 1.0.1", + "http", + "http-body", "percent-encoding", "pin-project-lite", "tracing", @@ -293,9 +291,9 @@ dependencies = [ [[package]] name = "aws-sdk-cloudformation" -version = "1.115.0" +version = "1.131.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c42fbeaa7475a88fa0b8547f21b8061f8ab37a9ec4c246d5b69182b41b14489" +checksum = "5b01276747e841f7d059be690b8b1a4128498ea042a617275d95daf48b621ce4" dependencies = [ "arc-swap", "aws-credential-types", @@ -307,21 +305,21 @@ dependencies = [ "aws-smithy-query", "aws-smithy-runtime", "aws-smithy-runtime-api", + "aws-smithy-schema", "aws-smithy-types", "aws-smithy-xml", "aws-types", "fastrand", - "http 0.2.12", - "http 1.4.1", + "http", "regex-lite", "tracing", ] [[package]] name = "aws-sdk-lambda" -version = "1.126.0" +version = "1.150.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2f451fc7971caff5a457c6b0b307b2aa7877cae75ae5a80782fc69fc22a535" +checksum = "eb6eb1ae2edf1f639ee4efe35c0a823fb9a00057676f8a796de1be5d03d19b6f" dependencies = [ "arc-swap", "aws-credential-types", @@ -333,21 +331,21 @@ dependencies = [ "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", + "aws-smithy-schema", "aws-smithy-types", "aws-types", "bytes", "fastrand", - "http 0.2.12", - "http 1.4.1", + "http", "regex-lite", "tracing", ] [[package]] name = "aws-sdk-s3" -version = "1.135.0" +version = "1.152.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97e3e7e7d86fd26fcdc18bc382da5ca9e8b2ff8d54030d187fd0dac8a236d96" +checksum = "004d5acbd6850ab58789a43822e0a2ef23927a46b012c17f8fa51253103db9f8" dependencies = [ "arc-swap", "aws-credential-types", @@ -361,6 +359,7 @@ dependencies = [ "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", + "aws-smithy-schema", "aws-smithy-types", "aws-smithy-xml", "aws-types", @@ -368,9 +367,8 @@ dependencies = [ "fastrand", "hex", "hmac", - "http 0.2.12", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "lru", "percent-encoding", "regex-lite", @@ -381,9 +379,9 @@ dependencies = [ [[package]] name = "aws-sdk-secretsmanager" -version = "1.107.0" +version = "1.120.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63da8ec2dca98a68d8bcba971abae5f06e2c9c0017f43097d1ff92cff96adc54" +checksum = "832dc9d5dbd19c0ac6b24e21ef9f3e553695d0f3928de7134567407b3b7a447d" dependencies = [ "arc-swap", "aws-credential-types", @@ -394,21 +392,21 @@ dependencies = [ "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", + "aws-smithy-schema", "aws-smithy-types", "aws-types", "bytes", "fastrand", - "http 0.2.12", - "http 1.4.1", + "http", "regex-lite", "tracing", ] [[package]] name = "aws-sdk-sts" -version = "1.106.0" +version = "1.119.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c80de7bb7d03e9ca8c9fd7b489f20f3948d3f3be91a7953591347d238115408" +checksum = "03e490aa904849b38e770922faac779dd245f5cf8be81f19065acf18d276e4ad" dependencies = [ "arc-swap", "aws-credential-types", @@ -420,21 +418,21 @@ dependencies = [ "aws-smithy-query", "aws-smithy-runtime", "aws-smithy-runtime-api", + "aws-smithy-schema", "aws-smithy-types", "aws-smithy-xml", "aws-types", "fastrand", - "http 0.2.12", - "http 1.4.1", + "http", "regex-lite", "tracing", ] [[package]] name = "aws-sigv4" -version = "1.4.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae38512beae0ffee7010fc24e7a8a123c53efdfef42a61e80fda4882418dc71" +checksum = "2312577f088c9fbf4206dfdb884cf1de9407b43e1a923cbed5237775116fc24b" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -445,8 +443,7 @@ dependencies = [ "form_urlencoded", "hex", "hmac", - "http 0.2.12", - "http 1.4.1", + "http", "percent-encoding", "sha2 0.11.0", "time", @@ -455,9 +452,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.14" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffcaf626bdda484571968400c326a244598634dc75fd451325a54ad1a59acfc" +checksum = "f02e407fb3b54891734224b9ffac8a71fdd35f542500fa1af95754a6b2beb316" dependencies = [ "futures-util", "pin-project-lite", @@ -466,17 +463,17 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.64.8" +version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8e65f4f81fcccdeb6c3eca2af17ac21d421a1786a26a394aecf421d616d3a" +checksum = "b67ecd999972b58e67cab052f5129906c08c25883bd0788ceefc55ef97d61307" dependencies = [ "aws-smithy-http", "aws-smithy-types", "bytes", "crc-fast", "hex", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "md-5", "pin-project-lite", @@ -487,9 +484,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.20" +version = "0.61.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf09d74e5e32f76b8762da505a3cd59303e367a664ca67295387baa8c1d7548" +checksum = "80c2051c2f1016fb8e6548dd07b8bc2ac9c3fe583721444b92f515e856d31609" dependencies = [ "aws-smithy-types", "bytes", @@ -498,9 +495,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.63.6" +version = "0.64.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ab2dc1c2c3749ead27180d333c42f11be8b0e934058fb4b2258ee8dbe5231" +checksum = "639b4d8f8555f24a9be649811c3eb0b4d4616f4d61daf0c32e28873bc1ea9af1" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -509,8 +506,8 @@ dependencies = [ "bytes-utils", "futures-core", "futures-util", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "percent-encoding", "pin-project-lite", @@ -520,9 +517,9 @@ dependencies = [ [[package]] name = "aws-smithy-json" -version = "0.62.7" +version = "0.63.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "701a947f4797e52a911e114a898667c746c39feea467bbd1abd7b3721f702ffa" +checksum = "3385d469edbe8b60cc72002784652b5efca39178192aa9cc4b44c9875c6bdc18" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-schema", @@ -531,28 +528,31 @@ dependencies = [ [[package]] name = "aws-smithy-observability" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06c2315d173edbf1920da8ba3a7189695827002e4c0fc961973ab1c54abca9c" +checksum = "8e86338c869539a581bf161247762a6e87f92c5c075060057b5ed6d06632ed0c" dependencies = [ "aws-smithy-runtime-api", ] [[package]] name = "aws-smithy-query" -version = "0.60.15" +version = "0.62.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a56d79744fb3edb5d722ef79d86081e121d3b9422cb209eb03aea6aa4f21ebd" +checksum = "f1d1d71f6562be974caa85442ecd90194c40fdb5df045f182a6c2e872ce95056" dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-schema", "aws-smithy-types", + "aws-smithy-xml", "urlencoding", ] [[package]] name = "aws-smithy-runtime" -version = "1.11.3" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e6f5caf6fea86f8c2206541ab5857cfcda9013426cdbe8fa0098b9e2d32182" +checksum = "d6e302ac1d88b99652489df31abdec6ac42a2ab2ac3982ad0ac49f64dfaf28ba" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -562,10 +562,8 @@ dependencies = [ "aws-smithy-types", "bytes", "fastrand", - "http 0.2.12", - "http 1.4.1", - "http-body 0.4.6", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project-lite", "pin-utils", @@ -575,16 +573,15 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.12.3" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db177daa6ba8afb9ee1aefcf548c907abcf52065e394ee11a92780057fe0e8c" +checksum = "c0730c16f91124c6a2abb4932c77e299288b3dd9f967ea2e9ec48cc6731e87a4" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api-macros", "aws-smithy-types", "bytes", - "http 0.2.12", - "http 1.4.1", + "http", "pin-project-lite", "tokio", "tracing", @@ -593,9 +590,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api-macros" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7396fd9500589e62e460e987ecb671bad374934e55ec3b5f498cc7a8a8a7b7" +checksum = "221eaa237ddf1ca79b60d1372aad77e47f9c0ea5b3ce5099da8c61d027dc77b3" dependencies = [ "proc-macro2", "quote", @@ -604,28 +601,26 @@ dependencies = [ [[package]] name = "aws-smithy-schema" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7442cb268338f0eb8278140a107c046756aa01093d8ef5e99628d34ae09c94f5" +checksum = "e8f395d93304280b64b7632fea798d177e74897fe7f063416ce627cd6fa24829" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", - "http 1.4.1", + "http", ] [[package]] name = "aws-smithy-types" -version = "1.4.9" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f93074121a1be41317b9aa607143ae17900631f7f59a99f2b905d519d6783b" +checksum = "69bb407740a197147da48238ecc94498493c9e85445732360cec180296ca45f1" dependencies = [ "base64-simd", "bytes", "bytes-utils", - "http 0.2.12", - "http 1.4.1", - "http-body 0.4.6", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "itoa", "num-integer", @@ -638,18 +633,21 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.15" +version = "0.62.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce02add1aa3677d022f8adf81dcbe3046a95f17a1b1e8979c145cd21d3d22b3" +checksum = "0b932c8d6dc127fc980eecd78f8694ae9b9551b69a93a7def2a199c1c0033daf" dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", "xmlparser", ] [[package]] name = "aws-types" -version = "1.3.16" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16bf10b03a3c01e6b3b7d47cd964e873ffe9e7d4e80fad16bd4c077cb068531" +checksum = "209f3a6d82a6e9e5f94abbed94c7a26e1c052341002bf57a5fb5481f625896fc" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -666,6 +664,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "base64-simd" version = "0.8.0" @@ -691,6 +695,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.12.1" @@ -955,15 +965,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "const-oid" version = "0.10.2" @@ -1090,7 +1091,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags", + "bitflags 2.12.1", "crossterm_winapi", "document-features", "parking_lot", @@ -1181,6 +1182,37 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" +[[package]] +name = "defmt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror", +] + [[package]] name = "der-parser" version = "10.0.0" @@ -1317,7 +1349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1332,11 +1364,10 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.1" +version = "5.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" dependencies = [ - "concurrent-queue", "parking", "pin-project-lite", ] @@ -1591,19 +1622,19 @@ dependencies = [ [[package]] name = "google-cloud-auth" -version = "1.12.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4595b69c95c727ac896a4f2f16d0cdaa6f547de0bc5d64dbe9201487fc3226d5" +checksum = "ac9870b8ea484519aa8601e14886f2efc148ea490034e43d04bef1d246170cc9" dependencies = [ "async-trait", "aws-lc-rs", - "base64", + "base64 0.23.1", "bytes", - "chrono", "google-cloud-gax", "hex", "hmac", - "http 1.4.1", + "http", + "jiff", "jsonwebtoken", "reqwest", "rustc_version", @@ -1620,35 +1651,36 @@ dependencies = [ [[package]] name = "google-cloud-gax" -version = "1.11.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f60f45dd97ff91cedfcb6b2b9f860d3d84739386c3557027687c52cc0e698fd" +checksum = "fc64ee071c0d22cb68662b454f1bea5424506cafeaddc51260fbc585bac1d29d" dependencies = [ "bytes", "futures", "google-cloud-rpc", "google-cloud-wkt", - "http 1.4.1", + "http", "pin-project", "rand 0.10.1", "serde", "serde_json", "thiserror", "tokio", + "tokio-stream", ] [[package]] name = "google-cloud-gax-internal" -version = "0.7.14" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78e0d5b25e5714321efc3ea48a1457bcd943ba85fe7a0e80e97d989f3c9aea17" +checksum = "e873f7e6e39030c07b6d9697bf3b999a269175c8b433e058f56ae10d129f12f7" dependencies = [ "bytes", "futures", "google-cloud-auth", "google-cloud-gax", "google-cloud-rpc", - "http 1.4.1", + "http", "http-body-util", "hyper", "lazy_static", @@ -1670,9 +1702,9 @@ dependencies = [ [[package]] name = "google-cloud-rpc" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b177796075b7bfc02bf2e405db665ee850a924fa44cedfc5282b473c5ab203" +checksum = "e2162c08a89118130979ba261080e960e44cdcb2d6e2ab8ca9b1da245285d353" dependencies = [ "bytes", "google-cloud-wkt", @@ -1683,9 +1715,9 @@ dependencies = [ [[package]] name = "google-cloud-sql-v1" -version = "2.7.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b207ecfc35b91e3d4636ccf2985abde34a255cab1c8d4b7df4f0c8b8b1703c" +checksum = "792b53aa8acc18571538ac04b923dcbc52b35430e3e7d62b3a3d34b49f5d9493" dependencies = [ "async-trait", "bytes", @@ -1702,9 +1734,9 @@ dependencies = [ [[package]] name = "google-cloud-type" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3658f2192252ba301a9d0a26e298bd56b55f0edb32de499a2f41ff244c09cf8" +checksum = "63acc3a92a85f96bab021c3a3e29b53bbacc97651e1b524d4c2991960a63eb82" dependencies = [ "bytes", "google-cloud-wkt", @@ -1715,11 +1747,11 @@ dependencies = [ [[package]] name = "google-cloud-wkt" -version = "1.5.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88e0186e2221bf82c5296500251b4650b111172c324984159a0de9f6bcaa18a5" +checksum = "7f3037907e542cf8b8580aa4cf8ad68568d7ac8e7274519a7d0a121867d434da" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "serde", "serde_json", @@ -1740,7 +1772,7 @@ dependencies = [ "env_logger", "futures-util", "git-proc", - "http 1.4.1", + "http", "itertools", "log", "nom 8.0.0", @@ -1767,7 +1799,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.4.1", + "http", "indexmap 2.14.0", "slab", "tokio", @@ -1806,6 +1838,9 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", +] [[package]] name = "hashlink" @@ -1852,17 +1887,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.4.1" @@ -1873,17 +1897,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -1891,7 +1904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.1", + "http", ] [[package]] @@ -1902,8 +1915,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -1913,22 +1926,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - -[[package]] -name = "humantime-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" -dependencies = [ - "humantime", - "serde", -] - [[package]] name = "hybrid-array" version = "0.4.12" @@ -1949,8 +1946,8 @@ dependencies = [ "futures-channel", "futures-core", "h2", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "httparse", "itoa", "pin-project-lite", @@ -1965,7 +1962,7 @@ version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http 1.4.1", + "http", "hyper", "hyper-util", "rustls", @@ -1993,12 +1990,12 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-util", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "hyper", "ipnet", "libc", @@ -2222,10 +2219,12 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.28" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" dependencies = [ + "defmt", + "jiff-core", "jiff-static", "log", "portable-atomic", @@ -2233,12 +2232,23 @@ dependencies = [ "serde_core", ] +[[package]] +name = "jiff-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +dependencies = [ + "defmt", + "log", +] + [[package]] name = "jiff-static" -version = "0.2.28" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" dependencies = [ + "jiff-core", "proc-macro2", "quote", "syn", @@ -2317,12 +2327,12 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "10.4.0" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc" +checksum = "e75fe14a82d81e5f5af639997db37d8b96045938a7ac6ab18cdbe1c7467e05e1" dependencies = [ "aws-lc-rs", - "base64", + "base64 0.22.1", "getrandom 0.2.17", "js-sys", "serde", @@ -2400,11 +2410,11 @@ checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" [[package]] name = "lru" -version = "0.16.4" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" +checksum = "ef9ac18847474e638e3702b76c65d4eb93428471a74778ef0f1be711717f89b5" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] @@ -2502,7 +2512,7 @@ dependencies = [ name = "mlambda" version = "0.0.1" dependencies = [ - "http 1.4.1", + "http", "reqwest", "serde", "serde_json", @@ -2547,7 +2557,7 @@ version = "0.9.0-msqlx.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d48c7544602bafc9c701529feb62e05078acf191f7442dc11039962a1759637" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "cfg-if", "crc", @@ -2622,7 +2632,7 @@ version = "0.9.0-msqlx.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71c7958cdb2504b7a7cd9c79160e69b0749bdcb109b0233112423d48c2a98342" dependencies = [ - "bitflags", + "bitflags 2.12.1", "byteorder", "bytes", "crc", @@ -2649,8 +2659,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55efbae9666754c385783160345cb573b16e130679cb0830184372e78cdaed98" dependencies = [ "atoi", - "base64", - "bitflags", + "base64 0.22.1", + "bitflags 2.12.1", "byteorder", "crc", "dotenvy", @@ -2815,9 +2825,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "opentelemetry" -version = "0.32.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682" +checksum = "8c1f1a6ac9c875a4941e4c7c085b61e8f4daa326de03b4701768c3491a6ad9ee" dependencies = [ "futures-core", "futures-sink", @@ -2829,15 +2839,15 @@ dependencies = [ [[package]] name = "opentelemetry-semantic-conventions" -version = "0.32.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca2f98a0437b427b4b08f19f1caa3c44db885a202bc12cfea13d6c702243d68" +checksum = "7a3cf639fefd3e852869114f9925b578da6dd8e99281a2089bb0e773ead46962" [[package]] name = "opentelemetry_sdk" -version = "0.32.1" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9" +checksum = "372a912db2974d1990207006fd0e3aa0ef3fd4ad3be43c65cfaadf2206866061" dependencies = [ "futures-channel", "futures-executor", @@ -2900,7 +2910,7 @@ version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ - "base64", + "base64 0.22.1", "serde_core", ] @@ -2953,10 +2963,10 @@ dependencies = [ "env_logger", "git-proc", "hex", - "http 1.4.1", - "humantime-serde", + "http", "indexmap 2.14.0", "indoc", + "jiff", "log", "msqlx", "nom 8.0.0", @@ -3274,7 +3284,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags", + "bitflags 2.12.1", ] [[package]] @@ -3338,11 +3348,11 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-core", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "hyper", "hyper-rustls", @@ -3414,11 +3424,11 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags", + "bitflags 2.12.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3476,7 +3486,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3563,7 +3573,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags", + "bitflags 2.12.1", "core-foundation", "core-foundation-sys", "libc", @@ -3668,7 +3678,7 @@ version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ - "base64", + "base64 0.22.1", "bs58", "chrono", "hex", @@ -3814,7 +3824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3847,12 +3857,12 @@ dependencies = [ "aws-sdk-lambda", "aws-sdk-s3", "aws-sdk-secretsmanager", - "base64", + "base64 0.22.1", "chrono", "clap", "cmd-proc", "hex", - "http 1.4.1", + "http", "log", "reqwest", "serde", @@ -4126,6 +4136,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] @@ -4199,10 +4210,10 @@ version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ - "base64", + "base64 0.22.1", "bytes", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "hyper", "hyper-timeout", @@ -4245,11 +4256,11 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags", + "bitflags 2.12.1", "bytes", "futures-util", - "http 1.4.1", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", "tower", "tower-layer", @@ -4304,9 +4315,9 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adbc64cba7137545b8044cb1fe9814f7aacf3c6b5f9b45be8bb5db538befdb26" +checksum = "0a904802a1b902f43638b677ff2a650847e3b4404101b6c586d648e8c1e3e8fe" dependencies = [ "js-sys", "opentelemetry", @@ -4344,7 +4355,7 @@ name = "typed-reqwest" version = "0.2.0" dependencies = [ "futures-util", - "http 1.4.1", + "http", "nom 8.0.0", "nom-language", "reqwest", @@ -4612,7 +4623,7 @@ version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags", + "bitflags 2.12.1", "hashbrown 0.15.5", "indexmap 2.14.0", "semver", @@ -4684,7 +4695,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4981,7 +4992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags", + "bitflags 2.12.1", "indexmap 2.14.0", "log", "serde", diff --git a/Cargo.toml b/Cargo.toml index 46d36751..1a5c4da7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,11 +26,10 @@ edition = "2024" rust-version = "1.99" [workspace.dependencies] -# Pinned to 1.129 as global `cargo update` resolves to 1.119 due to a -# crc/crc-fast version conflict. 1.119 pulls in lru 0.12.5, which has a -# security advisory (GHSA-2qph-qpvm-2qf7). 1.129 pulls in lru 0.16.3. +# Floor at 1.152: earlier releases resolve lru 0.16, which has a use-after-free +# advisory (RUSTSEC-2026-0253, patched in 0.18.2). 1.152 resolves lru 0.18.5. aws-lc-rs = "1" -aws-sdk-s3 = { version = "1.133", default-features = false } +aws-sdk-s3 = { version = "1.152", default-features = false } async-stream = "0.3" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4.6", features = ["derive"] } @@ -47,6 +46,7 @@ ipnet = { version = "2", features = ["serde"] } http = "1.4" indoc = "2" itertools = "0.14" +jiff = { version = "0.2", default-features = false, features = ["std"] } log = "0.4" typed-reqwest = { version = "0.2.0", path = "typed-reqwest" } mmigration = { path = "mmigration" } diff --git a/clippy.toml b/clippy.toml index 046a6a02..819411dd 100644 --- a/clippy.toml +++ b/clippy.toml @@ -4,11 +4,16 @@ # resolved without waiting for upstream crates to update their dependencies. allowed-duplicate-crates = [ - # AWS SDK still uses http 0.2 internally, while reqwest/hyper use http 1.x - # Source: aws-smithy-* crates depend on http 0.2, our direct deps use http 1.x - # Tracking: https://github.com/awslabs/aws-sdk-rust/issues/977 - "http", - "http-body", + # google-cloud-auth and google-cloud-wkt moved to base64 0.23, while + # reqwest, tonic, msqlx, serde_with, jsonwebtoken and stack-deploy's own + # dependency are all still on 0.22. + "base64", + + # jiff declares an optional defmt dependency, which we never enable and so + # never compile. It resolves bitflags 1.3 into the graph regardless, and + # multiple_crate_versions reads the graph rather than the activated + # features. Everything actually built uses bitflags 2.x. + "bitflags", # serde_with 3.x (transitive from google-cloud-sql-v1) depends on indexmap 1.9 # and schemars 0.9, while the rest of the workspace uses indexmap 2.x and schemars 1.x diff --git a/pg-ephemeral/Cargo.toml b/pg-ephemeral/Cargo.toml index 47eb219d..10b9318a 100644 --- a/pg-ephemeral/Cargo.toml +++ b/pg-ephemeral/Cargo.toml @@ -24,8 +24,8 @@ comfy-table.workspace = true env_logger.workspace = true git-proc.workspace = true hex.workspace = true -humantime-serde = "1" indexmap = { version = "2.13", features = ["serde"] } +jiff.workspace = true log.workspace = true nom.workspace = true nom-language.workspace = true diff --git a/pg-ephemeral/src/config.rs b/pg-ephemeral/src/config.rs index 231863cd..7b1280f4 100644 --- a/pg-ephemeral/src/config.rs +++ b/pg-ephemeral/src/config.rs @@ -324,6 +324,31 @@ pub struct SslConfigDefinition { pub hostname: pg_client::config::HostName, } +/// Deserializes a duration from its unit-suffixed form, such as `30s`, +/// `1m30s` or `500ms`, as well as ISO 8601 (`PT30S`). +mod duration { + pub(super) fn deserialize<'de, D>( + deserializer: D, + ) -> Result, D::Error> + where + D: serde::Deserializer<'de>, + { + let Some(text) = + as serde::Deserialize>::deserialize(deserializer)? + else { + return Ok(None); + }; + + let signed = text + .parse::() + .map_err(serde::de::Error::custom)?; + + std::time::Duration::try_from(signed) + .map(Some) + .map_err(serde::de::Error::custom) + } +} + #[derive(Debug, serde::Deserialize, PartialEq)] #[serde(deny_unknown_fields)] pub struct InstanceDefinition { @@ -334,7 +359,7 @@ pub struct InstanceDefinition { #[serde(default)] pub seeds: indexmap::IndexMap, pub ssl_config: Option, - #[serde(default, with = "humantime_serde")] + #[serde(default, with = "duration")] pub wait_available_timeout: Option, } @@ -432,7 +457,7 @@ pub struct Config { #[serde(default)] parameters: pg_client::parameter::Map, ssl_config: Option, - #[serde(default, with = "humantime_serde")] + #[serde(default, with = "duration")] wait_available_timeout: Option, instances: Option>, } @@ -921,3 +946,25 @@ mod test { ); } } + +#[cfg(test)] +mod duration_tests { + use super::*; + + #[test] + fn parses_unit_suffixed_durations() { + for (text, expected) in [ + ("30s", std::time::Duration::from_secs(30)), + ("1m30s", std::time::Duration::from_secs(90)), + ("2m", std::time::Duration::from_secs(120)), + ("500ms", std::time::Duration::from_millis(500)), + ("1h", std::time::Duration::from_secs(3600)), + ("PT30S", std::time::Duration::from_secs(30)), + ] { + let config = Config::load_toml(format!("wait_available_timeout = \"{text}\"\n")) + .unwrap_or_else(|error| panic!("{text}: {error}")); + + assert_eq!(Some(expected), config.wait_available_timeout, "{text}"); + } + } +}