Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infrasys: update to AWS SDK Rust #2414

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

jpculp
Copy link
Member

@jpculp jpculp commented Sep 12, 2022

Issue number:

#1968

Description of changes:

Replaces rusoto with aws-sdk-for-rust in infrasys.

Testing done:

Coming soon!

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@jpculp
Copy link
Member Author

jpculp commented Sep 12, 2022

Opening draft on @rpkelly's behalf. We'll want to merge around the same time that we transition pubsys.

tools/infrasys/src/main.rs Outdated Show resolved Hide resolved
tools/infrasys/src/root.rs Outdated Show resolved Hide resolved
tools/infrasys/src/root.rs Outdated Show resolved Hide resolved
tools/infrasys/src/s3.rs Outdated Show resolved Hide resolved
tools/Cargo.lock Outdated
@@ -46,9 +46,9 @@ dependencies = [

[[package]]
name = "anyhow"
version = "1.0.58"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the updated packages in a separate commit?

tools/infrasys/src/s3.rs Outdated Show resolved Hide resolved
tools/infrasys/src/s3.rs Show resolved Hide resolved
tools/infrasys/src/shared.rs Outdated Show resolved Hide resolved
tools/infrasys/src/shared.rs Outdated Show resolved Hide resolved
@rpkelly rpkelly force-pushed the aws-sdk-rust-infrasys branch 3 times, most recently from e1f3202 to 167da43 Compare October 5, 2022 17:02
@rpkelly rpkelly marked this pull request as ready for review October 5, 2022 17:04
Copy link
Member Author

@jpculp jpculp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, we should be able to remove L66-67 in tools/deny.toml.

tools/infrasys/Cargo.toml Outdated Show resolved Hide resolved
tools/infrasys/src/error.rs Outdated Show resolved Hide resolved
tools/infrasys/src/error.rs Outdated Show resolved Hide resolved
tools/infrasys/src/keys.rs Outdated Show resolved Hide resolved
@@ -32,23 +32,27 @@ pub async fn get_stack_outputs(
cfn_client: &CloudFormationClient,
stack_name: &str,
region: &str,
) -> Result<Vec<rusoto_cloudformation::Output>> {
) -> Result<Vec<aws_sdk_cloudformation::model::Output>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Same here re: imports

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we probably want is something like

use aws_sdk_cloudformation::output::DescribeStacksOutput;

and then have

Result<Vec<DescribeStacksOutput>>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imported outputs at the top. Outputs is actually the type we want to return here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see it changes from DescribeStacksOutput when you get to the .stacks.

Output seems very non-descriptive though and could conflict with something else down the road. Would it be better to do use aws_sdk_cloudformation::model::{Output as CfnOutput, Parameter}?

@rpkelly rpkelly force-pushed the aws-sdk-rust-infrasys branch 2 times, most recently from e7c6955 to a04c80d Compare October 5, 2022 23:55
tools/infrasys/src/error.rs Outdated Show resolved Hide resolved
tools/infrasys/src/keys.rs Outdated Show resolved Hide resolved
Co-authored-by: Patrick J.P. Culp <jpculp@amazon.com>
@rpkelly rpkelly force-pushed the aws-sdk-rust-infrasys branch from a04c80d to 19fb48c Compare October 6, 2022 21:43
@rpkelly rpkelly merged commit 5f7ac20 into bottlerocket-os:develop Oct 6, 2022
@jpculp jpculp deleted the aws-sdk-rust-infrasys branch March 8, 2023 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants