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

[pull] main from awslabs:main #23

Merged
merged 332 commits into from
Sep 15, 2023
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 31, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Mar 31, 2023
jdisanti and others added 29 commits May 3, 2023 21:29
#2670)

## Motivation and Context
This PR:
- Deletes `TraceProbe`
- Replaces the orchestrator's `Phase` helper with a couple of macros
- Introduces the concept of phases into `InterceptorContext` so that
input/output/error/request/response accessors don't need option wrappers
- Adds `TypeErasedError` so that `orchestrator::Error` can implement
`Error`
- Rewinds the interceptor context in the retry loop

----

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

## Motivation and Context
When setting the `enableNewSmithyRuntime` feature gate to
`both_default_middleware` or `both_default_orchestrator`, the generated
code would fail to compile due to the a checksum response decorator
assuming the property bag always existed. This PR makes that decorator
aware of the conditional existence of the property bag so that it can
elect to not customize the code for the orchestrator use case (which
will ultimately replace the decorator with an interceptor).

----

_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
We have found that `aws-sdk-rust` release-2023-05-01 brought in the
`aws-wasm` crate to `versions.toml`. The crate comes from an example in
the `aws-doc-sdk-examples` repository. This PR fixes gradle build in
`sdk` so that the `publisher` only considers crates under the `sdk`
directory when generating `versions.toml`.

## Testing
Manually ran
```
./gradlew :aws:sdk:assemble
```
and confirmed that `versions.toml` got created under
`smithy-rs/aws/sdk/build/aws-sdk`
~~`smithy-rs/aws/sdk/build/aws-sdk/sdk`~~ and `README` was successfully
hydrated.

----

_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: Yuki Saito <awsaito@amazon.com>
…ne (#2664)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
#2662

## Description
<!--- Describe your changes in detail -->
This PR adds tests for all interceptor hooks to ensure the correct error
handling behavior and defines a set of stub components for orchestrator
testing.

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
This PR includes tests.
----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
To initialize tracing. It's the only example that currently doesn't; the
rest of our binary examples (`pokemon-service`, `pokemon-service-tls`)
already do this.

----

_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
This PR adresses on [feedback from my previous
PR](#2653 (review)).


## Description
- use `as_nanos` in `Ord` impl for `DateTime` instead of manual impl.

## Testing
- add proptest that checks that `Ord` impl matches RFC 3339 comparison.

## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or 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._
…#2683)

See #2676.

----

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

This patch also removes the unneeded dependency on `lambda_runtime` by
`aws-smithy-http-server-python`.

This patch also refactors `LambdaHandler`'s `convert_event` to avoid
cloning the URI path when not needed.

This is a breaking change. See #2676 why.

This patch also bumps `aws-smithy-http-server` dependency on `mime` to
0.3.4.

`cargo +nightly-2022-11-16 minimal-versions check --all-features`
otherwise
fails when using 0.3.0, because we require `impl fmt::Display for
mime::FromStrError`, which was first introduced in 0.3.4.

As to why `minimal-versions` is now picking `mime` 0.3.0 with this
patch, it's
because in `lambda_http` 0.7.3, they had [`mime =

"0.3.16"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/99dba6447253ac87cf3cefeb2ba130b50514f9df/lambda-http/Cargo.toml#L35-L35),
and in `lambda_http` 0.8.0, they've now relaxed that to [`mime =

"0.3"`](https://github.com/awslabs/aws-lambda-rust-runtime/blob/393d6447bea0502e1f939d197f4facc228e6e007/lambda-http/Cargo.toml#L36).


## 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
smithy-rs codegen or 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._
…0.8.0 (#2685)" (#2690)

This reverts commit 04db5e3.

This is a breaking change that needs to wait to be merged in until the
next breaking release.

----

_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 #2687

## Description
The implementation for IMDS static stability support introduced a bug
where returned credentials from IMDS are extended unconditionally, even
though the credentials are not stale. The amount by which credentials
are extended is randomized and it can incorrectly extend the expiry
beyond what's originally set. IMDS produces credentials that last 6
hours, and extending them by at most 25 minutes usually won't be an
issue but when other tools such as Kube2iam and AWSVault are used, the
expiry can be set much shorter than that, causing the issue to occur.

This PR will conditionally extend the credentials' expiry only when the
returned credentials have been expired with respect to the current wall
clock time. Also, the constant values have been adjusted according to
our internal spec.

## Testing
- Added a new unit test for the IMDS credentials provider

## 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: Yuki Saito <awsaito@amazon.com>
## Motivation and Context
This module was supposed to be removed with the crate reorganization
cleanup, but was missed. This PR removes it.

----

_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
The paginators were originally turned off for the orchestrator feature
flag since there were issues with them, but those issues seem to have
been resolved since. This PR re-enables them.

## Testing
- [x] Generated the AWS SDK in `orchestrator` mode and verified the
paginator tests pass
- [x] Added a unit test that validates the paginators compile for
generic clients in `orchestrator` mode

----

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

## 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
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._

---------

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
## Motivation and Context
This PR fixes the KMS tests when the generating code in orchestrator
mode by ensuring the `Future` returned by `send()` implements `Send`,
and also adds a codegen unit test for this so that it's checked at the
generic client level.

----

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

It is a breaking change and it will be included in the next release.

----

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

## Motivation and Context
Currently, we're relying on `runtimeConfig.runtimeCratesPath()` to read
`stubgen.{py,sh}` files, but that function only returns a path if we're
using `relativePath` for our runtime crates:
```
"runtimeConfig": {
      "relativePath": "../rust-runtime"
},
```
otherwise it returns `null` and in that case our code generator fails
with:
```
Projection pokemon-service failed: java.io.FileNotFoundException: null/aws-smithy-http-server-python/stubgen.py (No such file or directory)
java.io.FileNotFoundException: null/aws-smithy-http-server-python/stubgen.py (No such file or directory)
```

With this PR we're linking `stubgen.{py,sh}` to `resources/` folder and
reading them using `getResource()` function.

## 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._
## Description
This PR allows users to pass-in interceptors to a generic client.
Client-level configured interceptors are eventually added to
`client_interceptors` and operation-level interceptors to
`operation_interceptors`, both of which are fields in the
`aws-smithy-runtime-api::client::interceptors::Interceptors`. The
relevant code is generated only in the orchestrator mode.

The SDK registers a default set of (client-level & operation-level)
interceptors, and the passed-in interceptors by a user will run _after_
those default interceptors.

## Testing
- Added integration tests `operation_interceptor_test` and
`interceptor_priority` in `sra_test`.

----

_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: Yuki Saito <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
#2696)

## Motivation and Context
Operations named `Send` or `Sync` (and probably others) were colliding
with the types in the standard library prelude and causing compiler
errors. This PR adds tests that include all the type names from the Rust
prelude, and fixes the compiler errors they cause.

In the future, the `no_implicit_prelude` attribute can be added to
certain code generated modules to better enforce that there can't be
name collisions, but for now, the `tokio::test` macro doesn't compile
with that attribute enabled (and likely other macros from other
libraries).

## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or 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
Now we have the feature parity between Rust and Python servers (at least
for the Pokémon service's needs) we can use the same model in both.
Closes #1508

## Testing
```bash
$ cd smithy-rs/examples
$ make test # test Rust servers
$ cd python
$ make test # test Python servers
```

## 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
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
#1793 

## Description
<!--- Describe your changes in detail -->
This adds a runtime plugin which provides support for a request info
header.
The plugin depends upon three interceptors:
- `ServiceClockSkewInterceptor` - tracks the approximate latency between
the client and server
- `RequestAttemptsInterceptor` - tracks the number of attempts made for
a single operation
- `RequestInfoInterceptor` - adds request metadata to outgoing requests.
Works by setting a header.

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
I wrote one test but need to implement several more

----

_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
Port [Customizable
Operation](#1647) to
orchestrator

## Description
This PR implements `CustomizableOperation` in the orchestrator. Just
like the counterpart in the middleware, it is created when the
`customize` method (in the orchestrator mode) on a fluent builder is
called. The `customize` method in the orchestrator could technically be
made a synchronous method because there is no need to create an
operation, which requires `async`, therefore making the `customize`
method in the middleware `async`. However, during the transition from
the middleware to the orchestrator, the integration tests
([example](https://github.com/awslabs/smithy-rs/blob/31c152d9af53afb9a5e6edf9df3def57931b9c1e/aws/sdk/integration-tests/s3/tests/signing-it.rs#L36))
need to be able to run in both modes. For this reason, the `customize`
method in the orchestrator is temporarily marked as `async`.

Regarding methods defined on the new `CustomizableOperation`, they
include `mutate_request` and `map_request` from the counterpart in the
middleware. However, it did not port `map_operation` because there is no
operation to map on. Most use cases for `map_operation` is put things in
a property bag. The new `CustomizableOperation` provides an
`interceptor` method to accomplish the same, i.e putting things in a
config bag.

Finally, for integration tests to run in both modes, the code gen emits
the implementation of the `customize` method differently depending on
the active Smithy runtime mode, similar to what the implementation of
`send` method does.

## Testing
Added one `sra-test` for mutating a request.

----

_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: Yuki Saito <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
## Motivation and Context
This PR ports the API Gateway `Accept` header customization into the
orchestrator implementation. The original implementation of this
customization in #287 didn't include a test, so this PR also adds an
integration test for it.

----

_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
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
Necessary before we can implement retries.

## Description
<!--- Describe your changes in detail -->
I noticed that we weren't handling the flow quite right when errors
occurred. This PR fixes that and adds interceptor-based tests to ensure
things are working right. I still think we could use more tests but the
PR is already quite large.

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
This PR contains tests

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Description
<!--- Describe your changes in detail -->
We were unintentionally double-boxing type-erased errors. This fix
correctly de-references the errors, solving the problem.

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
I wrote a test.

----

_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
Update AWS models based on the latest ones on 5/18/2023

----

_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: Yuki Saito <awsaito@amazon.com>
## Motivation and Context
This PR refactors the client protocol test generator machinery to use a
client instead of calling `make_operation` directly, and then fixes the
ad hoc tests for the orchestrator.

The ad hoc tests revealed that overriding the signing region/service via
endpoint config was lost when porting SigV4 signing to the orchestrator,
so this PR updates the SigV4 `HttpRequestSigner` implementation to
restore this functionality. It is doing this in the signer directly
rather than via an interceptor since it should only run this logic when
SigV4 is the selected auth scheme.

Other notable changes:
- Adds `--no-fail-fast` arg to `cargoTest` targets so that all Rust
tests run in CI rather than stopping on the first failure
- Changes `EndpointResolver::resolve_and_apply_endpoint` to just
`resolve_endpoint` so that the orchestrator can place the endpoint
config into the request state, which is required for the signer to make
use of it
- Adds a `set_region` method to SDK service configs
- Deletes the API Gateway model and integration test from the SDK smoke
test since it is covered by the ad hoc tests
- Adds a comment explaining where the API Gateway model comes from in
the ad hoc tests
- Adds a `smithy.runtime.mode` Gradle property to `aws:sdk` and
`aws:sdk-adhoc-test` to trivially switch between middleware and
orchestrator when testing/generating locally

----

_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
This PR adds the SDK smoke test with the orchestrator implementation to
CI, and excludes services that don't yet pass tests.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Description
This will allow integration tests under `aws/sdk/integration-tests` to
run in both smithy runtime modes. Prior to the PR, the integration tests
use `map_operation` to customize operations, which is not supported in
the orchestrator, preventing us from running them in the orchestrator
mode. Fortunately, all the usages of `map_operation` in the integration
tests involve setting a test request time and a test user agent in a
property bag.

This PR stops using `map_operation` in those tests and instead
introduces separate test helper methods in both runtime modes: one for
setting a test request and the other for setting a test user agent. They
allow the integration tests to compile and run in both modes.

Note that the integration tests in the orchestrator do not necessarily
pass at this time. We'll address the failures subsequently.

## Testing
Confirmed integration tests continue passing with the changes when run
in the middleware . Confirmed those complied (but not necessarily
passed) in the orchestrator.

----

_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: Yuki Saito <awsaito@amazon.com>
## Motivation and Context
This PR adds back `--location` to the subcommand
`generate-version-manifest` for the `publisher`. Without this, CI would
fail due to the PR bot trying to use the already deleted command option
([link](https://github.com/awslabs/smithy-rs/actions/runs/5023168618/jobs/9007489752?pr=2712)).
It's important to note that all changes to `tools` need to be backwards
compatible across releases.

## Testing
Against the old and the new versions of
[`build.gradle.kts`](https://github.com/awslabs/smithy-rs/pull/2663/files),
manually ran
```
./gradlew :aws:sdk:assemble
```
and confirmed that `versions.toml` got created under
`smithy-rs/aws/sdk/build/aws-sdk`.

----

_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: Yuki Saito <awsaito@amazon.com>
jdisanti and others added 29 commits August 23, 2023 09:46
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
The SDK canary was:
- Failing, but marking that failure as a pass.
- Failing on string compare on the Transcribe Streaming test.
- Failing on permissions with the EC2 test.

This PR fixes these issues.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## 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
smithy-rs codegen or runtime crates
- [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._
----

_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
Chrono deprecated an API


----

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

## Motivation and Context
Cherry picks MSRV 1.70.0 upgrade ([original
PR](#2948) merged to `main`)

## 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
smithy-rs codegen or runtime crates
- [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: Zelda Hessler <zhessler@amazon.com>
## Motivation and Context
Fixes #2944

## Description
`CustomizableOperation` in the last two releases
([release-2023-08-01](https://github.com/awslabs/smithy-rs/releases/tag/release-2023-08-01)
and
[release-2023-08-22](https://github.com/awslabs/smithy-rs/releases/tag/release-2023-08-22))
broke backward-compatibility with respect to its auto traits.
Specifically, it ceased to be `Send` and `Sync` because the struct
contained a boxed trait object. This PR fix that issue, making
`CustomizableOperation` `Send` and `Sync` again.

## Testing
- Added a Kotlin unit test to verify `CustomizableOperation` is `Send`
and `Sync`.

## 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
smithy-rs codegen or runtime crates
- [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: ysaito1001 <awsaito@amazon.com>
Previously, if you forgot to set the region, the deployment would fail
with a confusing error about the OIDC provider already existing, which
can easily lead down a rabbit hole.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
In #2907, I created an allow list of S3 operations to add
`@optionalAuth` to, but this turns out to be too restrictive, as seen in
awslabs/aws-sdk-rust#878. This PR restores the
original middleware behavior of allowing optional auth for all S3
operations.

----

_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
- awslabs/aws-sdk-rust#873

## Description
Add a customization for S3 so that if `<Error>` is the root element, we
trigger the error parsing flow

## Testing
- Added an integration test

## 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
smithy-rs codegen or runtime crates
- [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._
needed for my nullability PR.

----

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

----

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

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
SDK ad-hoc clients sometimes have endpoint rulesets without a region,
but use SigV4. In these cases, the region setter on config is still
necessary for signing to succeed, so they should retain the setters for
region.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
This PR incorporates the new test cases in Smithy from
smithy-lang/smithy#1908, and adds support to
`@restXml` and `@restJson1` for unions with the `@httpPayload` trait.
This resolves #1896.

This also fixes code generation for the latest `medicalimaging` SDK
model.

----

_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
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
When a `@contextParam` is marked as required, we will enforce it on
inputs. Since these fields may influence endpoint, omitting them can
result in a different target being hit.

- #1668 
- aws-sdk-rust#873

## Description
<!--- Describe your changes in detail -->

## Testing
- [x] S3 Integration test

## 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
smithy-rs codegen or runtime crates
- [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._
## Motivation and Context
Addresses  7 in #2413 

## Description
This small PR removes uses of `once_cell` from public API. The
`http_versions` module in the `aws_smithy_http` crate was dead-code.

## Testing
Relies on existing tests in CI.

## 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
smithy-rs codegen or runtime crates
- [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: ysaito1001 <awsaito@amazon.com>
## Motivation and Context
~~**The PR will be a draft until
#2675 is merged into `main`.
Once that's merged, this PR can remove the change to `Cargo.toml` in
`aws-smithy-client`.**~~

**Now that it's passed tests in CI, ysaito1001 will merge this PR once
it has passed the internal tests**

Fixes #2500.

## Description
This PR updates the base image for ci-build's Dockerfile as the latest
image for [amazonlinux](https://gallery.ecr.aws/amazonlinux/amazonlinux)
has been updated to 2023.

As part of it, the changes to Dockerfile include
- Fixing conflicting curl's libraries by specifying `--allowerasing`
Without it, we'd get an error as follows:
```
package curl-minimal-7.88.1-1.amzn2023.0.1.x86_64 conflicts with curl provided by curl-7.87.0-2.amzn2023.0.2.x86_64
```
- Adding perl explicitly as a new version of openssl now requires it
Without `perl`, we'd get an error as follows:
```
Step 24/48 : RUN cargo +${rust_nightly_version} -Z sparse-registry install cargo-deny --locked --version ${cargo_deny_version}
 ---> Running in 3c3431881cfa
...
error: failed to run custom build command for `openssl-sys v0.9.76`
...
  --- stderr
  Can't locate FindBin.pm in @inc (you may need to install the FindBin module) (@inc contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
  BEGIN failed--compilation aborted at ./Configure line 15.
  thread 'main' panicked at '
```

Also, there is a change to `Cargo.toml` in `aws-smithy-client`:
- Forcing `aws-smithy-client` with `native-tls` feature to use a more
recent `openssl-sys` crate
Without it, `cargo minimal-versions check` would fail in
`aws-smithy-client` trying to build `openssl-sys` v0.9.39 where OpenSSL
in a container is more up-to-date, leading to a build failure (See [this
issue](sfackler/rust-openssl#1724) for more
details)

Finally, updating CI for `Run Tests on Windows`
- Manually installing `openssl` as
[suggested](sfackler/rust-openssl#1542 (comment)).
Without it, after introducing a more recent `openssl` 0.10.52
`dev-dependencies` in `aws-smithy-client`, we'd get this on Windows:
```
  --- stderr
  thread 'main' panicked at '

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-pc-windows-msvc
  $TARGET = x86_64-pc-windows-msvc
  openssl-sys = 0.9.90
```

----

_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: Yuki Saito <awsaito@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
This PR ports all the connectors from the `aws-smithy-client` crate into
`aws-smithy-runtime` implementing the new `HttpConnector` trait. The old
connectors are left in place for now, and follow up PRs will remove them
as well as revise the generated configs to take `HttpConnector` impls
rather than `DynConnector`.

----

_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: Zelda Hessler <zhessler@amazon.com>
## Motivation and Context
Remove vulnerable webpki version

## Testing
I ran the benchmark

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
Debugging tests is easier when the order of arguments in assertions is
consistent across the board. With consistent order, you don't need to
look at the line of code to know which value is the correct value. Most
of the rest of the project uses expected/actual order, so this PR makes
the protocol tests also use that order.

----

_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 #2926

## Description
This PR ports logic implemented in
#2603. Thankfully, even though
we did not port this at the time of the orchestrator launch, the
orchestrator has not logged sensitive bodies because we have never
logged response bodies in the orchestrator code.

The code changes in this PR
- now logs response bodies in `try_attempt`
- ports the logic from the previous PR in question to the orchestrator,
via an interceptor

Now, when credentials providers in `aws_config` need to say "I want to
redact a response body"
([example](https://github.com/awslabs/smithy-rs/blob/2c27834f90b0585dba60606f9da6246b341227d6/aws/rust-runtime/aws-config/src/http_credential_provider.rs#L48))
when middleware is gone, they can pass an interceptor
`SensitiveOutputInterceptor` to `Config` of whatever clients they are
using.

## Testing
Depends on the existing tests.

Without the logic ported over the orchestrator and by logging response
bodies unconditionally in `try_attempt`, we got the following failures.
After we've ported the logic, they now pass.
```
    default_provider::credentials::test::ecs_assume_role
    default_provider::credentials::test::imds_assume_role
    default_provider::credentials::test::sso_assume_role
    default_provider::credentials::test::web_identity_token_env
    default_provider::credentials::test::web_identity_token_profile
    default_provider::credentials::test::web_identity_token_source_profile
    profile::credentials::test::e2e_assume_role
    profile::credentials::test::region_override
    profile::credentials::test::retry_on_error
```


## 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
smithy-rs codegen or runtime crates
- [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: ysaito1001 <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
Draft pull request pending merge of #2970 
## Motivation and Context
- awslabs/aws-sdk-rust#738
- awslabs/aws-sdk-rust#858
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->

## Description
<!--- Describe your changes in detail -->
This PR adds two additional classes of retries tested:
1. GO_AWAY: awslabs/aws-sdk-rust#738
2. REFUSED_STREAM: awslabs/aws-sdk-rust#858

I tested 1 by using the example helpfully provided. The fix for 2 is
untested and difficult to reproduce but since my fix for 1 worked, I'm
confident that we're detecting the correct error class here.

## Testing
I used the example provided by the customer and validated the H2 GO_AWAY
fix.

## 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._
This PR adds a utility for making unmodeled requests with the
orchestrator, which is a prerequisite for getting aws-config completely
off of the old generic middleware client.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
@eduardomourar eduardomourar merged commit e7143e0 into eduardomourar:main Sep 15, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.