Skip to content

Commit

Permalink
Update a module for the last release date in canary (#3013)
Browse files Browse the repository at this point in the history
## Motivation and Context
Fixes [canary
failures](https://github.com/awslabs/aws-sdk-rust/actions/runs/6345490441/job/17237658244)
by updating the-last-release-before-breaking-change module in
`canary-lambda`.

## Description
[A previous PR](#2978) removing
the `Steram` trait from public API had a breaking change, requiring
canary to update its code. The latest release at the time while the PR
was worked on was `release-2023-08-23` so we created a new module with
that date and moved the previously working canary's code prior to the
breaking change to it. The `latest` module then contained canary's code
after the breaking change.

However, before that PR was merged to main, we made several releases in
`aws-sdk-rust`, making `release-2023-08-23` no longer the latest release
before the breaking change; a new one is `release_2023_09_25`. Hence
this PR.

## Testing
Manually executed
```
➜ canary-runner git:(ysaito/fix-canary-module-dates) cargo run -- build-bundle --canary-path ../canary-lambda --sdk-release-tag release-2023-09-25 --musl --manifest-only
➜ canary-runner git:(ysaito/fix-canary-module-dates) cd ../canary-lambda
➜ canary-lambda git:(ysaito/fix-canary-module-dates) cargo check
```
(also tested for `--sdk-release-tag` with `release-2023-09-22` and
`release-2023-09-20`)

----

_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
ysaito1001 authored Sep 29, 2023
1 parent d800d33 commit 398ad9e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions tools/ci-cdk/canary-lambda/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ mod latest;
#[cfg(feature = "latest")]
pub(crate) use latest as current_canary;

// NOTE: This module can be deleted 3 releases after release-2023-08-23
#[cfg(feature = "release-2023-08-23")]
mod release_2023_08_23;
#[cfg(feature = "release-2023-08-23")]
pub(crate) use release_2023_08_23 as current_canary;
// NOTE: This module can be deleted 3 releases after release-2023-09-25
#[cfg(feature = "release-2023-09-25")]
mod release_2023_09_25;
#[cfg(feature = "release-2023-09-25")]
pub(crate) use release_2023_09_25 as current_canary;

#[tokio::main]
async fn main() -> Result<(), Error> {
Expand Down
14 changes: 7 additions & 7 deletions tools/ci-cdk/canary-runner/src/build_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const REQUIRED_SDK_CRATES: &[&str] = &[
// The elements in this `Vec` should be sorted in an ascending order by the release date.
lazy_static! {
static ref NOTABLE_SDK_RELEASE_TAGS: Vec<ReleaseTag> = vec![
ReleaseTag::from_str("release-2023-08-23").unwrap(), // last version before `Stream` trait removal
ReleaseTag::from_str("release-2023-09-25").unwrap(), // last version before `Stream` trait removal
];
}

Expand Down Expand Up @@ -442,7 +442,7 @@ aws-sdk-transcribestreaming = { path = "some/sdk/path/transcribestreaming" }
[features]
latest = []
"release-2023-08-23" = []
"release-2023-09-25" = []
default = ["latest"]
"#,
generate_crate_manifest(CrateSource::Path("some/sdk/path".into())).expect("success")
Expand Down Expand Up @@ -506,7 +506,7 @@ aws-sdk-transcribestreaming = "0.16.0"
[features]
latest = []
"release-2023-08-23" = []
"release-2023-09-25" = []
default = ["latest"]
"#,
generate_crate_manifest(CrateSource::VersionsManifest {
Expand All @@ -524,7 +524,7 @@ default = ["latest"]
.collect(),
release: None,
},
release_tag: ReleaseTag::from_str("release-2023-08-26").unwrap(),
release_tag: ReleaseTag::from_str("release-9999-12-31").unwrap(),
})
.expect("success")
);
Expand Down Expand Up @@ -585,14 +585,14 @@ default = ["latest"]
}),
);
assert_eq!(
"release-2023-08-23".to_string(),
"release-2023-09-25".to_string(),
enabled_feature(&CrateSource::VersionsManifest {
versions: versions.clone(),
release_tag: "release-2023-08-23".parse().unwrap(),
release_tag: "release-2023-09-25".parse().unwrap(),
}),
);
assert_eq!(
"release-2023-08-23".to_string(),
"release-2023-09-25".to_string(),
enabled_feature(&CrateSource::VersionsManifest {
versions,
release_tag: "release-2023-01-13".parse().unwrap(),
Expand Down

0 comments on commit 398ad9e

Please sign in to comment.