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

Merge smithy-rs-release-1.x.y back into main #3280

Merged
merged 7 commits into from
Dec 4, 2023

Conversation

aws-sdk-rust-ci
Copy link
Collaborator

@aws-sdk-rust-ci aws-sdk-rust-ci commented Dec 1, 2023

Motivation and Context


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rcoh and others added 6 commits November 29, 2023 15:01
## Motivation and Context
When the stable/unstable crate versions were split, this caused a
regression in determining the crate version during codegen. This
enhances our crate-version forwarding code to publish all the crate
versions. For impact, see codegen-client-test.

## Description
- Change the build artifact to be a JSON blob will all required
versions.

## Testing
- [ ] Audit diff

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Motivation and Context
Fixes #3265

## Description
To check semver, `semver checks` needs to compile two versions of a
crate, i.e. baseline and current. Our CI failed to compile `aws-config`
for a baseline version.

The following diagram shows what was missing to cause compilation
failure:
```
┌───────────┐
│ smithy-rs │
└─────┬─────┘
      │
      │
      │     ┌────────┐
      └─────┤ target │
            └───┬────┘
                │        ┌───────────────┐
                └────────┤ semver_checks │
                         └───────┬───────┘
                                 │
                                 │
                                 │       ┌──────────┐
                                 └───────┤ git-base │
                                         └────┬─────┘
                                              │
                                              │        ┌──────────────┐
                                              ├────────┤ <rev number> │
                                              │        └──────┬───────┘
                                              │               │
                                              │               │
                                              │               │       ┌───────┐
                                              │               ├───────┤  aws  │
                                              │               │       └───┬───┘
                                              │               │           │
                                              │               │           │       ┌──────────────┐
                                              │               │           ├───────┤ rust-runtime │
                                              │               │           │       └──────┬───────┘
                                              │               │           │              │
                                              │               │           │              │       ┌────────────┐
                                              │               │           │              └───────┤ aws-config │ ◄***************
                                              │               │           │                      └────────────┘                *
                                              │               │           │                            *                       *
                                              │               │           │                            *                       *
                                              │               │           │          *****depends*on****                       *
                                              │               │           │          ▼                                         *
                                              │               │           │                                                    *
                                              │               │           │       ┌─────┐                                      *
                                              │               │           └───────┤ sdk │ (with no "build" directory)          *
                                              │               │                   └─────┘                                      *
                                              │               │                                                                *
                                              │               │                                                                *
                                              │               │      ┌────────────────────┐                                depends on
                                              │               └──────┤  tmp-codegen-diff  │                                    *
                                              │                      └─────────┬──────────┘                                    *
                                              │                                │                                               *
                                              │                                │       ┌─────────┐                             *
                                              │                                └───────┤ aws-sdk │                             *
                                              │                                        └────┬────┘                             *
                                              │                                             │     ┌─────┐                      *
                                              │                                             └─────┤ sdk │                      *
                                              │                                                   └─────┘                      *
                                              │                                                                                *
                                              │                                                                                *
                                              │           ┌───────────────────────────────────────┐                            *
                                              └───────────┤ local-aws_config-0_0_0_smithy_rs_head │*****************************
                                                          └───────────────────────────────────────┘
```
`local-aws_config-0_0_0_smithy_rs_head` under the `git-base` directory
is a special crate created by `semver-checks` for a baseline version of
`aws-config` and its `Cargo.toml` depends on
`target/semver_checks/git-base/<rev
number>/aws/rust-runtime/aws-config`. However, that `aws-config` in turn
depends upon crates in `target/semver_checks/git-base/<rev
number>/aws/sdk/build/` (as shown
[here](https://github.com/smithy-lang/smithy-rs/blob/main/aws/rust-runtime/aws-config/Cargo.toml#L23-L33)),
which does not exist in a baseline branch.

When `semver-checks.py` [creates a baseline
branch](https://github.com/smithy-lang/smithy-rs/blob/3d0cb5c3b179d5ed1d14531882657b481c4469f0/tools/ci-scripts/codegen-diff/semver-checks.py#L31)
to prepare for running `cargo semver-checks`, it [moves aws/sdk/build to
tmp-codegen-diff](https://github.com/smithy-lang/smithy-rs/blob/3d0cb5c3b179d5ed1d14531882657b481c4469f0/tools/ci-scripts/codegen-diff/diff_lib.py#L59),
leaving nothing behind in `aws/sdk/build/`. The fix, therefore, is to
`cp -r aws/sdk/build/aws-sdk` instead of `mv aws/sdk/build/aws-sdk` when
preparing a baseline branch.

The issue is specific to `aws-config`, probably because that's the only
runtime crate that depends on those in `aws/sdk/build`.

## Testing
Verified a clean run for `cargo semver-checks` in [an investigation
branch](https://github.com/smithy-lang/smithy-rs/actions/runs/7035082815/job/19144676499#step:4:1101).

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
…evisouly set (#3278)

## Motivation and Context
Fixes awslabs/aws-sdk-rust#973

## Description
Prior to the PR, if a customer explicitly passed a credentials provider
to a client's config `Builder::set_credentials_provider`, what's passed
did not override a credentials provider previously set ([actual use
case](awslabs/aws-sdk-rust#973 (comment))).

While in general, we recommend customers single-source a credentials
provider through
[aws_config::ConfigLoader::credentials_provider](https://docs.rs/aws-config/1.0.1/aws_config/struct.ConfigLoader.html#method.credentials_provider),
we should eliminate the said footgun in case they directly pass a
credentials provider to a client's config `Builder`.

The PR reverts test signature updates in
#3156 (in hindsight, having
to update test signatures in that PR was a sign of regression).

## Testing
Added a Kotlin test to `CredentialProviderConfigTest.kt` to verify the
fix

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: John DiSanti <jdisanti@amazon.com>
Copy link

github-actions bot commented Dec 1, 2023

Copy link

github-actions bot commented Dec 4, 2023

@ysaito1001 ysaito1001 marked this pull request as ready for review December 4, 2023 23:22
@ysaito1001 ysaito1001 requested review from a team as code owners December 4, 2023 23:22
@aws-sdk-rust-ci aws-sdk-rust-ci merged commit 48b4506 into main Dec 4, 2023
41 checks passed
@aws-sdk-rust-ci aws-sdk-rust-ci deleted the merge-smithy-rs-release-1.x.y-to-main branch December 4, 2023 23:24
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.

3 participants