diff --git a/Cargo.lock b/Cargo.lock index ba03168c..0eb2769e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3266,7 +3266,7 @@ dependencies = [ [[package]] name = "graphql-orm-router" -version = "0.5.3" +version = "0.5.4" dependencies = [ "agql-auth", "arc-swap", diff --git a/crates/graphql-orm-router/CHANGELOG.md b/crates/graphql-orm-router/CHANGELOG.md index a44022b6..3ff59b6a 100644 --- a/crates/graphql-orm-router/CHANGELOG.md +++ b/crates/graphql-orm-router/CHANGELOG.md @@ -10,6 +10,13 @@ supersedes: [] # Changelog +## 0.5.4 - 2026-10-01 + +- Replace the deprecated atomic `fetch_update` in saturating metrics decrements + with an equivalent compare-exchange loop supported by Rust 1.90. Preserve + relaxed ordering and saturation while allowing warnings-denied builds on + current Rust. Public APIs, counters and router behavior remain unchanged. + ## 0.5.3 - 2026-09-27 - Updated the private Hive runtime from 0.0.87 to published 0.2.19, including diff --git a/crates/graphql-orm-router/Cargo.toml b/crates/graphql-orm-router/Cargo.toml index efcb59c8..ee9b3083 100644 --- a/crates/graphql-orm-router/Cargo.toml +++ b/crates/graphql-orm-router/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "graphql-orm-router" -version = "0.5.3" +version = "0.5.4" edition = "2024" rust-version = "1.90" description = "Federated GraphQL router for graphql-orm and project-neutral subgraphs" diff --git a/crates/graphql-orm-router/MIGRATION.md b/crates/graphql-orm-router/MIGRATION.md index 6d054537..1f8ce788 100644 --- a/crates/graphql-orm-router/MIGRATION.md +++ b/crates/graphql-orm-router/MIGRATION.md @@ -10,6 +10,12 @@ supersedes: [] # graphql-orm-router migration guide +## 0.5.3 to 0.5.4 + +No code, configuration or stored-data migration is needed. Rebuild to retain +warnings-denied compilation on current Rust without raising the Rust 1.90 MSRV. +Metrics preserve their atomic saturating decrement and relaxed ordering. + ## Workspace release dependency alignment For workspace releases selecting `agql-auth` v0.19.1, direct consumers must use diff --git a/crates/graphql-orm-router/README.md b/crates/graphql-orm-router/README.md index 0667191c..b4764d69 100644 --- a/crates/graphql-orm-router/README.md +++ b/crates/graphql-orm-router/README.md @@ -26,7 +26,7 @@ This unpublished package is Git-only: ```toml [dependencies] -graphql-orm-router = { git = "https://github.com/Dastari/graphql-orm.git", rev = "", version = "0.5.3" } +graphql-orm-router = { git = "https://github.com/Dastari/graphql-orm.git", rev = "", version = "0.5.4" } ``` Enable `auth-agql` only when adapting a separately configured diff --git a/crates/graphql-orm-router/src/metrics.rs b/crates/graphql-orm-router/src/metrics.rs index 3893d1d2..55f549e8 100644 --- a/crates/graphql-orm-router/src/metrics.rs +++ b/crates/graphql-orm-router/src/metrics.rs @@ -232,9 +232,20 @@ impl RouterMetrics { } fn decrement(counter: &AtomicUsize, count: usize) { - let _ = counter.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| { - Some(current.saturating_sub(count)) - }); + // Keep the atomic saturating update compatible with the Rust 1.90 MSRV; + // current Rust deprecates fetch_update in favor of the newer try_update. + let mut current = counter.load(Ordering::Relaxed); + loop { + match counter.compare_exchange_weak( + current, + current.saturating_sub(count), + Ordering::Relaxed, + Ordering::Relaxed, + ) { + Ok(_) => break, + Err(observed) => current = observed, + } + } } #[cfg(test)] diff --git a/crates/graphql-orm/tests/fixtures/federation-end-to-end/Cargo.lock b/crates/graphql-orm/tests/fixtures/federation-end-to-end/Cargo.lock index f116de50..40cebd67 100644 --- a/crates/graphql-orm/tests/fixtures/federation-end-to-end/Cargo.lock +++ b/crates/graphql-orm/tests/fixtures/federation-end-to-end/Cargo.lock @@ -2551,7 +2551,7 @@ dependencies = [ [[package]] name = "graphql-orm-router" -version = "0.5.3" +version = "0.5.4" dependencies = [ "arc-swap", "cynic-parser", diff --git a/docs/reference/workspace-packages.md b/docs/reference/workspace-packages.md index f58f23fd..8fffbffa 100644 --- a/docs/reference/workspace-packages.md +++ b/docs/reference/workspace-packages.md @@ -24,7 +24,7 @@ changes. | `graphql-orm-backup` | `0.7.2` | `crates/graphql-orm-backup` | `local` | `graphql-orm` (optional), `graphql-orm-storage` | | `graphql-orm-macros` | `0.35.2` | `crates/graphql-orm-macros` | `sqlite` | none | | `graphql-orm-operation-catalog` | `0.4.0` | `crates/graphql-orm-operation-catalog` | none | `graphql-orm-router-protocol` (optional) | -| `graphql-orm-router` | `0.5.3` | `crates/graphql-orm-router` | none | `graphql-orm-router-protocol` | +| `graphql-orm-router` | `0.5.4` | `crates/graphql-orm-router` | none | `graphql-orm-router-protocol` | | `graphql-orm-router-protocol` | `0.2.1` | `crates/graphql-orm-router-protocol` | none | none | | `graphql-orm-storage` | `0.6.2` | `crates/graphql-orm-storage` | `local` | none |