## 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 -->
https://github.com/awslabs/smithy-rs/issues/1562
## Description
<!--- Describe your changes in detail -->
This change adds a new body wrapper: The minimum throughput limit
wrapper. It tracks the rate that data is being streamed from itself. If
that rate falls below some configurable limit, it emits an error instead
of the next chunk. This protects users from requests that start quickly
but then slow down considerably.
I'd like to get this merged and then figure out the
codegen/docs/examples/config part in a separate PR.
## 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. -->
Tests are included.
----
_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
https://github.com/awslabs/smithy-rs/pull/3076 missed type alias for
some types we moved to `aws-smithy-types`. This small PR will fix that.
## Testing
Relied on the 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
----
_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 existing credentials provider was a DOS risk and didn't obey timeout
settings because it used `std::timeout::spawn` but relied on a
async-based timeout mechanism.
## Description
- Use `tokio::process` instead
- introduce new cargo feature
## Testing
- unit 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
Implements https://github.com/awslabs/smithy-rs/issues/3033
## Description
This PR hides behind cargo features the third-party types from
`http-body` and `hyper` crates that are used in`aws-smithy-types`'
public API. Customers need to opt-in by enabling a cargo feature
`http-body-0-4-x` in `aws-smithy-types` to create an `SdkBody` or
`ByteStream` using those third-party types. For more details, please see
[the upgrade
guide](https://github.com/awslabs/smithy-rs/discussions/3089).
As can been seen from code changes, to reduce the surface area where we
need to feature-gate things, we have fused the
`aws_smithy_types::body::Inner::Streaming` enum variant into
`aws_smithy_types::body::Inner::Dyn` variant, thereby removing
`SdkBody::from_dyn`.
## Testing
Relied on existing tests in CI
## 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._
---------
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
## Motivation and Context
- Fixes#3034
## Description
Because AuthSchemeOptions were being registered at the operation level,
there was no way for them to be overridden by customer-provided runtime
plugins. This moves them into a separate plugin that is added at
Client/Default priority.
## Testing
- new unit 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._
This PR replaces the credentials cache with the new identity cache, and
adds config validation via the `SharedConfigValidator` runtime component
and `ValidateConfig` trait.
----
_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
A follow-up on #3026
## Description
#3026 moved
- `aws_smithy_http::body::{BoxBody, Error, SdkBody}` to
`aws_smithy_types::body::{BoxBody, Error, SdkBody}`
- `aws_smithy_http::byte_stream::{AggregatedBytes, ByteStream,
error::Error}` to `aws_smithy_types::byte_stream::{AggregatedBytes,
ByteStream, error::Error}`
and also left "breadcrumbs", so that customers could still consume
updated types from `aws_smithy_http` after the move.
This PR turns breadcrumbs into deprecation messages (via
`#[deprecated(...)]`) and updates existing places that used to use moved
types from `aws_smithy_http` to directly depend on `aws_smithy_types`.
## Testing
Relied on 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
----
_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
Completes #3054 (a follow-up on #3032)
## Description
#3032 moved `BuildError` from `aws_smithy_http::operation::error` to
`aws_smithy_types::error::operation`. That PR also left "breadcrumbs",
so that customers could still consume `BuldError` from `aws_smithy_http`
after the move.
This PR turns breadcrumbs into deprecation messages (via
`#[deprecated(...)]`) and updates existing places that used to use moved
types from `aws_smithy_http` to `aws_smithy_types`.
## Testing
Relied on tests in CI.
## 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._
---------
Co-authored-by: Russell Cohen <rcoh@amazon.com>
## Motivation and Context
- Fixes https://github.com/awslabs/smithy-rs/issues/3043
As a follow up to #3072 this removes the old endpoint resolver
interfaces in favor of creating a per-service resolver trait.
This trait defines a `into_shared_resolver()` method which converts the
local trait into a global resolver that can be used with the
orchestrator.
## Description
<!--- Describe your changes in detail -->
## 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. -->
## 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._
While implementing identity caching, I noticed we don't have a default
async sleep impl wired up for generic clients, which was causing caching
to panic in many tests since it needs a sleep impl for timeouts. I
likely need to figure out what to do other than panic if there's no
sleep impl, but that's a problem for a different PR.
This PR adds a default sleep impl to generic clients, and also
simplifies how default config works. Previously, the generated config
`Builder::build` method set all the defaults with a series of "if not
set, then set default" statements. In this PR, defaults are registered
via default ordered runtime plugins.
Additionally, I cleaned up the standard retry strategy:
- The `TokenBucketPartition` didn't appear to be used at all, so I
deleted it.
- `StandardRetryStrategy` was taking retry config at construction, which
means it isn't possible to config override the retry config unless the
strategy is recreated. It now doesn't take any config at all during
construction.
- The adaptive retry client rate limiter was created at construction
based on retry config at that point in time. This means config overrides
wouldn't work with it, so it is also no longer set up at construction
time.
- Removed some unused runtime plugins.
## 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 `ResolveCachedIdentity` trait, and adapts the existing
LazyCredentialsCache implementation to it. It does NOT make this cache
used yet, as that will be done as a separate PR to keep code review
smaller.
Notable differences from the credentials cache:
- Supports multiple different identity types and identity resolvers
- Applies cache partitioning to the `SharedIdentityResolver` so that
operation config overrides of the identity resolver will result in the
correct identity being resolved.
----
_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
In preparation for inlining the old endpoint traits, I'm cleaning up the
endpoint resolver behavior.
## Description
1. The `Config` field of `service_runtime_plugin` was unused to I
deleted it
2. Store the endpoint resolver in `RuntimeComponents` instead of in
operation config. This allows a lot of complex logic around
`ConfigOverride` to be removed.
3. Move the default endpoint resolver into a runtime plugin.
4. Don't have a fallback implementation for `EndpointResolver`, allow
final construction of `RuntimeComponents` to fail
5. `ServiceRuntimePlugin` has been changed to `Defaults` so that it
doesn't overwrite settings set by the service config
## Testing
Well covered by existing UT / IT
## 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
Takes care of the first part of
https://github.com/awslabs/smithy-rs/issues/3053 (the remaining part is
denoted as `TODO(runtimeCratesVersioningCleanup)` and until that and
https://github.com/awslabs/smithy-rs/issues/3033 are done the issue will
not be closed).
## Description
This PR moves from `aws-smithy-http` to `aws-smithy-types`:
- the `SdkBody` struct
- the `byte_stream` module
Within the origin crate, we leave "breadcrumbs" (i.e. reexports) for
existing customers of the items above so they are not broken by the
move.
We have just moved `SdkBody` to `aws-smithy-types` without renaming it
to see how it looks there. However, as
[TODO(naming)](https://github.com/awslabs/smithy-rs/pull/3026/files#diff-090c503b779024fdadb8ac97465c80438635df82e62c42b0d85b588a303d9a95R28)
says, we can choose to rename it to just `Body`. Curious to hear what
the reviewers think.
## Testing
Relied on the tests in CI.
----
_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: Russell Cohen <rcoh@amazon.com>
Agnostic in that it's generic over the operation it's applied to.
Figuring out how to write such a plugin can be fun but is not trivial.
I'm mostly adding this as a reference to refresh my memory the next time
I have to implement one of these.
----
_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 `SsoTokenProvider` that loads session name cached SSO
tokens, and automatically refreshes them when possible. The
`SsoCredentialsProvider` is updated to use this new `SsoTokenProvider`
so that it is now compatible with the latest AWS CLI.
----
_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
- [ ] Upgrade guidance
- [x] changelog
To allow seamless adoption of the incoming `http` crate, we're updating
our client crates to use an intermediate type.
## Description
Update _client_ code to use `HttpRequest`. Some internal code still uses
`http::Request` but those usages are limited.
## Testing
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._
This PR makes the orchestrator traits more idiomatic by making them
verbs.
----
_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
With `cargo-audit` v0.18.2, it reports the following vulnerabilities
when run against generated SDKs.
```
$ pwd
<smithy-rs root>/aws/sdk/build/aws-sdk
$ cargo generate-lockfile && cargo audit
...
Scanning Cargo.lock for vulnerabilities (339 crate dependencies)
Crate: atty
Version: 0.2.14
Warning: unsound
Title: Potential unaligned read
Date: 2021-07-04
ID: RUSTSEC-2021-0145
URL: https://rustsec.org/advisories/RUSTSEC-2021-0145
Dependency tree:
atty 0.2.14
├── env_logger 0.9.3
│ └── aws-credential-types 0.56.1
|
...
|___ criterion 0.4.0
```
Both of the latest `env_logger` and `criterion` removed their
dependencies on `atty`. This PR, therefore, updates a version of
`env_logger` and that of `criterion` within the `smithy-rs` codebase.
## Testing
Ran the above repro steps against SDKs generated from this branch. No
vulnerabilities detected.
----
_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 lifetimes to the `IdentityResolver`, `DnsResolver` (renamed
to `ResolveDns`), and `EndpointResolver` traits so that lifetime
gymnastics aren't needed when implementing those traits. For example,
`IdentityResolver::resolve_identity` takes `&ConfigBag` as an argument,
which means you have to pull things out of the ConfigBag outside of any
returned async block in order for the compiler to be satisfied. This
change removes that consideration and makes implementing these traits a
lot easier.
----
_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
Takes care of the first part of
https://github.com/awslabs/smithy-rs/issues/3054 (the remaining part is
denoted as `TODO(runtimeCratesVersioningCleanup)` and until that's done
the issue will not be closed).
## Description
This PR moves from `aws-smithy-http::operation::error::{BuildError,
SerializationError}` to
`aws-smithy-types::error::operation::{BuildError, SerializationError}`.
Within the origin crate, we leave "breadcrumbs" (i.e. reexports) for
existing customers of the items above so they are not broken by the
move. The breadcrumps will be removed by the part two of the issue.
As part of the move, `aws_smithy_http::endpoint::EndpointPrefix::new`
now returns its `crate::endpoint::error::InvalidEndpointError` instead
of `crate::operation::error::BuildError` for two reasons:
- `BuildError` is now in a stable crate and for an `InvalidUri` variant
to be created, it needed to take a `http::uri::InvalidUri` from a
unstable crate, which we cannot expose in public API.
- The new error is more closely related to the endpoint business.
## Testing
Relied on the tests in CI.
## 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._
---------
Co-authored-by: John DiSanti <jdisanti@amazon.com>
This PR replaces the `Future` type-alias that was pointing to
`NowOrLater` with a new-type for each trait that returns a future.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
[Read the RFC here](https://github.com/awslabs/smithy-rs/pull/3018)
## 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 -->
#2417
## Description
<!--- Describe your changes in detail -->
Exactly what it says on the tin. I have a related RFC to publish that
goes into more depth.
## 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 an integration test that ensures a custom retry classifier can
be set and is called.
## 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
Implementation of the HTTP request wrapper type from RFC
## Description
RFC + implementation of HttpRequest
## Testing
- IT/UT
- Separate PR which uses this type in implementation of the 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: John DiSanti <jdisanti@amazon.com>
This PR removes the remaining rust-runtime code to support middleware,
deprecates empty crates, and removes the remaining codegen references to
any of that code. In the interest of keeping code review easier, a
separate PR will finish addressing the remaining
`TODO(enableNewSmithyRuntime)` comments.
----
_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 removes the last usages of `DynConnector` and `HttpConnector`
from the `aws_smithy_client` crate with their counterparts in
aws-smithy-runtime-api and aws-smithy-runtime. It also introduces
`HttpClient` to make HTTP connector selection a smoother process, and
adds a runtime plugin that configures a default `HttpClient` so that
`Config` doesn't have to do that.
The `DnsService` from aws-config is also moved into aws-smithy-runtime
and refactored to be consistent with the other configurable traits in
the orchestrator since it will likely be used in the future for more
than just the ECS credentials provider.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
Issues fixed:
- `ConnectionPoisoningInterceptor` should use the
`read_after_deserialization` hook so that it's possible to poison
modeled transient errors.
- aws-config should enable connection poisoning on its IMDS/ECS/HTTP
clients.
----
_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
`AssumeRoleProvider` currently uses `ProviderConfig` as a source of
configuration, but that API is hard use and not intended for external
consumption.
This fixes the Assume Role issue but only for `AssumeRoleProvider`
## Description
Update the API (see changelog) to be more ergonomic and derive
configuration from `SdkConfig` instead.
## Testing
Existing tests + new unit tests
## 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._
This ports the direct uses of the `aws_smithy_client::Client` in
aws_config to 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._
## Motivation and Context
Removes `futures_core::stream::Stream` from
`aws_smithy_http::byte_stream::ByteStream`
## Description
This PR is part of our ongoing effort,
https://github.com/awslabs/smithy-rs/issues/2413. We remove the
`futures_core::stream::Stream` trait from
`aws_smithy_http::byte_stream::ByteStream`. To continue support existing
places that relied upon `ByteStream` implementing the `Stream` trait, we
provide explicit `.next`, `.try_next`, and `.size_hints` methods on that
type. As part of it, a doc-hidden type `FuturesStreamCompatByteStream`,
which implements `Stream`, has been added to `aws_smithy_http` to cater
to those who need a type implementing `Stream` (see
[discussion](https://github.com/awslabs/smithy-rs/pull/2910#discussion_r1317112233)
why doc-hidden).
Another place we need to update is codegen responsible for rendering
stream payload serializer, and this affects the server. The regular
server and the python server have slightly different rendering
requirements, since the former uses
`aws_smithy_http::byte_stream::ByteStream` (that does _not_ implement
the `Stream` trait) and latter uses its own
[ByteStream](cb79a68e3c/rust-runtime/aws-smithy-http-server-python/src/types.rs (L343))
(that does implement `Stream`). We use
`ServerHttpBoundProtocolCustomization` to handle the difference:
`StreamPayloadSerializerCustomization` and
`PythonServerStreamPayloadSerializerCustomization`.
## Testing
No new behavior has been added, relied on the existing tests in CI.
## Checklist
- [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
smithy-rs#1797
## Description
This PR adds Sigv4a support along with many tests that were ported from
the CRT Sigv4a project. **It does not include**:
- An E2E test. We should create one, but doing so requires us to set up
MRAP which is a good amount of work.
- A fuzz test. While I wrote and ran one on my machine, I found the fuzz
testing tool to be really difficult to use and it would take some work
to include fuzz testing in CI.
Additionally, test Sigv4a is annoying because Sigv4a signing is
non-deterministic. Because of this, the tests test signature generation
by first signing a request, and then by verifying that signature (_This
is how the CRT tests this feature_).
----
_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
Python middleware were unable to change the URI which makes it
impossible to change the route of an incoming request in Python.
## Description
URI has a #[setter] that Python side can use to change it.
## Testing
- Test has been added that ensures URI can be changed from python.
- If the URI is modified by a middleware in a local smithy-rs Python
server, a different route will be invoked.
## Checklist
- I've updated the changelog.next.toml
Co-authored-by: Fahad Zubair <fahadzub@amazon.com>
## Motivation and Context
Removes `futures_core::stream::Stream` from the `aws-smithy-async`
crate.
## Description
This PR is part of our ongoing effort,
https://github.com/awslabs/smithy-rs/issues/2413. We remove the
`futures_core::stream::Stream` trait from the public API in the
`aws-smithy-async` crate. While doing so, we compensate
- `FnStream` by providing the explicit `.next` and `.collect` methods to
let the previously working code continue working.
- `TryFlatMap` by making it return a new-type wrapper `PaginationStream`
to hide `FnStream` from those who use paginators.
With this change, the latest canary no longer uses
`tokio_stream::StreamExt`, since the paginator does not work in terms of
the `Stream` trait. Furthermore, `aws-sdk-rust` has been more than [3
releases since
release-2023-01-26](https://github.com/awslabs/aws-sdk-rust/releases),
so the module `release-2023-01-26` has been removed from
`canary-lambda`.
## Testing
No new tests added, but made sure the existing tests keep working with
the change.
## 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
Closes#2831.
## Description
Fractional seconds will still be accepted during parsing, but not
emitted during serialization.
## Testing
```
./gradlew codegen-core:check codegen-client:check codegen-server:check codegen-client-test:check codegen-server-test:check
```
## 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._
---------
Co-authored-by: Russell Cohen <rcoh@amazon.com>
## 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 -->
smithy-rs#1767 aws-sdk-rust#536
## Description
<!--- Describe your changes in detail -->
This PR adds support for nullability i.e. much less unwraps will be
required when using the AWS SDK. For generic clients, this new behavior
can be enabled in codegen by setting `nullabilityCheckMode: "Client"` in
their codegen config:
```
"plugins": {
"rust-client-codegen": {
"codegen": {
"includeFluentClient": false,
"nullabilityCheckMode": "CLIENT_CAREFUL"
},
}
```
## 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. -->
Ran existing tests
## 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: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Russell Cohen <rcoh@amazon.com>
## 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 -->
aws-sdk-rust#749
## Description
<!--- Describe your changes in detail -->
When wrapping an `SdkBody`, the resulting body is no longer signable.
Some services support this and others don't. This change adds a new
method for mapping an `SdkBody` called `map_readonly_body`. If called on
a body that is signable, it will produce a signable body. However, this
function should never when modifying the inner body is necessary, as
that will result in a signing error.
## 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. -->
Zelda wrote a 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 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._
Draft pull request pending merge of #2970
## Motivation and Context
- https://github.com/awslabs/aws-sdk-rust/issues/738
- https://github.com/awslabs/aws-sdk-rust/issues/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: https://github.com/awslabs/aws-sdk-rust/issues/738
2. REFUSED_STREAM: https://github.com/awslabs/aws-sdk-rust/issues/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._
## Motivation and Context
Fixes https://github.com/awslabs/smithy-rs/issues/2926
## Description
This PR ports logic implemented in
https://github.com/awslabs/smithy-rs/pull/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](2c27834f90/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>
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._
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
~~**The PR will be a draft until
https://github.com/awslabs/smithy-rs/pull/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 https://github.com/awslabs/smithy-rs/issues/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](https://github.com/sfackler/rust-openssl/issues/1724) for more
details)
Finally, updating CI for `Run Tests on Windows`
- Manually installing `openssl` as
[suggested](https://github.com/sfackler/rust-openssl/issues/1542#issuecomment-1399358351).
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>
## 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
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._
## 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._
Debugging endpoint resolution can be difficult when the params being
used during resolution aren't logged. This PR adds that logging.
Example output below. It doesn't ordinarily have newlines and
indentation. I added those for clarity.
```
2023-08-22T00:27:54.363727Z DEBUG
invoke{service=s3 operation=ListObjectsV2}:try_op:try_attempt:
aws_smithy_runtime::client::orchestrator::endpoints: resolving endpoint
endpoint_params=EndpointResolverParams(TypeErasedBox[!Clone]:Params {
bucket: Some("test-bucket"),
region: Some("us-east-1"),
use_fips: false,
use_dual_stack: false,
endpoint: None,
force_path_style: false,
accelerate: false,
use_global_endpoint: false,
use_object_lambda_endpoint: None,
disable_access_points: None,
disable_multi_region_access_points: false,
use_arn_region: None
})
endpoint_prefix=None
```
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
Runtime plugins need to be able to wrap components configured in other
runtime components. For example, one runtime plugin should be able to
wrap the HTTP connector configured in another runtime plugin.
This PR makes this possible by:
- Introducing the ability to order runtime plugins within the
service/operation plugin "levels".
- Adding an argument to `RuntimePlugin::runtime_components` so that
implementations can reference components configured by previous plugins.
The `order` function has three separate order values: `Defaults`,
`Overrides`, and `NestedComponents`. The `Defaults` order is currently
unused, but will be used later when we refactor how defaults in config
work. Everything defaults to `Overrides` since most runtime plugins will
want to be in this slot. The `NestedComponents` order is specifically
for runtime plugins that want to create nested components, and runs at
the very end.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
**Will be merged to `smithy-rs-release-0.56.x` branch**
Addresses https://github.com/awslabs/aws-sdk-rust/issues/872
## Motivation and Context
With the introduction of the orchestrator, the core functions that live
in `aws-smithy-runtime/src/client/orchestrator.rs` were annotated by
`#instrument`. By default this emits logs at the `INFO` level, which
caused our customer to see the excessive amount of logging after
switching to the latest SDK creates `0.29`.
## Description
This PR reduces the log level to `DEBUG` wherever we use `#instrument`
throughout the file.
## Testing
No new tests have been added as part of this PR. [An
enhancement](https://github.com/awslabs/smithy-rs/issues/2932) has been
filed to check logging volume.
Here is a quick check that all instances in the file specify `trace`:
```
✗ rg "instrument"
src/client/orchestrator.rs
34:use tracing::{debug, debug_span, instrument, trace, Instrument};
160: .instrument(debug_span!("invoke", service = %service_name, operation = %operation_name))
167:#[instrument(skip_all, level = "debug")]
186:#[instrument(skip_all, level = "debug")]
319:#[instrument(skip_all, level = "debug")]
389: .instrument(debug_span!("read_body"))
398: .instrument(debug_span!("deserialization"))
407:#[instrument(skip_all, level = "debug")]
419:#[instrument(skip_all, level = "debug")]
```
## 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
This PR implements a short-term solution for aws-sdk-rust#864 while a
long-term solution is worked out.
## Testing
- Tested manually against S3.
- Added DVR tests.
----
_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 -->
- [ ] 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
- #2087
## Description
- remove lingering usages of SystemTime::now()
- ensure they don't return by adding a clippy.toml
## Testing
- CI
- Ran the webassembly example
## 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._
---------
Co-authored-by: John DiSanti <jdisanti@amazon.com>
This PR merges the benchmark and integration tests from `aws/sra-test`
into the SDK integration tests, and updates the tests so that they
compile and pass.
----
_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 missing documentation to the `aws-smith-runtime` crate, and
moves the `ServiceClockSkewInterceptor` into the `aws-runtime` crate.
----
_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 creates new-types for `Input`, `Output`, and `Error` so that the
type system can enforce that an output isn't given to an input and vice
versa. It also removes `TypedBox` since that isn't really needed
anymore.
----
_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 `name` function to the `Interceptor` trait so that
interceptor errors are easier to narrow down.
----
_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
- #2087
test-util pulled in Hyper but that's not strictly necessary
## Description
Split out wiremock as it's own features and do some other cleanup.
## Testing
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._
## Motivation and Context
When `TimeSource` was created, we didn't carefully track down all the
places and left a bit of existing implementation to limit the scope of
the change.
## Description
This removes the public (doc hidden) Testing code from
aws-credential-types and our other test time sources instead.
## Testing
- IT/UT
## 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: John DiSanti <jdisanti@amazon.com>
This PR finishes documenting `aws-smithy-runtime-api` and also:
- Adds `Send + Sync` bounds to `Interceptor`.
- Moves `Interceptors` into `aws-smithy-runtime`.
- Expands the more complicated macros in the interceptor context
wrappers.
- Makes the `OrchestratorError` an informative error according to
[RFC-22](https://github.com/awslabs/smithy-rs/blob/main/design/src/rfcs/rfc0022_error_context_and_compatibility.md).
- Renames `ConnectorError::is_other` to `as_other` and adds an
equivalent `is_other` that returns a boolean.
----
_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 makes some progress towards documenting the
`aws-smithy-runtime-api` crate, as well as some additional work to make
it more stable:
- Places the `client` module behind a `client` feature so that it will
be possible to add a `server` module/feature in the future.
- Deletes `ConfigBagAccessors`.
- Renames auth types to reflect changes in the internal spec.
- Moves `RequestAttempts` into the `client::retries` module.
- Moves several types that were in floating around in
`client::orchestrator` to their own modules.
- Renames `Connector` to `HttpConnector`.
- Changes `DynResponseDeserializer` to `SharedResponseDeserializer` for
consistency with serialization, and also so that it could be moved into
runtime components or config in the future (since those need to
implement `Clone`).
- Updates the identity and auth design doc.
- Updates READMEs and crate-level documentation.
- Fixes most, but not all, the missing documentation in the crate.
- Hides the builder macros.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
The current module location is misleading, since you never want to run
the layer as a plugin: plugins always run after routing, and the health
check should be enacted before routing. Examples have been corrected,
and a test has been added.
## 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._
## Motivation and Context
- Simplify no-op code in `as_nanos`
- Add more proptests
## Testing
Ran the tests
----
_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 improves the docs on the aws-smithy-types `config_bag` and
`type_erasure` modules.
----
_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 changes the default runtime mode to orchestrator for generated
clients and the 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._
## Motivation and Context
Addresses item 8 in #2413
## Description
This PR removes the third party types as follows:
- removes `SegmentedBuf` from public API in `aws-smithy-http` (used when
the feature `event-stream` was enabled)
## Testing
- [x] Passed 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
----
_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>
This PR fixes Timestream in the orchestrator implementation.
----
_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 item 1, 3, and 9 in #2413
## Description
This PR removes the third party types as follows:
- removes `InvalidHeaderValue` from public API in `aws-http`
- removes `SendError` from public API in `aws-smithy-async`
- removes `xmlparser` from public API in `aws-smithy-xml`
Those types were exposed to public APIs primarily due to the
implementation of traits, e.g. `From` and `Iterator`. Those
implementations are used internally (such as XML deserialization and
converting an error type) so we should be able to hide them within
crates.
## Testing
- [x] Passed 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>
During the orchestrator implementation, a bug was introduced that always
enabled the `test-util` feature on `aws-smithy-runtime` in the generated
crates. This led to several pieces of non-test code relying on test-only
code, specifically around `SystemTime` implementing `TimeSource`.
This PR fixes that issue, and also fixes another issue where the
`RuntimeComponentsBuilder` was being initialized without a name for the
service config.
----
_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 fixes a panic that would result from cloning a cloneable
`TypeErasedBox` twice.
----
_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 moves all the "runtime components", pieces that are core to the
operation of the orchestrator, into a separate `RuntimeComponents` type
for the orchestrator to reference directly.
The reason for this is so that these core components cannot be changed
by interceptors while the orchestrator is executing 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._
## Motivation and Context
There is a bug in cloneable layer that allows non-clone types to enter
## Description
Remove `DerefMut` and resolve the consequences
## Testing
- new doc test
- existing orchestrator CI
## 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._
---------
Co-authored-by: John DiSanti <jdisanti@amazon.com>
## Motivation and Context
Adds `Metadata` to a config layer through `OperationRuntimePlugin`.
## Description
We have had a customer's use case where a service name and a operation
name are obtained from
[Metadata](ddba46086a/rust-runtime/aws-smithy-http/src/operation.rs (L17-L22)).
The end goal was to use their names as part of metrics collection.
Previously, it was done using `map_operation` on a
`CustomizableOperation`, e.g.
```
client
.some_operation()
.customize()
.await?
.map_operation(|operation| {
operation.try_clone().map(|operation| {
let (_, parts) = operation.into_request_response();
parts.metadata.map(|metadata| {
let service_name = metadata.service().to_string().to_uppercase();
let operation_name = metadata.name().to_string();
/*
* do something with `service_name` and `operation_name`
*/
})
});
Ok(operation)
})?
.send()
.await;
```
The orchestrator no longer supports `map_operation` on
`CustomizableOperation`. We therefore add `Metadata` to a config layer
through `OperationRuntimePlugin`. See the added integration test for how
`Metadata` is retrieved from within an interceptor.
## Testing
Added an integration-test to verify `Metadata` is properly set.
----
_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: Zelda Hessler <zhessler@amazon.com>
## Motivation and Context
Allow Python users to configure their logging formatter to either
`json`, `pretty` or `compact` (default).
## 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._
So far, servers have tacitly worked with the notion that plugins come in
two flavors: "HTTP plugins" and "model plugins":
- A HTTP plugin acts on the HTTP request before it is deserialized, and
acts on the HTTP response after it is serialized.
- A model plugin acts on the modeled operation input after it is
deserialized, and acts on the modeled operation output or the modeled
operation error before it is serialized.
However, this notion was never reified in the type system. Thus, users
who pass in a model plugin where a HTTP plugin is expected or
viceversa in several APIs:
```rust
let pipeline = PluginPipeline::new().push(http_plugin).push(model_plugin);
let app = SimpleService::builder_with_plugins(http_plugins, IdentityPlugin)
.post_operation(handler)
/* ... */
.build()
.unwrap();
```
would get the typical Tower service compilation errors, which can get
very confusing:
```
error[E0631]: type mismatch in function arguments
--> simple/rust-server-codegen/src/main.rs:47:6
|
15 | fn new_svc<S, Ext>(inner: S) -> model_plugin::PostOperationService<S, Ext> {
| -------------------------------------------------------------------------- found signature defined here
...
47 | .post_operation(post_operation)
| ^^^^^^^^^^^^^^ expected due to this
|
= note: expected function signature `fn(Upgrade<RestJson1, (PostOperationInput, _), PostOperationService<aws_smithy_http_server::operation::IntoService<simple::operation_shape::PostOperation, _>, _>>) -> _`
found function signature `fn(aws_smithy_http_server::operation::IntoService<simple::operation_shape::PostOperation, _>) -> _`
= note: required for `LayerFn<fn(aws_smithy_http_server::operation::IntoService<..., ...>) -> ... {new_svc::<..., ...>}>` to implement `Layer<Upgrade<RestJson1, (PostOperationInput, _), PostOperationService<aws_smithy_http_server::operation::IntoService<simple::operation_shape::PostOperation, _>, _>>>`
= note: the full type name has been written to '/local/home/davidpz/workplace/smithy-ws/src/SmithyRsSource/target/debug/deps/simple-6577f9f79749ceb9.long-type-4938700695428041031.txt'
```
This commit introduces the `HttpPlugin` and `ModelPlugin` marker traits,
allowing plugins to be marked as an HTTP plugin, a model plugin, or
both. It also removes the primary way of concatenating plugins,
`PluginPipeline`, in favor of `HttpPlugins` and `ModelPlugins`, which
eagerly check that whenever a plugin is `push`ed, it is of the expected
type. The generated service type in the server SDKs'
`builder_with_plugins` constructor now takes an `HttpPlugin` as its
first parameter, and a `ModelPlugin` as its second parameter.
I think this change perhaps goes counter to the generally accepted
wisdom that trait bounds in Rust should be enforced "at the latest
possible moment", that is, only when the behavior encoded in the trait
implementation is relied upon in the code (citation needed).
However, the result is that exposing the concepts of HTTP plugin and
model plugin in the type system makes for code that is easier to reason
about, and produces more helpful compiler error messages.
Documentation about the plugin system has been expanded, particularly on
how to implement model plugins.
## 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._
## Motivation and Context
Implements the actual meat of `config_override` introduced [as a
skeleton in the past](https://github.com/awslabs/smithy-rs/pull/2589).
## Description
This PR enables operation-level config via `config_override` on a
customizable operation (see
[config-override.rs](8105dd46b4/aws/sdk/integration-tests/s3/tests/config-override.rs)
integration tests for example code snippets).
The way it's implemented is through `ConfigOverrideRuntimePlugin`. The
plugin holds onto two things: a `Builder` passed to `config_override`
and a `FrozenLayer` derived from a service config (the latter is
primarily for retrieving default values understood by a service config).
The plugin then implements the `RuntimePlugin` trait to generate its own
`FrozenLayer` that contains operation-level orchestrator components.
That `FrozenLayer` will then be added to a config bag later in the
orchestrator execution in a way that it takes precedence over the
client-level configuration (see
[register_default_runtime_plugins](8105dd46b4/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/OperationGenerator.kt (L65-L71))).
A couple of things to note:
- The size of `ConfigOverrideRuntimePlugin::config` code-generated is
getting large. Maybe each customization defines a helper function
instead of inlining logic directly in `config` and we let the `config`
method call those generated helpers.
- The PR does not handle a case where `retry_partition` within
`config_override` since it's currently `#[doc(hidden)]`, e.g.
```
client
.some_operation()
.customize()
.await
.unwrap()
.config_override(Config::builder().retry_partition(/* ... */))
...
```
## Testing
- Added tests in Kotlin
[ConfigOverrideRuntimePluginGeneratorTest.kt](https://github.com/awslabs/smithy-rs/pull/2814/files#diff-04a76a43c2adb3a2ee37443157c68ec6dad77fab2484722b370a7ba14cf02086)
and
[CredentialCacheConfigTest.kt](https://github.com/awslabs/smithy-rs/pull/2814/files#diff-32246072688cd11391fa10cd9cb38a80ed88b587e95037225dbe9f1a482ebc5d).
~~These tests are minimal in that they only check if the appropriate
orchestrator components are inserted into a config override layer when a
user calls a certain builder method as part of `config_override`.~~
- Added integration tests
[config-override.rs](https://github.com/awslabs/smithy-rs/pull/2814/files#diff-6fd7a1e70b1c3fa3e9c747925f3fc7a6ce0f7b801bd6bc46c54eec44150f5158)
----
_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>
This PR fixes the S3 `alternative-async-runtime` retry tests. The retry
backoff time was being included in the operation attempt timeout, which
I think is undesirable as it makes retry config much harder to get right
since the backoff times are not predictable (they have randomness
incorporated into them). The overall operation timeout is the only one
that needs to incorporate backoff times.
In addition, this PR also:
- Updates READMEs for the `aws-smithy-runtime-api` and
`aws-smithy-runtime` crates
- Adds top-level crate docs to describe features to `aws-smithy-runtime`
- Copies `capture_test_logs` into `aws-smithy-runtime` so that it can be
used (just about) everywhere instead of just in `aws-config`
- Adds service/operation name to the tracing `invoke` span so it's
possible to tell which operation the events are for
- Makes the `Debug` impl for `Identity` useful
- Adds a ton of trace/debug spans and events to the orchestrator
- Fixes an issue in `aws-smithy-runtime` where a huge amount of the
orchestrator tests weren't being compiled due to a removed feature flag
----
_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 updates the orchestrator to support connection poisoning for the
`hyper` connector. It also renames many usages of "connection" to
"connector" in order to make talking about these concepts less
confusing. In short:
```
/// A "connector" manages one or more "connections", handles connection timeouts, re-establishes
/// connections, etc.
///
/// "Connections" refers to the actual transport layer implementation of the connector.
/// By default, the orchestrator uses a connector provided by `hyper`.
```
One possibly controversial decision I made is that `reconnect_mode` is
now a standalone configurable field, rather that a sub-field of
`RetryConfig`. I think we should get together as a team and discuss what
kinds of things we want to allow users to do when configuring
connections.
My thoughts on this are that we should either:
- **A.** Make connection-related settings their own types instead of
including them within other config types
- **B.** Make a single config struct for all connector-related stuff/use
the preëxisting `ConnectorSettings` struct.
Personally, I'm partial to A.
----
_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>
This PR fixes the Smithy `@httpChecksumRequired` trait and idempotency
token auto-fill in the orchestrator implementation.
----
_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
Make endpoint resolution async from the perspective of the orchestrator.
- #2608
## Description
Change the endpoint trait in the orchestrator to be asynchronous
## Testing
- compiled code
----
_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 -->
#2190
## Description
<!--- Describe your changes in detail -->
add support for adaptive retries
## 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 some tests and I'm open to suggestions for more.
----
_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>
## Motivation and Context
In orchestrator mode, most `codegen-client-test` tests were failing due
to being unable to find a matching auth scheme, or due to some of the
test models referencing the `@sigv4` trait. This PR fixes all of those
failures, and adds the `smithy.runtime.mode` flag to
`codegen-client-test` as well.
----
_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:
- Renames "anonymous auth" to "no auth"
- Removes fallback to other auth schemes when an identity fails to
resolve (this was not complying to the reference architecture)
- Adds the ability to opt out of credentials in `ConfigLoader`, and
removes defaulting of the shared credentials cache if no credentials
provider is given
- Makes `ConfigBagAccessors` work on `FrozenLayer` and `CloneableLayer`
- Fixes STS and aws-config tests
----
_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 removes the non-storable `get`/`put` methods from `ConfigBag`
and `Layer`.
----
_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:
- Makes the `#[doc(hidden)]` attributes on orchestrator-only config
functions be conditional based on whether the orchestrator is default or
not.
- Adds re-exports specific to the orchestrator.
- Centralizes `BoxError`.
- Changes organization of interceptor context types a bit.
- Reduces visibility of `Phase` to `pub(crate)`.
----
_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
Moves setting orchestrator components out of `ServiceRuntimePlugin` and
puts it in service config builders' build method.
## Description
This PR is the forth in a series of config refactoring. Here, we move
pieces of code out of `ServiceRuntimePlugin::config` method so that key
orchestrator components meant for the service-level config should only
be constructed once when a service config is created, e.g. during
builder's `build` method. Previously, those components were newly
created every time an operation is invoked.
Wherever `self.handle.conf...` is used, the PR has moved it from
`ServiceRuntimePlugin::config` to the builders' `build` method.
Note that there will be a separate PR to better handle auth resolver &
identity resolver in the context of the ongoing config refactoring.
## Testing
- [x] Passed tests in CI
----
_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 will reduce fields in service config builders to contain only
`CloneableLayer` (except for `interceptors` and `identity_resolvers`).
## Description
This is the third PR in a series of config refactoring in the
orchestrator mode. Just like #2762, this PR reduces fields in service
config builders to contain `CloneableLayer`.
The code changes follow a straightforward pattern where builders'
setters are implemented via a config layer.
## Testing
Relies on the existing tests in CI
----
_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>
## Motivation and Context
Alternative to #2776, making `Layer` cloneable so it can be stored in a
type that implements `Clone`.
## Description
In an attempt to reduce struct fields of a service config builder so it
only contains `Layer` (plus some exceptions such as `interceptors`), we
need to make `Layer` clone since the service config builder
`#[derive(Clone)]`.
There are two options. One, adopted by this PR, is to have a separate
`CloneableLayer` that primarily caters for the need for service config
builders. The other option is #2776, where we require that items in
`Layer` be `Clone`. Since the latter is rather a sledge hammer, changing
the requirement for all of the items to be stored, we will go for the
former, which is a more targeted approach and a two-way door if we want
to switch to the latter in the future.
## Testing
Added unit tests in `type_erase.rs` and `config_bag.rs`.
----
_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>
## 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 -->
#2190
## Description
<!--- Describe your changes in detail -->
this PR adds the rate limiter necessary for orchestrator support of
adaptive retries. I'll integrate the rate limiter with the retry policy
as part of a separate PR following this one. I wanted to keep these
small and easy to review.
This implementation is based on the Go v2 SDK's implementation.
## 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. -->
tests are included
----
_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 -->
Avoid intermediate vec allocations in `AggregatedBytes::to_vec`.
## Description
<!--- Describe your changes in detail -->
Calling `slice::to_vec` on every segment is wasteful, the segments can
be just flattened into an iterator over `u8`s and collected directly.
Also makes the code a bit simpler.
## 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. -->
## 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._
---------
Co-authored-by: 82marbag <69267416+82marbag@users.noreply.github.com>
This PR fixes codegen for the Smithy `@httpChecksum` trait when
generating in orchestrator mode, and also fixes an issue in the unit
tests where the wrong body was being tested to be retryable. The request
body should be retryable rather than the response body.
----
_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
Service config structs now only contain a
`aws_smithy_types::config_bag::FrozenLayer` in the orchestrator mode (no
changes for the middleware mode).
## Description
This PR reduces the individual fields of service configs to contain just
`FrozenLayer`. This makes service configs work more seamlessly with
runtime plugins in the orchestrator mode.
Note that service config _builder_ s still contain individual fields.
We're planning to make them just contain
`aws_smithy_types::config_bag::Layer`. To do that, though, we need to
make `Layer` cloneable and that will be handled in a separate PR. For
builders, the only change you will in the PR is that their `build`
method will put fields into a `Layer`, freeze it, and pass it to service
configs.
This PR is marked as a breaking change because it's based on [another
PR](https://github.com/awslabs/smithy-rs/pull/2728) that's also breaking
change.
## Testing
- [x] Passed tests in CI
----
_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>
## Motivation and Context
Closes https://github.com/awslabs/smithy-rs/issues/1839
Currently, `Plugin` is parameterized by protocol and operation. To
improve symmetry, extensibility and uniformity we switch this to be
parameterized by service instead. The protocol can still be recovered
via the `type Protocol` associated type on `ServiceShape`.
## Description
- Add `ServiceShape` trait, encoding the properties of a Smithy service.
- Change `Plugin<Protocol, Operation, S>` to `Plugin<Service, Operation,
S>`.
- Add `FilterByOperation` and `filter_by_operation` `Plugin`s.
This PR categorizes orchestrator TODO comments into `Launch` and
`Cleanup`:
- `enableNewSmithyRuntimeLaunch`: Comment needs to be addressed before
orchestrator launch
- `enableNewSmithyRuntimeCleanup`: Comment needs to be addressed after
launch when removing middleware
----
_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 will eventually want to store additional runtime plugins on fluent
builders, clients, etc. To make this work, the RuntimePlugin trait needs
to assert Send/Sync
## Description
Small tweaks + test on the RuntimePlugin trait
## Testing
CI
----
_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 fixes presigning for Amazon Polly in the orchestrator
implementation.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
## Description
Implements serde support for `Document`.
## Testing
Test checks whether the serialized/de-serialized data matches with the
expected value
----
_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 -->
addresses #2743
## Description
<!--- Describe your changes in detail -->
- add more standard retry tests
- add optional standard retries token bucket
## 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. -->
tests are included
----
_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>
## Motivation and Context
Update the RuntimePlugin trait based on discussion:
1. Methods are infallible
2. Split out `Config` and `Interceptors`
3. `ConfigBag` now has an explicit field `interceptor_state`
4. Refactor `ConfigBagAccessors` so that we can build the core around
the trait and keep the trait together with a `where Self` trick
## Description
- Update the `RuntimePlugin` trait
- Deal with resulting implications
## Testing
- [x] CI
----
_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>
These no longer need to be pinned since the current MSRV is compatible
with their latest versions.
----
_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 upgrades the MSRV to 1.68.2.
## Checklist
- [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>
Co-authored-by: 82marbag <69267416+82marbag@users.noreply.github.com>
Also, sort `Cargo.toml` dependencies if they were disordered.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
See https://github.com/awslabs/smithy-rs/issues/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>
Co-authored-by: Harry Barber <106155934+hlbarber@users.noreply.github.com>
This replaces the existing custom interceptor disable logic with shared
logic to allow generally disabling any public interceptors from Runtime
plugins. The previous behavior was very brittle because it relied
heavily on runtime plugin execution order.
## Motivation and Context
- simplify presigning behavior
- generalize logic to disable interceptors
## Description
Create `disable_interceptor` struct, which, when inserted into the
configuration bag can disable an interceptor via the `Interceptors`
execution interface.
## Testing
- ` (cd aws/sdk/build/aws-sdk/sdk/s3 && cargo test --test presigning)`
## 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
the debug bound on the struct definition is redundant and is viral,
making the code harder to use
## Testing
code compiles
----
_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
Part of refactoring config bag to work with the new RuntimePlugin API
## Description
- change config bag to a vector instead of a linked list
## Testing
- existing UTs
----
_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 is a child PR of https://github.com/awslabs/smithy-rs/pull/2616
The changes that this PR introduces is same as the ones that were merged
to `unstable-serde-support` branch before.
Initially, we tried to make commit to unstable-serde-support branch and
merge changes one by one in small PRs. However, in order to make it up
to date with the main branch, we would need to go through a large PR of
over 700 files.
Thus, I decided to create individual PRs that commits directly to `main`
branch.
## Description
- Implements `serde` support to `Blob`
## Testing
- Test checks whether the serialized/de-serialized data matches with the
expected value
## Checklist
NA
----
_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 <johndisanti@gmail.com>
## Motivation and Context
This is a child PR of https://github.com/awslabs/smithy-rs/pull/2616
The changes that this PR introduces is same as the ones that were merged
to `unstable-serde-support` branch before.
Initially, we tried to make commit to unstable-serde-support branch and
merge changes one by one in small PRs. However, in order to make it up
to date with the main branch, we would need to go through a large PR of
over 700 files.
Thus, I decided to create individual PRs that commits directly to `main`
branch.
## Description
- Implements `serde` support to `DateTime`
## Testing
- Test checks whether the serialized/de-serialized data matches with the
expected value
## Checklist
NA
----
_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 fixes S3 presigning in the client orchestrator implementation. A
Polly presigning fix will come in a separate PR.
This PR also:
- Renames `ClientProtocolGenerator` to `OperationGenerator` to better
represent what its generating.
- Moves `OperationCustomization` into `codegen-client` since it is
client specific and unused by the server codegen.
- Deletes the `ProtocolGenerator` base class in `codegen-core` since it
wasn't adding any value.
- Adds the concept of stop points to the orchestrator so that
orchestration can be halted before transmitting a request.
- Adds `DisableInvocationIdInterceptor`,
`DisableRequestInfoInterceptor`, `DisableUserAgentInterceptor`, and
`HeaderSerializationSettings` config bag configs to facilitate
presigning requirements.
- Fixes compilation of all S3 and Polly tests when 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._
## Motivation and Context
Add `SharedAsyncSleep` wrapping `Arc<dyn AsyncSleep>` and update call
sites of `Arc<dyn AsyncSleep>` to use `SharedAsyncSleep`
## Description
Public APIs that take/return a trait object for `AsyncSleep` have been
using `Arc<dyn AsyncSleep>` in the codebase. This has a downside of
exposing a bare `Arc`, making it difficult to change the APIs in the
future without breaking backwards compatibility. This PR adds a newtype
wrapper `SharedAsyncSleep` that hides `Arc<dyn AsyncSleep>` to alleviate
the said issue (the idiom of having `SharedXXX` has been seen in the
codebase, e.g. `SharedTimeSource`, `SharedCredentialsProvider`, and so
on).
## Testing
- [x] Passed 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: Yuki Saito <awsaito@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
## Description
<!--- Describe your changes in detail -->
This PR adds support for the Standard retry strategy. The standard
strategy will be inserted into a service's config bag if a retry config
was set. Otherwise, unless another retry strategy was already set, a
`NeverRetryStrategy` will be set. This seemed like a reasonable default,
but I'm open to suggestions.
## 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. -->
tests are included
---
_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 -->
This change fixes many of the smaller issues I ran into during the
implementation of standard retries for the orchestrator. Merges from
`main` were getting difficult with my [other
PR](https://github.com/awslabs/smithy-rs/pull/2725) so I'm breaking
things up.
## Description
<!--- Describe your changes in detail -->
- when orchestrator attempt timeout occurs, error is now set in context
- update test connection to allow defining connection events with
optional latency simulation update orchestrator attempt loop to track
iteration count
- set request attempts from the attempt loop
- add comment explaining "rewind" step of making request attempts add
`doesnt_matter` method to `TypeErasedBox`, useful when testing update
tests to use the new `TypeErasedBox::doesnt_matter` method
- add more doc comments
- add `set_subsec_nanos` method to `DateTime`.
- I added this to make it easier to string-format a datetime that didn't
include the nanos.
- fix Invocation ID interceptor not inserting the expected header update
input type for `OperationError::other` to be more user-friendly
- add `test-util` feature to `aws-smithy-runtime-api`
- add `test-util` feature to `aws-runtime`
- fix presigining inlineable to pull in tower dep during codegen
## 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. -->
tests have been updated where necessary
----
_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 -->
- update retry classifiers to act directly on the `InterceptorContext`
- add codegen method for inserting retry classifiers into the config bag
- update `InterceptorContext` to return options instead of panicking
## 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. -->
Tests were updated as needed.
----
_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 moves types and traits in those modules to the
`aws-smithy-types` crate.
## Description
This is to prepare for the upcoming refactoring where `SdkConfig` and
service configs (and both of their builders) will be backed by
`ConfigBag`.
## Testing
- [x] Pass 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~~
----
_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>
TODO:
- [x] docs
- [x] integration test (canary even?)
- [x] customize README for timestream
## Motivation and Context
- #613
- https://github.com/awslabs/aws-sdk-rust/issues/114
## Description
This adds support for TSW and TSQ by adding endpoint discovery as a
customization. This is made much simpler by the fact that endpoint
discovery for these services **has no parameters** which means that
there is no complexity from caching the returned endpoint.
Customers call `.enable_endpoint_discovery()` on the client to create a
version of the client with endpoint discovery enabled. This returns a
new client and a Reloader from which customers must spawn the reload
task if they want endpoint discovery to rerun.
## 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. -->
## 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
This is a child PR of https://github.com/awslabs/smithy-rs/pull/2616
The changes that this PR introduces is same as the ones that were merged
to `unstable-serde-support` branch before.
Initially, we tried to make commit to unstable-serde-support branch and
merge changes one by one in small PRs. However, in order to make it up
to date with the main branch, we would need to go through a large PR of
over 700 files.
Thus, I decided to create individual PRs that commits directly to `main`
branch.
## Description
- Implements `serde` support to `Number`
## Testing
- Test checks whether the serialized/de-serialized data matches with the
expected value
## Checklist
NA
----
_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 <johndisanti@gmail.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
## Motivation and Context
- #2262
- #2087
- #2707
This adds `TimeSource` in SDK and service configs so we can effectively
control time when executing requests with the SDK at the client level.
_note:_ the breaking change is in a trait implementation of a struct
we're going to delete, not a real breaking change
## Description
- Add `SharedTimeSource` and use it in SdkConfig / `aws-config` /
<service>::Config
- Wire up the signer and other uses of `SystemTime::now()` that I could
find
- track down broken tests
## Testing
- [x] various unit tests that all still pass
## 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
15th operation was being dropped when iterator was being read into a
TinyMap
## Description
The 15th operation was being dropped when the if statement was caught
because the operation had been popped of the iterator but hadn't been
added to the vec of operations before the two iterators were being
chained and collected into a
## Testing
Added unit tests that reproduced the issue and verified that the issue
is fixed
## 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._
---------
Co-authored-by: david-perez <d@vidp.dev>
Co-authored-by: Fahad Zubair <fahadzubair@gmail.com>
## Motivation and Context
This PR makes generic clients default to the built-in rustls HTTPS
connector when no override is provided, but only for the new
orchestrator implementation.
----
_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 gets event streams working in the client orchestrator
implementation, and depends on #2671.
The orchestrator's `TypeErasedBox` enforces a `Send + Sync` requirement
on inputs and outputs. For the most part, this isn't an issue since
almost all generated inputs/outputs are `Send + Sync`, but it turns out
the `EventStreamSender` wasn't `Sync` due to an omission of the `Sync`
bound. Thus, this PR is a breaking change, as it adds a `Sync`
requirement for anyone who passes a stream to an event stream operation.
----
_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 creates a `DeferredSigner` implementation that allows for the
event stream message signer to be wired up by the signing implementation
later in the request lifecycle rather than by adding an event stream
signer method to the config.
Refactoring this brings the middleware client implementation closer to
how the orchestrator implementation will work, which unblocks the work
required to make event streams work 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._
* Show how to plug a connector
* For TLS: keep rustls, only
## 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._
---------
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
## Motivation and Context
This PR gets the Glacier integration tests to pass against the
orchestrator implementation by porting the Glacier customizations from
`make_operation` changes to interceptors.
----
_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 removes all the middleware code from generated clients when the
`smithy.runtime.mode` flag is set to `orchestrator`. It also changes the
`aws-config` crate to use the fluent client instead of the Smithy client
for STS and SSO based credential providers.
The `polly` test no longer compiles in orchestrator mode with these
changes since presigning directly references middleware code. This will
get fixed in a later PR.
----
_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
- Controlling time is required for several testing use cases
- #2087
- #2262
## Description
Introduce `TimeSource` trait, a real implementation, and a test
implementation.
## Testing
These changes are used in the timestream PR
## Checklist
No changelog, these changes have no impact since the code is not yet
utilized
----
_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 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._
## 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
<!--- 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._
## 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
Port [Customizable
Operation](https://github.com/awslabs/smithy-rs/pull/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](31c152d9af/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
<!--- 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._
## 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>
This reverts https://github.com/awslabs/smithy-rs/pull/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._
## 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._
See https://github.com/awslabs/smithy-rs/issues/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>
This reverts commit 04db5e3572.
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._
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"`](99dba64472/lambda-http/Cargo.toml (L35-L35)),
and in `lambda_http` 0.8.0, they've now relaxed that to [`mime =
"0.3"`](393d6447be/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._
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._
## Motivation and Context
This PR adresses on [feedback from my previous
PR](https://github.com/awslabs/smithy-rs/pull/2653#pullrequestreview-1404515899).
## 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._
## 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._
## 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._
_Every once in a while I run clippy and the pre-commit checks on
everything b/c stuff seems to fall through the cracks._
- fix: various code that's escaped the linter
- format: various code that's escaped the formatter
- update: `chrono` because a test was using a method only available in
v0.4.23 _(I don't know why that didn't fail in CI)_
_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 ports @rcoh's addition of `Debug` in `ConfigBag` to the
`TypeErasedBox`.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._