From 0cb091c770337e53e0869fe4cd76bfdbd949237c Mon Sep 17 00:00:00 2001 From: Vikas Sharma Date: Tue, 19 Nov 2024 22:39:54 +0530 Subject: [PATCH] Fixed the deprecation warnings in spot check step of the build. Signed-off-by: Vikas Sharma --- crates/aws/src/constants.rs | 1 + crates/aws/src/storage.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/aws/src/constants.rs b/crates/aws/src/constants.rs index cfc5559518..ca73b69819 100644 --- a/crates/aws/src/constants.rs +++ b/crates/aws/src/constants.rs @@ -96,6 +96,7 @@ pub const AWS_FORCE_CREDENTIAL_LOAD: &str = "AWS_FORCE_CREDENTIAL_LOAD"; /// The list of option keys owned by the S3 module. /// Option keys not contained in this list will be added to the `extra_opts` /// field of [crate::storage::s3::S3StorageOptions]. +#[allow(deprecated)] pub const S3_OPTS: &[&str] = &[ AWS_ENDPOINT_URL, AWS_ENDPOINT_URL_DYNAMODB, diff --git a/crates/aws/src/storage.rs b/crates/aws/src/storage.rs index bfa44c3eac..604404e79b 100644 --- a/crates/aws/src/storage.rs +++ b/crates/aws/src/storage.rs @@ -527,10 +527,15 @@ mod tests { ); std::env::set_var(constants::AWS_IAM_ROLE_SESSION_NAME, "session_name"); std::env::set_var( + #[allow(deprecated)] constants::AWS_S3_ASSUME_ROLE_ARN, "arn:aws:iam::123456789012:role/some_role", ); - std::env::set_var(constants::AWS_S3_ROLE_SESSION_NAME, "session_name"); + std::env::set_var( + #[allow(deprecated)] + constants::AWS_S3_ROLE_SESSION_NAME, + "session_name", + ); std::env::set_var(constants::AWS_WEB_IDENTITY_TOKEN_FILE, "token_file"); let options = S3StorageOptions::try_default().unwrap();