Commit Graph

2368 Commits

Author SHA1 Message Date
Thomas Cameron f84f9ba8fa
RFC30: Refactoring blob (#2850)
## Motivation and Context
This is a sub-PR of https://github.com/awslabs/smithy-rs/pull/2615.
Refactors `blob.rs` file.

## Description
Some test was failing due to unnecessary import; This PR fixes it.

## Testing
NA

## 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: Zelda Hessler <zhessler@amazon.com>
2023-12-20 18:12:51 +00:00
Russell Cohen 06e66d191c
Scrape doc examples (#3334)
## Motivation and Context
Extracted from #3308, this adds doc example scraping. This won't make
much of a difference yet but it will help if we're able to move example
repos directly under the SDKs themselves when appropriate.

## Description
https://doc.rust-lang.org/rustdoc/scraped-examples.html

## Testing
verified that examples appear in docs when expected

## Checklist
no changelog

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-20 18:11:43 +00:00
Russell Cohen ee5ae957fd
Update CredentialsProcess to support no-expiry credentials (#3335)
## Motivation and Context
- aws-sdk-rust#1021

## Description
Fix bug in CredentialsProcess provider where expiry was erroneously
required

## 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._
2023-12-20 17:50:57 +00:00
Russell Cohen 7093ea60e7 Various missing precommit updates 2023-12-20 10:38:49 -05:00
Russell Cohen d4771a6a0d CR feedback 2023-12-20 10:29:58 -05:00
Russell Cohen d89cbb0104 Update changelog 2023-12-20 10:29:51 -05:00
Russell Cohen e43d0d8737 Fix generation of `aws-config` related code in tests 2023-12-20 10:29:06 -05:00
Russell Cohen 2427850133 Unify codegen flags
Unify codegen flags behind a single "awsSdkBuild" flag. This is a singular flag to toggle "AWS mode" on and off. This also updates the sdk-codegen integration tests to be use this build mode to more closely reflect actual generated SDKs.
2023-12-20 10:29:04 -05:00
Russell Cohen 255be4aa74 Source sdk-partitions from the models instead of hardcoding
1. Update `sync-models` to sync from aws-sdk-rust. This location includes `sdk-partitions.json`
2. Update aws:sdk gradle file to properly set this variable in codegen./
3. Add an additional safeguard to ensure that the default hardcoded version is only used in tests and adhoc SDK generation.
2023-12-20 10:28:15 -05:00
Russell Cohen a27be2bad8
Add dynamodb retry test (#3321)
## Motivation and Context
Adds a test to ensure that `ThrottlingErrors` from DynamoDB do not
result in a new connection


## Checklist
- no changelog

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-20 15:25:29 +00:00
Russell Cohen 7eb06bca32
Add tool to simulate a release dry run (#3327)
## Motivation and Context
As we discovered in #3318, it's possible to cause unexpected breakage by
releasing runtime crates.
 
This tool automates setting up `aws-sdk-rust` (and manually, you can
copy the patches into `~/.cargo/config.toml` for your entire system), to
simulate the release of new runtime crates.

<img width="1518" alt="Screenshot 2023-12-15 at 12 58 41 PM"
src="https://github.com/smithy-lang/smithy-rs/assets/492903/59d6cb5c-d39c-4e42-98e2-6858d0884449">


### Testing
With this tool (and a small hack—I had to simulate releasing 1.1.100 so
that the versions became the latest), I correctly caught the breaking
changes from the previous release.


----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-20 15:25:02 +00:00
david-perez 1bb0349e5d
Update server TLS example to showcase how to extract connection information (#3023)
Showcase how to pass TLS derived information to server operation
handlers, like the certificate chain presented by the client.

To test, run `RUST_LOG=pokemon_service_tls=DEBUG cargo run` and `curl -v
--insecure https://localhost:13734/do-nothing`. Alternatively, run the
tests using `RUST_LOG=pokemon_service_tls=DEBUG cargo test`, which have
been updated to hit the operation that logs the TLS connection derived
information.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-19 15:53:37 +00:00
david-perez 42cc7cf557
Add comment before dumping headers in Python server example (#3083)
Addresses
https://github.com/awslabs/smithy-rs/pull/2905#discussion_r1366932417.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-19 15:16:12 +00:00
david-perez a1ec8b89a7
Allow injecting methods with generic type parameters in the config object (#3274)
This is a follow-up to #3111. Currently, the injected methods are
limited to taking in concrete types. This PR allows for these methods to
take in generic type parameters as well.

```rust
impl<L, H, M> SimpleServiceConfigBuilder<L, H, M> {
    pub fn aws_auth<C>(config: C) {
        ...
    }
}
```

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-19 15:09:48 +00:00
82marbag 0d6cf7226b
Declare lifetime in `From` impl (#3329)
_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>
2023-12-18 15:00:12 +00:00
AWS SDK Rust Bot b829bb419a
Merge smithy-rs-release-1.x.y back into main (#3328) 2023-12-15 14:47:57 -06:00
ysaito1001 ef1e37d15b Revert "Allow downgrading smithy-rs versions (#3316)"
This reverts commit 5a0e4344ad.
2023-12-15 14:11:30 -06:00
ysaito1001 fe9f492c44 Merge remote-tracking branch 'origin/smithy-rs-release-1.x.y' into merge-smithy-rs-release-1.x.y-to-main 2023-12-15 14:10:23 -06:00
Miles Ziemer 345624eb6c
Ignore actual default value instead of 0/false (#3252)
## 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 -->
Previously, there was logic used to ignore the default 0/false values
for numbers/booleans when serializing members if they weren't boxed.
This was to fix issues that occured when upstream models didn't properly
box shapes that were meant to be optional, and for the most part worked
because services would just fill in the default if it wasn't passed.
However, with Smithy 2.0, models may have defaults != 0/false, but the
codegenerator still ignores the zero value.

## Description
<!--- Describe your changes in detail -->
This commit makes it so that the actual default value for the member is
ignored for booleans and numbers, instead of just 0/false. It also
updates serialization for http bindings so that headers and query
parameters with 0/false values aren't ignored if they are optional
parameters.

## 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. -->
- [x] Generated AWS SDK and inspected diff. Only changes are not
ignoring default value inside `if let Some() = ...` blocks, and ignoring
default value instead of just 0 (only seems to effect nimble).
- [x] Added protocol tests for serializing 0/false in query params for
restXml and restJson

## 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 <john@vinylsquid.com>
2023-12-15 16:37:36 +00:00
John DiSanti 952b7d8943
Fix the build against JDK 20 (#3323)
When using JDK 20, the following error would occur when attempting to
build or run tests:

```
Execution failed for task ':codegen-client:compileKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (20) and 'compileKotlin' (11).
```

This PR explicitly sets the Java source and target versions to fix this
error.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-15 16:18:36 +00:00
ysaito1001 e7e2419ff8
Make `publisher` yank one crate at a time (#3324)
## Motivation and Context
`P109001503`

## Description
When `publisher` yanks crates, it blasts `crates.io` in parallel with
all the yank requests, and then awaits their results.

To avoid throttling errors, this PR instead yanks one crate at a time,
with a configurable time delay in between via a `--delay-millis` command
line argument. Further, a call to yank is now wrapped with
`run_with_retry` to detect throttle errors, wait a long period of time
after, and try again.

Essentially, the structure of the `yank` module is now similar to that
of the `publish` module such as use of `run_with_retry` and the presence
of a CLI argument `delay-millis`.

## Testing
On top of changes in the PR, manually modified the following for loop in
`yank_release.rs` locally
```
for (crate_name, crate_version) in crates {
```
to
```
for (crate_name, crate_version) in [("aws-sigv4", "0.55.0"); 50] { // aws-sigv4@0.55.0 has already been yanked in the past so it's safe to yank repeatedly
```
and observed the behavior of `publisher yank-release --delay-millis
2000` that it
- waits 2 seconds beteen yanks
- yanks in a serial manner

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-15 02:50:07 +00:00
John DiSanti 24029ab256
Fix warning for unwrap_or_else in generated builders (#3307)
While attempting to upgrade to Smithy 1.42, I noticed a warning in the
codegen-client integration tests:
```
warning: unnecessary closure used to substitute value for `Option::None`
   --> json_rpc10/rust-client-codegen/src/operation/operation_with_defaults/_operation_with_defaults_output.rs:477:31
    |
477 |             default_int_enum: self.default_int_enum.unwrap_or_else(|| 1),
    |                               ^^^^^^^^^^^^^^^^^^^^^^--------------------
    |                                                     |
    |                                                     help: use `unwrap_or(..)` instead: `unwrap_or(1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
```

This change fixes these warnings by switching between unwrap_or_else and
unwrap_or based on the shape.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-14 21:45:12 +00:00
John DiSanti fe36727499
Upgrade Kotlin to 1.9.20 and Ktlint to 1.0.1 (#3320)
This PR upgrades Kotlin to 1.9.20, and Ktlint to 1.0.1.

I had to abandon the pretty-format-kotlin pre-commit hook since it was
ignoring our `.editorconfig`, which made it impossible to suppress some
of the newer lints that would be difficult and undesirable to fix. Now
all Ktlint runs go through gradle, so there isn't any way for
inconsistencies to creep in.

I recommend reviewing this PR commit by commit as the commit that runs
Ktlint against the entire repo has a very large diff. When reviewing the
Ktlint formatting changes, be sure to hide whitespace changes to reduce
how much needs to be examined.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-14 12:35:18 -08:00
John DiSanti aa1f556ae0
Upgrade nightly used in CI (#3073)
_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>
2023-12-14 11:30:23 -08:00
ysaito1001 b180199f6a
Add daily credentials verification workflow (#3314)
## Motivation and Context
Adds a daily credentials verification workflow

## Description
We rotate credentials manually. Those credentials are
`RELEASE_AUTOMATION_BOT_CRATESIO_TOKEN` and
`RELEASE_AUTOMATION_BOT_PAT`. While the validity of those credentials
are checked during dry-runs of [the release
workflow](https://github.com/smithy-lang/smithy-rs/blob/main/.github/workflows/release.yml)
we've had instances where a dry-run failed because it was not idempotent
and we nevertheless kicked off a production run, only to find out the
token was invalid. This raises the need for daily credentials
verification, and the PR adds one.

The workflow will check the validly of two credentials
`RELEASE_AUTOMATION_BOT_CRATESIO_TOKEN` and
`RELEASE_AUTOMATION_BOT_PAT`, each checked by a separate job. Upon
failure, a job will notify us as follows:

<img width="1056" alt="Screenshot 2023-12-12 at 6 26 40 PM"
src="https://github.com/smithy-lang/smithy-rs/assets/15333866/1105b26b-7064-4ba2-849a-5969d59f1dd4">

## Testing
Manually triggered failures and got the messages in the above
screenshot. Also verified a successful run with valid credentials.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-14 17:23:29 +00:00
AWS SDK Rust Bot ad3735458c Update changelog 2023-12-13 23:46:27 +00:00
AWS SDK Rust Bot fa93eb9c19 Upgrade the smithy-rs runtime crates version to 1.1.1 2023-12-13 23:44:02 +00:00
Russell Cohen 7dfd6097c3
Add support for constructing sdk body types from http-body 1.0 (#3300)
## Motivation and Context
- aws-sdk-rust#977


## Description
The first of several PRs to make add support for Hyper 1.0. This minimal
change allows the use of Hyper 1.0 bodies although it does not actually
leverage Hyper 1.0.

## Testing
- Unit test suite
- Ran cargo hack check --feature-powerset because we had a lot of
features. I found a couple of issues.


## 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>
2023-12-13 20:57:00 +00:00
Russell Cohen 5a0e4344ad
Allow downgrading smithy-rs versions (#3316)
## 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 -->

## 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 -->
- [ ] 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._
2023-12-13 15:25:17 -05:00
ysaito1001 e42d8cd987
Add skeletal workflow file for credentials verification (#3310)
## Motivation and Context
To manually trigger a workflow, the workflow file needs to have a
revision in the main branch. This PR adds an empty workflow file for
credentials verification. A subsequent PR will fill the contents.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-12 20:37:33 +00:00
82marbag 8ef9618b37
TryFrom with lifetimes (#3303)
## Description
Lifetimes in `TryFrom`, see: #3249


----

_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>
2023-12-12 13:31:57 +00:00
Johnathan W b2535d8c3d
Correcting wording for S3 client docs. (#3304)
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-11 14:45:27 -08:00
AWS SDK Rust Bot 49dae16604 Update changelog 2023-12-11 22:22:27 +00:00
ysaito1001 9f0ba850e0
Reexport `EventReceiver` in a generated client crate (#3305)
## Motivation and Context
Adds re-export for `EventReceiver` in a generated client crate

## Description
`EventReceiver` was added in
https://github.com/smithy-lang/smithy-rs/pull/3114 but the struct itself
could not be referenced as `pub`. Our SDK integration tests did not
break in the said PR because they only called the `next` method on it
and never referred to that struct name.

This PR adds a re-export for `EventReceiver` in case customers need to
refer to the name in their code.

## Testing
Added a unit test and edited a `transcribestreaming` integration test to
verify the re-export.

## 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: AWS SDK Rust Bot <aws-sdk-rust-primary@amazon.com>
2023-12-11 21:17:35 +00:00
AWS SDK Rust Bot 17bcdb1db5 Update changelog 2023-12-08 22:39:53 +00:00
AWS SDK Rust Bot fc335cbc87 Upgrade the smithy-rs runtime crates version to 1.1.0 2023-12-08 22:38:01 +00:00
AWS SDK Rust Bot 093e9a2290
Add the `docsrs` autocfg attr to all crates (#3295) 2023-12-08 15:47:09 -06:00
Russell Cohen 4d3d19382e
Merge branch 'main' into docs-attr 2023-12-08 16:13:41 -05:00
Russell Cohen 0bcc193628 Add the `docsrs` autocfg attr to all crates
This also adds it to generated crates, and adds an autofix+lint to manage these attributes.
2023-12-08 10:24:19 -05:00
Russell Cohen b09b02f332
Allow lossless conversions from float into integral types (#3294)
## 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 -->
Some APIs return JSON values that are intended to be represented by
integral types but are returned as floating values e.g `[1.0, -2.0,
25.0]`.

This allows those values to be converted into Integral types.

## Description

This uses a bidirectional conversion to check if a float can be
losslessly converted into a integral type. This can have issues at the
limits of i64::MAX but I think that's probably acceptable. These values
would be represented imprecisely by floats already.

## Testing
Added additional unit tests of the behavior.

## 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._
2023-12-08 15:19:29 +00:00
ysaito1001 bb2c129481
Upgrade jsoup to 1.16.2 (#3296)
## Motivation and Context
Upgrades `jsoup` to 1.16.2, a version that we know is supported
internally.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-07 22:52:51 +00:00
ysaito1001 bd9ad10ec2
Run `semver-checks` on PRs submitted by external contributors (#3291)
## Motivation and Context
Enables `cargo semver-checks` in CI for PRs created by external
contributors

## Description
For instance, we skipped a run of `cargo semver-checks` in
https://github.com/smithy-lang/smithy-rs/pull/3286 and failed to detect
[a breaking
change](https://github.com/smithy-lang/smithy-rs/pull/3286#discussion_r1416479632)
programmatically.

With this PR, the workflow will run a job `semver-checks` even if the
preceding jobs `save-docker-login-token` or `acquire-base-image` are
skipped. Those jobs are relevant when the PR made changes to build
tools, which is less likely for PRs created by external contributors, so
it's reasonable to skip them and still run the `semver-checks` job.

Furthermore, this PR enables `semver-checks` to run against all crates
in `tmp-codegen-diff/aws-sdk/sdk/`, not just those limited by
`list(os.listdir())[:10]`.

## Testing
Tested the change against [a dummy
PR](https://github.com/smithy-lang/smithy-rs/pull/3288) I created from
my fork of `smithy-rs`. Specifically, `semver-checks` [caught the
aforementioned breaking
change](https://github.com/smithy-lang/smithy-rs/actions/runs/7121830175/job/19391798131#step:4:681)
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._
2023-12-07 17:50:35 +00:00
John DiSanti 2c993e53af
Make delay between crate publishes configurable and reduce default (#3290)
This change reduces the time delay between crate publishes from 5
seconds down to 1, and makes it configurable in case this leads to
release issues.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-07 17:19:14 +00:00
John DiSanti 82b190cd24
Upgrade canary-runner to 1.x and fix bundle naming issue (#3289)
The SDK canary was failing due to the `.N` suffix on release tags (see
https://github.com/awslabs/aws-sdk-rust/issues/993). This change
upgrades the canary to the 1.x SDK and also fixes the bundle naming
issue by removing periods.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-06 23:28:03 +00:00
ysaito1001 1c445774d0
Use a `rustv1` directory from `aws-doc-sdk-examples` (#3287)
## Motivation and Context
This PR is a cleanup after
https://github.com/smithy-lang/smithy-rs/pull/3115, fully switching to
`rustv1` for the rust example directory in
[aws-doc-sdk-examples](https://github.com/awsdocs/aws-doc-sdk-examples).

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-06 23:00:41 +00:00
Zelda Hessler 48d1c559b8
Gradle deprecation warning fixes (#3242)
Fix deprecation warnings in the gradle build scripts, and upgrade jsoup
and gson.

----

_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>
2023-12-06 14:05:21 -08:00
Declan Kelly b78367cbe0
Record TCP connection local socket address in metadata (#3286)
## Motivation and Context
I want to use this field to uniquely identify TCP connection based on
their `local_addr` + `remote_addr`.

See https://github.com/awslabs/aws-sdk-rust/issues/990 for additional
motivation for this change.

## Description
- Add a new optional `local_addr` field in the `ConnectionMetadata`
struct.
- Transfer the `local_addr` `SocketAddress` from the `hyper::HttpInfo`
to the `ConnectionMetadata` field.
- Add to the `trace-serialize` example program so that it will print out
the capture connection values.

## Testing
`cargo test` in `rust-runtime/aws-smithy-runtime-api` and
`aws-smithy-runtime`.

Also ran:
```
thedeck@c889f3b04fb0 examples % cargo run --example trace-serialize
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `/Users/thedeck/repos/github/declanvk/smithy-rs/target/debug/examples/trace-serialize`
2023-12-06T00:13:15.605555Z  INFO lazy_load_identity: aws_smithy_runtime::client::identity::cache::lazy: identity cache miss occurred; added new identity (took Ok(296µs))
2023-12-06T00:13:15.608344Z  INFO trace_serialize: Response received: response=Response { status: StatusCode(200), headers: Headers { headers: {"content-type": HeaderValue { _private: "application/json" }, "content-length": HeaderValue { _private: "17" }, "date": HeaderValue { _private: "Wed, 06 Dec 2023 00:13:15 GMT" }} }, body: SdkBody { inner: BoxBody, retryable: false }, extensions: Extensions }
2023-12-06T00:13:15.608388Z  INFO trace_serialize: Captured connection info remote_addr=Some(127.0.0.1:13734) local_addr=Some(127.0.0.1:50199)
2023-12-06T00:13:15.608511Z  INFO trace_serialize: Response received POKEMON_SERVICE_URL=http://localhost:13734 response=GetServerStatisticsOutput { calls_count: 0 }
```

You can see the log line with "Captured connection info" contains the
`remote_addr` and the `local_addr` fields.

## Checklist
- [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: Declan Kelly <thedeck@amazon.com>
2023-12-06 19:05:47 +00:00
Russell Cohen 8df5ac8545
Update links (these don't redirect) (#3218)
Fix broken links as a result of repo movement

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-05 17:22:54 -08:00
John DiSanti 9af2b21e93
Add compile-time env var to add additional info to user agent header (#3285)
This PR adds a `AWS_SDK_RUST_BUILD_UA_METADATA` environment variable to
allow additional metadata to be added to the SDK user agent header at
compile time.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-05 21:36:59 +00:00
John DiSanti 04aa4c815b
Fix docs in hyper_014 module (#3282)
Moves the doc comments from HyperConnector to HyperClientBuilder where
they're more relevant, and fixes the examples.

This fix is for https://github.com/awslabs/aws-sdk-rust/issues/986.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-05 17:59:23 +00:00