Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changelog/1761582203.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
applies_to:
- aws-sdk-rust
- client
- server
authors:
- ysaito1001
references:
- smithy-rs#4367
breaking: true
new_feature: false
bug_fix: false
---
Upgrade MSRV to Rust 1.88.0.
2 changes: 1 addition & 1 deletion .github/workflows/claim-crate-names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.86.0
rust_version: 1.88.0

name: Claim unpublished crate names on crates.io
run-name: ${{ github.workflow }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.86.0
rust_version: 1.88.0

name: Release smithy-rs
on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-sdk-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.86.0
toolchain: 1.88.0
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private class AwsFluentClientRetryPartition(private val codegenContext: ClientCo
rustTemplate(
"""
let default_retry_partition = match config.region() {
Some(region) => #{Cow}::from(format!("{default_retry_partition}-{}", region)),
Some(region) => #{Cow}::from(format!("{default_retry_partition}-{region}")),
None => #{Cow}::from(default_retry_partition),
};
""",
Expand Down
14 changes: 7 additions & 7 deletions aws/rust-runtime/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aws/rust-runtime/aws-config/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-config"
version = "1.8.9"
version = "1.8.10"
authors = [
"AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
"Russell Cohen <rcoh@amazon.com>",
Expand Down
11 changes: 4 additions & 7 deletions aws/rust-runtime/aws-config/src/credential_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ impl CredentialProcessProvider {
.await
.map_err(|e| {
CredentialsError::provider_error(format!(
"Error retrieving credentials from external process: {}",
e
"Error retrieving credentials from external process: {e}",
))
})?;

Expand All @@ -118,8 +117,7 @@ impl CredentialProcessProvider {

let output = std::str::from_utf8(&output.stdout).map_err(|e| {
CredentialsError::provider_error(format!(
"Error retrieving credentials from external process: could not decode output as UTF-8: {}",
e
"Error retrieving credentials from external process: could not decode output as UTF-8: {e}",
))
})?;

Expand All @@ -132,8 +130,7 @@ impl CredentialProcessProvider {
})
.map_err(|invalid| {
CredentialsError::provider_error(format!(
"Error retrieving credentials from external process, could not parse response: {}",
invalid
"Error retrieving credentials from external process, could not parse response: {invalid}",
))
})
}
Expand Down Expand Up @@ -235,7 +232,7 @@ pub(crate) fn parse_credential_process_json_credentials(
Some(version) => {
return Err(InvalidJsonCredentials::InvalidField {
field: "version",
err: format!("unknown version number: {}", version).into(),
err: format!("unknown version number: {version}").into(),
})
}
}
Expand Down
15 changes: 6 additions & 9 deletions aws/rust-runtime/aws-config/src/ecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl EcsCredentialsProvider {
Err(CredentialsError::not_loaded("ECS provider not configured"))
}
Provider::InvalidConfiguration(err) => {
Err(CredentialsError::invalid_configuration(format!("{}", err)))
Err(CredentialsError::invalid_configuration(format!("{err}")))
}
Provider::Configured(provider) => provider.credentials(auth).await,
}
Expand Down Expand Up @@ -253,22 +253,19 @@ enum EcsConfigurationError {
impl Display for EcsConfigurationError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
EcsConfigurationError::InvalidRelativeUri { err, uri } => write!(
f,
"invalid relative URI for ECS provider ({}): {}",
err, uri
),
EcsConfigurationError::InvalidRelativeUri { err, uri } => {
write!(f, "invalid relative URI for ECS provider ({err}): {uri}",)
}
EcsConfigurationError::InvalidFullUri { err, uri } => {
write!(f, "invalid full URI for ECS provider ({}): {}", err, uri)
write!(f, "invalid full URI for ECS provider ({err}): {uri}")
}
EcsConfigurationError::NotConfigured => write!(
f,
"No environment variables were set to configure ECS provider"
),
EcsConfigurationError::InvalidAuthToken { err, value } => write!(
f,
"`{}` could not be used as a header value for the auth token. {}",
value, err
"`{value}` could not be used as a header value for the auth token. {err}",
),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ fn parse_response(
}
JsonCredentials::Error { code, message } => Err(OrchestratorError::operation(
CredentialsError::provider_error(format!(
"failed to load credentials [{}]: {}",
code, message
"failed to load credentials [{code}]: {message}",
)),
)),
}
Expand Down
15 changes: 5 additions & 10 deletions aws/rust-runtime/aws-config/src/imds/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ impl ImdsCredentialsProvider {
let credentials = self
.client
.get(format!(
"/latest/meta-data/iam/security-credentials/{}",
profile
"/latest/meta-data/iam/security-credentials/{profile}",
))
.await
.map_err(CredentialsError::provider_error)?;
Expand Down Expand Up @@ -256,17 +255,13 @@ impl ImdsCredentialsProvider {
if code == codes::ASSUME_ROLE_UNAUTHORIZED_ACCESS =>
{
Err(CredentialsError::invalid_configuration(format!(
"Incorrect IMDS/IAM configuration: [{}] {}. \
"Incorrect IMDS/IAM configuration: [{code}] {message}. \
Hint: Does this role have a trust relationship with EC2?",
code, message
)))
}
Ok(JsonCredentials::Error { code, message }) => {
Err(CredentialsError::provider_error(format!(
"Error retrieving credentials from IMDS: {} {}",
code, message
)))
}
Ok(JsonCredentials::Error { code, message }) => Err(CredentialsError::provider_error(
format!("Error retrieving credentials from IMDS: {code} {message}"),
)),
// got bad data from IMDS, should not occur during normal operation:
Err(invalid) => Err(CredentialsError::unhandled(invalid)),
}
Expand Down
16 changes: 7 additions & 9 deletions aws/rust-runtime/aws-config/src/json_credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ impl Display for InvalidJsonCredentials {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
InvalidJsonCredentials::JsonError(json) => {
write!(f, "invalid JSON in response: {}", json)
write!(f, "invalid JSON in response: {json}")
}
InvalidJsonCredentials::MissingField(field) => write!(
f,
"Expected field `{}` in response but it was missing",
field
),
InvalidJsonCredentials::Other(msg) => write!(f, "{}", msg),
InvalidJsonCredentials::MissingField(field) => {
write!(f, "Expected field `{field}` in response but it was missing",)
}
InvalidJsonCredentials::Other(msg) => write!(f, "{msg}"),
InvalidJsonCredentials::InvalidField { field, err } => {
write!(f, "Invalid field in response: `{}`. {}", field, err)
write!(f, "Invalid field in response: `{field}`. {err}")
}
}
}
Expand Down Expand Up @@ -237,7 +235,7 @@ pub(crate) fn json_parse_loop<'a>(
}
other => {
return Err(InvalidJsonCredentials::Other(
format!("expected object key, found: {:?}", other).into(),
format!("expected object key, found: {other:?}").into(),
));
}
}
Expand Down
21 changes: 9 additions & 12 deletions aws/rust-runtime/aws-config/src/profile/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl ProfileFileError {
fn missing_field(profile: &Profile, field: &'static str) -> Self {
ProfileFileError::MissingProfile {
profile: profile.name().to_string(),
message: format!("`{}` was missing", field).into(),
message: format!("`{field}` was missing").into(),
}
}
}
Expand All @@ -319,33 +319,30 @@ impl Display for ProfileFileError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
ProfileFileError::InvalidProfile(err) => {
write!(f, "invalid profile: {}", err)
write!(f, "invalid profile: {err}")
}
ProfileFileError::CredentialLoop { profiles, next } => write!(
f,
"profile formed an infinite loop. first we loaded {:?}, \
then attempted to reload {}",
profiles, next
"profile formed an infinite loop. first we loaded {profiles:?}, \
then attempted to reload {next}",
),
ProfileFileError::MissingCredentialSource { profile, message } => {
write!(f, "missing credential source in `{}`: {}", profile, message)
write!(f, "missing credential source in `{profile}`: {message}")
}
ProfileFileError::InvalidCredentialSource { profile, message } => {
write!(f, "invalid credential source in `{}`: {}", profile, message)
write!(f, "invalid credential source in `{profile}`: {message}")
}
ProfileFileError::MissingProfile { profile, message } => {
write!(f, "profile `{}` was not defined: {}", profile, message)
write!(f, "profile `{profile}` was not defined: {message}")
}
ProfileFileError::UnknownProvider { name } => write!(
f,
"profile referenced `{}` provider but that provider is not supported",
name
"profile referenced `{name}` provider but that provider is not supported",
),
ProfileFileError::NoProfilesDefined => write!(f, "No profiles were defined"),
ProfileFileError::ProfileDidNotContainCredentials { profile } => write!(
f,
"profile `{}` did not contain credential information",
profile
"profile `{profile}` did not contain credential information"
),
ProfileFileError::FeatureNotEnabled { feature, message } => {
let message = message.as_deref().unwrap_or_default();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub(crate) fn resolve_chain(
} else {
ProfileFileError::InvalidCredentialSource {
profile: profile.name().into(),
message: format!("could not load source profile: {}", err).into(),
message: format!("could not load source profile: {err}").into(),
}
}
})?;
Expand Down
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-config/src/sensitive_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ where
let command = self.0.as_ref();
match command.find(char::is_whitespace) {
Some(index) => write!(f, "{} ** arguments redacted **", &command[0..index]),
None => write!(f, "{}", command),
None => write!(f, "{command}"),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-config/src/sso/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ fn json_parse_loop<'a>(
}
other => {
return Err(Error::Other(
format!("expected object key, found: {:?}", other).into(),
format!("expected object key, found: {other:?}").into(),
));
}
}
Expand Down
3 changes: 1 addition & 2 deletions aws/rust-runtime/aws-config/src/sso/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ async fn load_sso_credentials(
.try_into()
.map_err(|err| {
CredentialsError::unhandled(format!(
"expiration could not be converted into a system time: {}",
err
"expiration could not be converted into a system time: {err}",
))
})?;
let mut builder = Credentials::builder()
Expand Down
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-config/src/web_identity_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl WebIdentityTokenCredentialsProvider {
match &self.source {
Source::Env(env) => {
let token_file = env.get(ENV_VAR_TOKEN_FILE).map_err(|_| {
CredentialsError::not_loaded(format!("${} was not set", ENV_VAR_TOKEN_FILE))
CredentialsError::not_loaded(format!("${ENV_VAR_TOKEN_FILE} was not set"))
})?;
let role_arn = env.get(ENV_VAR_ROLE_ARN).map_err(|_| {
CredentialsError::invalid_configuration(
Expand Down
Loading
Loading