Skip to content

Commit

Permalink
Upgrade MSRV to 1.75 (#3553)
Browse files Browse the repository at this point in the history
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Apr 11, 2024
1 parent 979c0ca commit b1cbce6
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
required: false

env:
rust_version: 1.74.1
rust_version: 1.75.0
rust_toolchain_components: clippy,rustfmt
ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }}
DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }}
Expand Down
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.74.1
rust_version: 1.75.0

name: Claim unpublished crate names on crates.io
run-name: ${{ github.workflow }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
name: Update GitHub Pages

env:
rust_version: 1.74.1
rust_version: 1.75.0

# Allow only one doc pages build to run at a time for the entire smithy-rs repo
concurrency:
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.74.1
rust_version: 1.75.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 @@ -45,7 +45,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.74.1
toolchain: 1.75.0
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,16 @@
# message = "Fix typos in module documentation for generated crates"
# references = ["smithy-rs#920"]
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
# author = "rcoh"
# author = "rcoh"

[[aws-sdk-rust]]
message = "Upgraded MSRV to Rust 1.75"
references = ["smithy-rs#3553"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "Upgraded MSRV to Rust 1.75"
references = ["smithy-rs#3553"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "all"}
author = "jdisanti"
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.2.0"
version = "1.2.1"
authors = [
"AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
"Russell Cohen <rcoh@amazon.com>",
Expand Down
19 changes: 6 additions & 13 deletions aws/rust-runtime/aws-config/src/credential_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,12 @@ pub(crate) fn parse_credential_process_json_credentials(
}

fn parse_expiration(expiration: impl AsRef<str>) -> Result<SystemTime, InvalidJsonCredentials> {
SystemTime::try_from(
OffsetDateTime::parse(expiration.as_ref(), &Rfc3339).map_err(|err| {
InvalidJsonCredentials::InvalidField {
field: "Expiration",
err: err.into(),
}
})?,
)
.map_err(|_| {
InvalidJsonCredentials::Other(
"credential expiration time cannot be represented by a DateTime".into(),
)
})
OffsetDateTime::parse(expiration.as_ref(), &Rfc3339)
.map(SystemTime::from)
.map_err(|err| InvalidJsonCredentials::InvalidField {
field: "Expiration",
err: err.into(),
})
}

#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TimestreamDecorator : ClientCodegenDecorator {
async fn resolve_endpoint(client: &crate::Client) -> Result<(#{Endpoint}, #{SystemTime}), #{BoxError}> {
let describe_endpoints =
client.describe_endpoints().send().await?;
let endpoint = describe_endpoints.endpoints().get(0).unwrap();
let endpoint = describe_endpoints.endpoints().first().unwrap();
let expiry = client.config().time_source().expect("checked when ep discovery was enabled").now()
+ #{Duration}::from_secs(endpoint.cache_period_in_minutes() as u64 * 60);
Ok((
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ object TestWorkspace {
// help rust select the right version when we run cargo test
// TODO(https://github.com/smithy-lang/smithy-rs/issues/2048): load this from the msrv property using a
// method as we do for runtime crate versions
"[toolchain]\nchannel = \"1.74.1\"\n",
"[toolchain]\nchannel = \"1.75.0\"\n",
)
// ensure there at least an empty lib.rs file to avoid broken crates
newProject.resolve("src").mkdirs()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Rust MSRV (entered into the generated README)
rust.msrv=1.74.1
rust.msrv=1.75.0

# To enable debug, swap out the two lines below.
# When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon.
Expand Down
2 changes: 1 addition & 1 deletion rust-runtime/aws-smithy-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-smithy-runtime"
version = "1.3.0"
version = "1.3.1"
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
description = "The new smithy runtime crate"
edition = "2021"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

#![cfg(all(feature = "client", feature = "test-util"))]
// Extra imports are used by stalled_stream_download and stalled_stream_upload as conveniences
#![allow(unused_imports)]

pub use aws_smithy_async::{
test_util::tick_advance_sleep::{
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.74.1"
channel = "1.75.0"
2 changes: 1 addition & 1 deletion tools/ci-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This is the base Docker build image used by CI

ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2023
ARG rust_stable_version=1.74.1
ARG rust_stable_version=1.75.0
ARG rust_nightly_version=nightly-2024-02-07

FROM ${base_image} AS bare_base_image
Expand Down

0 comments on commit b1cbce6

Please sign in to comment.