Loading tools/ci-cdk/README.md +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ From there, you can just point the `canary-runner` to the `cdk-outputs.json` to ```bash cd canary-runner cargo run -- --sdk-version <version> --musl --cdk-outputs ../cdk-outputs.json cargo run -- run --sdk-release-tag <version> --musl --cdk-outputs ../cdk-outputs.json ``` __NOTE:__ You may want to add a `--profile` to the `deploy` command to select a specific credential Loading tools/ci-cdk/canary-runner/src/build_bundle.rs +11 −8 Original line number Diff line number Diff line Loading @@ -3,6 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ use std::fmt::Write as FmtWrite; use std::fs; use std::io::Write as IoWrite; use std::path::{Path, PathBuf}; use std::process::Command; use std::str::FromStr; use anyhow::{bail, Context, Result}; use clap::Parser; use lazy_static::lazy_static; Loading @@ -11,12 +18,6 @@ use smithy_rs_tool_common::here; use smithy_rs_tool_common::release_tag::ReleaseTag; use smithy_rs_tool_common::shell::handle_failure; use smithy_rs_tool_common::versions_manifest::VersionsManifest; use std::fmt::Write as FmtWrite; use std::fs; use std::io::Write as IoWrite; use std::path::{Path, PathBuf}; use std::process::Command; use std::str::FromStr; const BASE_MANIFEST: &str = r#" # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. Loading Loading @@ -251,12 +252,14 @@ pub async fn build_bundle(opt: BuildBundleArgs) -> Result<Option<PathBuf>> { #[cfg(test)] mod tests { use super::*; use crate::Args; use clap::Parser; use smithy_rs_tool_common::package::PackageCategory; use smithy_rs_tool_common::versions_manifest::CrateVersion; use crate::Args; use super::*; #[test] fn test_arg_parsing() { assert!(Args::try_parse_from(["./canary-runner", "build-bundle"]).is_err()); Loading tools/ci-cdk/canary-runner/src/run.rs +13 −8 Original line number Diff line number Diff line Loading @@ -14,11 +14,12 @@ // CAUTION: This subcommand will `git reset --hard` in some cases. Don't ever run // it against a smithy-rs repo that you're actively working in. use crate::build_bundle::BuildBundleArgs; use std::path::PathBuf; use std::str::FromStr; use std::time::{Duration, SystemTime}; use std::{env, path::Path}; use anyhow::{bail, Context, Result}; use aws_sdk_cloudwatch as cloudwatch; use aws_sdk_lambda as lambda; use aws_sdk_s3 as s3; use clap::Parser; use cloudwatch::model::StandardUnit; use s3::types::ByteStream; Loading @@ -26,12 +27,13 @@ use serde::Deserialize; use smithy_rs_tool_common::git::{find_git_repository_root, Git, GitCLI}; use smithy_rs_tool_common::macros::here; use smithy_rs_tool_common::release_tag::ReleaseTag; use std::path::PathBuf; use std::str::FromStr; use std::time::{Duration, SystemTime}; use std::{env, path::Path}; use tracing::info; use crate::build_bundle::BuildBundleArgs; use aws_sdk_cloudwatch as cloudwatch; use aws_sdk_lambda as lambda; use aws_sdk_s3 as s3; lazy_static::lazy_static! { // Occasionally, a breaking change introduced in smithy-rs will cause the canary to fail // for older versions of the SDK since the canary is in the smithy-rs repository and will Loading @@ -45,6 +47,9 @@ lazy_static::lazy_static! { // Versions <= 0.6.0 no longer compile against the canary after this commit in smithy-rs // due to the breaking change in https://github.com/awslabs/smithy-rs/pull/1085 (ReleaseTag::from_str("v0.6.0").unwrap(), "d48c234796a16d518ca9e1dda5c7a1da4904318c"), // Versions <= release-2022-10-26 no longer compile against the canary after this commit in smithy-rs // due to the s3 canary update in https://github.com/awslabs/smithy-rs/pull/1974 (ReleaseTag::from_str("release-2022-10-26").unwrap(), "3e24477ae7a0a2b3853962a064bc8333a016af54") ]; pinned.sort(); pinned Loading Loading
tools/ci-cdk/README.md +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ From there, you can just point the `canary-runner` to the `cdk-outputs.json` to ```bash cd canary-runner cargo run -- --sdk-version <version> --musl --cdk-outputs ../cdk-outputs.json cargo run -- run --sdk-release-tag <version> --musl --cdk-outputs ../cdk-outputs.json ``` __NOTE:__ You may want to add a `--profile` to the `deploy` command to select a specific credential Loading
tools/ci-cdk/canary-runner/src/build_bundle.rs +11 −8 Original line number Diff line number Diff line Loading @@ -3,6 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ use std::fmt::Write as FmtWrite; use std::fs; use std::io::Write as IoWrite; use std::path::{Path, PathBuf}; use std::process::Command; use std::str::FromStr; use anyhow::{bail, Context, Result}; use clap::Parser; use lazy_static::lazy_static; Loading @@ -11,12 +18,6 @@ use smithy_rs_tool_common::here; use smithy_rs_tool_common::release_tag::ReleaseTag; use smithy_rs_tool_common::shell::handle_failure; use smithy_rs_tool_common::versions_manifest::VersionsManifest; use std::fmt::Write as FmtWrite; use std::fs; use std::io::Write as IoWrite; use std::path::{Path, PathBuf}; use std::process::Command; use std::str::FromStr; const BASE_MANIFEST: &str = r#" # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. Loading Loading @@ -251,12 +252,14 @@ pub async fn build_bundle(opt: BuildBundleArgs) -> Result<Option<PathBuf>> { #[cfg(test)] mod tests { use super::*; use crate::Args; use clap::Parser; use smithy_rs_tool_common::package::PackageCategory; use smithy_rs_tool_common::versions_manifest::CrateVersion; use crate::Args; use super::*; #[test] fn test_arg_parsing() { assert!(Args::try_parse_from(["./canary-runner", "build-bundle"]).is_err()); Loading
tools/ci-cdk/canary-runner/src/run.rs +13 −8 Original line number Diff line number Diff line Loading @@ -14,11 +14,12 @@ // CAUTION: This subcommand will `git reset --hard` in some cases. Don't ever run // it against a smithy-rs repo that you're actively working in. use crate::build_bundle::BuildBundleArgs; use std::path::PathBuf; use std::str::FromStr; use std::time::{Duration, SystemTime}; use std::{env, path::Path}; use anyhow::{bail, Context, Result}; use aws_sdk_cloudwatch as cloudwatch; use aws_sdk_lambda as lambda; use aws_sdk_s3 as s3; use clap::Parser; use cloudwatch::model::StandardUnit; use s3::types::ByteStream; Loading @@ -26,12 +27,13 @@ use serde::Deserialize; use smithy_rs_tool_common::git::{find_git_repository_root, Git, GitCLI}; use smithy_rs_tool_common::macros::here; use smithy_rs_tool_common::release_tag::ReleaseTag; use std::path::PathBuf; use std::str::FromStr; use std::time::{Duration, SystemTime}; use std::{env, path::Path}; use tracing::info; use crate::build_bundle::BuildBundleArgs; use aws_sdk_cloudwatch as cloudwatch; use aws_sdk_lambda as lambda; use aws_sdk_s3 as s3; lazy_static::lazy_static! { // Occasionally, a breaking change introduced in smithy-rs will cause the canary to fail // for older versions of the SDK since the canary is in the smithy-rs repository and will Loading @@ -45,6 +47,9 @@ lazy_static::lazy_static! { // Versions <= 0.6.0 no longer compile against the canary after this commit in smithy-rs // due to the breaking change in https://github.com/awslabs/smithy-rs/pull/1085 (ReleaseTag::from_str("v0.6.0").unwrap(), "d48c234796a16d518ca9e1dda5c7a1da4904318c"), // Versions <= release-2022-10-26 no longer compile against the canary after this commit in smithy-rs // due to the s3 canary update in https://github.com/awslabs/smithy-rs/pull/1974 (ReleaseTag::from_str("release-2022-10-26").unwrap(), "3e24477ae7a0a2b3853962a064bc8333a016af54") ]; pinned.sort(); pinned Loading