mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
build: upgrade Rust baseline to 1.96.0 (#3291)
* build: upgrade Rust baseline to 1.96.0 * ci: pin Rust workflows to 1.96.0 * remove * ci: pin setup action to Rust 1.96.0 * build: pin toolchain to Rust 1.96.0
This commit is contained in:
@@ -54,7 +54,7 @@ on:
|
||||
- ".github/workflows/audit.yml"
|
||||
- ".github/workflows/performance.yml"
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
types: [ checks_requested ]
|
||||
schedule:
|
||||
- cron: "0 0 * * 0" # Weekly on Sunday at midnight UTC
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
contents: read
|
||||
id-token: write
|
||||
env:
|
||||
NIX_CURL_FLAGS: -A cargo/1.95.0
|
||||
NIX_CURL_FLAGS: -A cargo/stable
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ resolver = "3"
|
||||
edition = "2024"
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/rustfs/rustfs"
|
||||
rust-version = "1.95.0"
|
||||
rust-version = "1.96.0"
|
||||
version = "1.0.0-beta.7"
|
||||
homepage = "https://rustfs.com"
|
||||
description = "RustFS is a high-performance distributed object storage software built using Rust, one of the most popular languages worldwide. "
|
||||
|
||||
@@ -20,5 +20,5 @@ Example:
|
||||
```powershell
|
||||
$env:RUSTFS_MINIO_FIXTURE_ROOT = '.\rustfs\tmp\minio-fixture-lab-local-key'
|
||||
$env:RUSTFS_MINIO_STATIC_KMS_KEY_B64 = '<base64-32-byte-local-minio-kms-key>'
|
||||
cargo +1.95.0 test -p rustfs-ecstore --features rio-v2 --test minio_generated_read_test -- --ignored
|
||||
cargo +1.96.0 test -p rustfs-ecstore --features rio-v2 --test minio_generated_read_test -- --ignored
|
||||
```
|
||||
|
||||
@@ -800,6 +800,7 @@ mod tests {
|
||||
should_warn_lock_failure,
|
||||
};
|
||||
use crate::{LockError, LockId, LockInfo, LockRequest, LockResponse, LockStats, LockType, ObjectKey, client::LockClient};
|
||||
use std::assert_matches;
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
sync::{Arc, Mutex},
|
||||
@@ -1105,7 +1106,7 @@ mod tests {
|
||||
let result = lock.acquire_guard(&request).await;
|
||||
let elapsed = started.elapsed();
|
||||
|
||||
assert!(matches!(result, Ok(None)), "unexpected result: {result:?}");
|
||||
assert_matches!(result, Ok(None));
|
||||
assert!(
|
||||
elapsed >= Duration::from_millis(250),
|
||||
"remote RPC timeouts should be retried within the caller timeout, got {elapsed:?}"
|
||||
@@ -1131,7 +1132,7 @@ mod tests {
|
||||
let started = tokio::time::Instant::now();
|
||||
let result = lock.acquire_guard(&request).await;
|
||||
|
||||
assert!(matches!(result, Ok(None)), "unexpected result: {result:?}");
|
||||
assert_matches!(result, Ok(None));
|
||||
assert!(
|
||||
started.elapsed() < Duration::from_secs(1),
|
||||
"acquire should fail this attempt before waiting for delayed impossible-quorum tasks"
|
||||
@@ -1210,7 +1211,7 @@ mod tests {
|
||||
|
||||
let result = lock.acquire_lock_quorum_with_retry(&request).await.unwrap();
|
||||
|
||||
assert!(matches!(result.failure_kind, Some(LockAcquireFailureKind::NonRetryable)));
|
||||
assert_matches!(result.failure_kind, Some(LockAcquireFailureKind::NonRetryable));
|
||||
assert!(
|
||||
result
|
||||
.response
|
||||
@@ -1254,7 +1255,7 @@ mod tests {
|
||||
let result = lock.acquire_guard(&request).await;
|
||||
let elapsed = started.elapsed();
|
||||
|
||||
assert!(matches!(result, Ok(None)), "unexpected result: {result:?}");
|
||||
assert_matches!(result, Ok(None));
|
||||
assert!(
|
||||
elapsed >= Duration::from_millis(250),
|
||||
"expected at least one retry attempt for transient timeout, got {elapsed:?}"
|
||||
@@ -1273,7 +1274,7 @@ mod tests {
|
||||
|
||||
let result = lock.acquire_guard(&request).await;
|
||||
|
||||
assert!(matches!(result, Ok(None)), "unexpected result: {result:?}");
|
||||
assert_matches!(result, Ok(None));
|
||||
let seen_timeouts = seen_timeouts.lock().unwrap();
|
||||
assert!(!seen_timeouts.is_empty(), "expected lock clients to observe acquire timeouts");
|
||||
assert!(
|
||||
@@ -1297,7 +1298,7 @@ mod tests {
|
||||
|
||||
let result = tokio::time::timeout(Duration::from_millis(800), lock.acquire_guard(&request)).await;
|
||||
|
||||
assert!(matches!(result, Ok(Ok(None))), "unexpected result: {result:?}");
|
||||
assert_matches!(result, Ok(Ok(None)));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -290,17 +290,18 @@ impl From<tonic::Status> for LockError {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::assert_matches;
|
||||
|
||||
#[test]
|
||||
fn test_error_creation() {
|
||||
let timeout_err = LockError::timeout("test-resource", Duration::from_secs(5));
|
||||
assert!(matches!(timeout_err, LockError::Timeout { .. }));
|
||||
assert_matches!(timeout_err, LockError::Timeout { .. });
|
||||
|
||||
let not_found_err = LockError::resource_not_found("missing-resource");
|
||||
assert!(matches!(not_found_err, LockError::ResourceNotFound { .. }));
|
||||
assert_matches!(not_found_err, LockError::ResourceNotFound { .. });
|
||||
|
||||
let permission_err = LockError::permission_denied("insufficient privileges");
|
||||
assert!(matches!(permission_err, LockError::PermissionDenied { .. }));
|
||||
assert_matches!(permission_err, LockError::PermissionDenied { .. });
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -30,7 +30,7 @@ Or point the tests at another generated root:
|
||||
|
||||
```powershell
|
||||
$env:RUSTFS_MINIO_FIXTURE_ROOT = '.\rustfs\tmp\minio-fixture-lab-smoke'
|
||||
cargo +1.95.0 test -p rustfs-rio-v2 --test minio_generated_fixtures -- --ignored
|
||||
cargo +1.96.0 test -p rustfs-rio-v2 --test minio_generated_fixtures -- --ignored
|
||||
```
|
||||
|
||||
## Scope
|
||||
|
||||
@@ -1725,6 +1725,7 @@ fn is_lower_ascii_alnum(value: u8) -> bool {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::assert_matches;
|
||||
|
||||
#[test]
|
||||
fn reserved_table_object_key_matches_exact_prefix_and_children_only() {
|
||||
@@ -2490,7 +2491,7 @@ mod tests {
|
||||
.await
|
||||
.unwrap_err();
|
||||
|
||||
assert!(matches!(err, TableCatalogStoreError::Conflict(_)));
|
||||
assert_matches!(err, TableCatalogStoreError::Conflict(_));
|
||||
assert!(backend.object_exists(bucket, &old).await.unwrap());
|
||||
}
|
||||
|
||||
@@ -2690,7 +2691,7 @@ mod tests {
|
||||
.await
|
||||
.unwrap_err();
|
||||
|
||||
assert!(matches!(err, TableCatalogStoreError::Internal(_)));
|
||||
assert_matches!(err, TableCatalogStoreError::Internal(_));
|
||||
let loaded = store.load_table(bucket, "sales", "orders").await.unwrap().unwrap();
|
||||
assert_eq!(loaded.metadata_location, current_metadata);
|
||||
assert_eq!(loaded.version_token, "token-v1");
|
||||
@@ -2789,7 +2790,7 @@ mod tests {
|
||||
.await
|
||||
.unwrap_err();
|
||||
|
||||
assert!(matches!(err, TableCatalogStoreError::Conflict(_)));
|
||||
assert_matches!(err, TableCatalogStoreError::Conflict(_));
|
||||
let loaded = store.load_table(bucket, "sales", "orders").await.unwrap().unwrap();
|
||||
assert_eq!(loaded.metadata_location, current_metadata);
|
||||
assert_eq!(loaded.version_token, "token-v1");
|
||||
|
||||
Reference in New Issue
Block a user