Commit Graph

2368 Commits

Author SHA1 Message Date
AWS SDK Rust Bot 48b450634d
Merge smithy-rs-release-1.x.y back into main (#3280) 2023-12-04 17:24:15 -06:00
ysaito1001 6f4427948c
Merge branch 'main' into merge-smithy-rs-release-1.x.y-to-main 2023-12-04 16:20:37 -06:00
John DiSanti 85d2621b7c
Improve error messaging for auth scheme selection (#3277)
This patch adds a stack-allocated list of explored auth schemes and the
reason each didn't work to the auth orchestrator so that its error
message is much easier to decipher.

----

_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-04 19:27:39 +00:00
Russell Cohen 75b4c351ad
Fix aws-config CI time regression (#3271)
## Motivation and Context
This reduces checking aws-config to 6 minutes, down from 28


----

_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-01 22:36:44 +00:00
Russell Cohen 2cac4d7f56
Improve docs no credentials (#3279)
## 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#971

## Description
Add documentation to `no_credentials` and add `test_credentials()`
method

## Testing
CI

## 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: John DiSanti <jdisanti@amazon.com>
2023-12-01 21:15:13 +00:00
ysaito1001 3124d1acae Merge remote-tracking branch 'origin/smithy-rs-release-1.x.y' into merge-smithy-rs-release-1.x.y-to-main 2023-12-01 13:39:54 -06:00
AWS SDK Rust Bot cd6baa940c Update changelog 2023-12-01 18:53:05 +00:00
AWS SDK Rust Bot 529b3f03e2 Upgrade the smithy-rs runtime crates version to 1.0.3 2023-12-01 18:50:52 +00:00
ysaito1001 81fc83ee6e
Fix `config::Builder::set_credentials_provider` to override what's previsouly set (#3278)
## Motivation and Context
Fixes https://github.com/awslabs/aws-sdk-rust/issues/973

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

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

The PR reverts test signature updates in
https://github.com/smithy-lang/smithy-rs/pull/3156 (in hindsight, having
to update test signatures in that PR was a sign of regression).

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

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

----

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

---------

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-12-01 17:20:45 +00:00
John DiSanti 9587dbc061
Lazy initialize the default HTTP client (#3262)
This change initializes the TLS trust certs at base client validation
time rather than upon creation of the default HTTP client runtime plugin
so that if the default is overridden, that initialization doesn't need
to take place. This is especially helpful on MacOS where that
initialization takes approximately 100 milliseconds.

----

_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>
2023-11-30 23:03:42 +00:00
John DiSanti 5b93fd2f4a
Improve client init time by switching to regex-lite (#3269)
Each client initialization was taking between 1 and 2 milliseconds,
regardless if the client had been constructed before or not. For
example, if a customer wants five clients with different credentials
providers, that could be 10 milliseconds of time spent in
`Client::from_conf`. Approximately 98% of this time was spent compiling
regular expressions for the endpoint partition resolver.

This change switches everything over to the regex-lite crate, which has
faster regex compile times, and shouldn't have much of an impact on
performance for our specific use-cases (small strings, only evaluated at
client initialization).

The use of regex was entirely removed in aws-sigv4 since it was overkill
for what it was being used for.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-30 19:28:07 +00:00
ysaito1001 76ae89ae0b
Fix running semver-checks on `aws-config` (#3272)
## Motivation and Context
Fixes https://github.com/smithy-lang/smithy-rs/issues/3265

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

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

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

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

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

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-29 18:08:50 -06:00
John DiSanti 6420816bf5
Fix the previous release benchmark (#3270)
The benchmark was broken by the behavior major versions change.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-29 18:57:47 +00:00
AWS SDK Rust Bot e1d7cbb642
Merge smithy-rs-release-1.x.y back into main (#3268) 2023-11-29 12:09:17 -06:00
Russell Cohen edab8cfb49
Fix runtime crate versions (#3260)
## Motivation and Context
When the stable/unstable crate versions were split, this caused a
regression in determining the crate version during codegen. This
enhances our crate-version forwarding code to publish all the crate
versions. For impact, see codegen-client-test.

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

## Testing
- [ ] Audit diff

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

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-29 15:01:51 +00:00
ysaito1001 aa70a2967e Merge remote-tracking branch 'origin/smithy-rs-release-1.x.y' into merge-smithy-rs-release-1.x.y-to-main 2023-11-28 14:39:48 -06:00
ysaito1001 eb61ae359e
Add `aws-config` to semver-checks deny list (#3267)
## Motivation and Context
Skip running `semver-checks` on `aws-config` to enable clean runs for CI
while #3265 is investigated.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-28 19:22:40 +00:00
John DiSanti 167e3b587e
Add suffix support to release tags in tooling (#3261)
This will fix the yank tool and canary in the event there are multiple
SDK releases in a day.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-27 17:01:08 -08:00
AWS SDK Rust Bot cb227b598a Update changelog 2023-11-27 23:35:50 +00:00
AWS SDK Rust Bot 88970ba88e Upgrade the smithy-rs runtime crates version to 1.0.2 2023-11-27 23:33:24 +00:00
ysaito1001 28da3c5fde
Stop tagging releases as prereleases (#3259)
## Motivation and Context
Now that we have started [stable
releases](https://github.com/smithy-lang/smithy-rs/releases) since
`release-2023-11-21`, we shouldn't set those as pre-releases.

(this PR also includes a small fix to the `Release` job in our release
workflow to avoid `git push` failing during dry-runs, which [a previous
dry-run](https://github.com/smithy-lang/smithy-rs/actions/runs/6989359794)
ran into)

## Description
The fix is in `changelogger`, and this should remove pre-releases from
releases in `smithy-rs` as well as those in `aws-sdk-rust`.

## Testing
Ran a
[dry-run](https://github.com/smithy-lang/smithy-rs/actions/runs/7007835035)
and checked the release artifacts as follows:
```
{
  "tagName": "release-2023-11-27",
  "name": "November 27th, 2023",
  "body": "",
  "prerelease": false
}
```

Have not verified what a release manifest looks like in `aws-sdk-rust`,
but I suspect `prerelease: false` should be applied there as well given
the same `changelogger` is used.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-27 21:14:53 +00:00
Russell Cohen 35afb0a521
Retry additional classes of H2 errors (#3250)
## Motivation and Context
The original PR was accidentally removed in a bad merge.

## Testing
- Exact changes from original PR

## 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-11-27 13:38:22 -05:00
Miles Ziemer c62c9fba65
Remove incorrect defaults for iot (#3256)
## 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 -->
The IoT Smithy model we have is incorrect, resulting in some types being
generated as non-optional when they should be optional.

## Description
<!--- Describe your changes in detail -->
Removes the defaults of a few shapes for iot, which are meant to be
nullable. Can remove this when the model is fixed upstream.

Also changed some of the other shapes in RemoveDefaultsDecorator to use
the synthetic shape id, but this didn't impact generated code - just for
consistency.

## 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 IoT SDK and verified diff is expected

## 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._
2023-11-27 13:10:36 -05:00
AWS SDK Rust Bot 57c3d63716 Update changelog 2023-11-26 23:22:20 +00:00
Russell Cohen fd0034ec44
Fix s3 tests (#3257)
## Motivation and Context
Fix issue where S3 tests asserted on entire URI.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-26 17:40:07 -05:00
AWS SDK Rust Bot 1061a3b003 Update changelog 2023-11-25 14:19:17 +00:00
Russell Cohen 48e3c95a3f
Fix bug in is_virtual_hostable_s3_bucket (#3253)
An incorrect regex prevented `--` from being used in a bucket name

## 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._
2023-11-25 08:18:50 -05:00
Miles Ziemer 3d0cb5c3b1
Update formatter pre-commit hooks to 2.11 (#3244)
Was running into

https://github.com/macisamuele/language-formatters-pre-commit-hooks/issues/181
trying to run pre-commit. It was fixed in 2.11.

----

_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 <russell.r.cohen@gmail.com>
2023-11-24 14:15:05 +00:00
82marbag a9ef40b95c
Lifetimes in builders (#3249)
## Motivation and Context
We're not handling lifetimes in builders of structures.

----

_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-11-24 09:57:46 +00:00
AWS SDK Rust Bot 8754c99ba8
Merge smithy-rs-release-1.x.y back into main (#3248) 2023-11-22 14:33:36 -06:00
ysaito1001 bab0341337 Update changelog 2023-11-22 10:55:01 -06:00
ysaito1001 1686d6e39f Merge remote-tracking branch 'origin/smithy-rs-release-1.x.y' into merge-smithy-rs-release-1.x.y-to-main 2023-11-21 13:56:00 -06:00
AWS SDK Rust Bot 2d35dfd4ac Update changelog 2023-11-21 19:04:50 +00:00
AWS SDK Rust Bot e155c3048b Upgrade the smithy-rs runtime crates version to 1.0.1 2023-11-21 19:02:48 +00:00
ysaito1001 09e46f47d4
Disable dev preview for `CrateVersioner` (#3241)
## Motivation and Context
In this stable release branch, `CrateVersioner` needs to start
versioning SDK crates in a way they are stable.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-21 10:24:58 -06:00
ysaito1001 e8f771b141
Clean up remaining `TODO(GA)` from PR#3082 (#3245)
## Motivation and Context
This small PR cleans up remaining two `TODO(GA)` in #3082.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-21 10:24:30 -06:00
Russell Cohen 9a4de2bef7
Update ci.yml (#3247)
updates main to use rust-launch (needed to unbreak CI) until we change
to use rustv1 in the examples folder

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-21 15:44:11 +00:00
Miles Ziemer 2e0102672c
Remove some defaults for s3 control (#3246)
## 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 -->

S3 Control's PublicAccessBlockConfiguration is incorrectly modeled, and
all the members should be nullable. These members are not meant to have
a default, as you are meant to be able to configure one member at a time
- if you're just trying to turn BlockPublicAcls on, you don't want to
accidentally turn off IgnorePublicAcls. This change makes these members
nullable and is a break-fix.

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

Adds the members of PublicAccessBlockConfiguration to the RemoveDefaults
customization.
Also refactors the map of shapes to remove defaults from to avoid having
to call .shapeId everywhere.

## 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 the client and looked at 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 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-11-21 09:42:36 -05:00
Russell Cohen 115638bebb
Fix stalled stream detection (#3238)
A number of small issues in StalledStreamDetection came together to make
it ineffective in practice:
1. We didn't push a throughput `0` on `Poll::Pending`. This means that
if the stream goes to poll pending, the calculate throughput can never
get to 0.
2. Because we always considered the _entire_ throughput log, an actually
stalled stream creates a pathological case where most of the log is full
of fast moving data, but we are very slow to evict it and detect
slowness. With a 426 length log, it would effectively take 7 minutes for
it to actually get to 0.

For these two issues, I introduced a check-window (default 1 second) in
the throughput log. We only consider this much data when making the
calculation. To avoid undeseriable interactions with the check interval,
I reduced the check interval to 500ms. I think this is likely to be
better in practice at detecting stalled streams.

As a coincidence, this makes all the math exact so the tests are now
precise without floating epsilons.

Finally, in an unrelated issue, the `check_interval` wasn't actually
being used in the call to sleep, I fixed that as well and added a test.

In doing this, I tried to also simplify sine wave test into a test that
could be logically reasoned about. The previous test was producing
nonsense data (integer input to `sine` which is in radians as one
example). I replaced it with several tests that send data at one rate,
then suddenly stop sending data, simulating a stalled stream. These have
the nice property that it's easy to determine mathematically when the
stream should stall.

Side note: It's possible these bugs are what was making it not work for
request bodies? Needs more investigation. I didn't rerun that test.

After those issues were resolved, I was a little concerned about
performance when maxing out the network connection. A quick benchmark
showed there was a small regression. When data is flowing normally, the
426 item buffer is usually shorter than our default check window of 1
second. This allows for an optimization where we track the current total
amount of data in the buffer, allowing us to return the calculated
throughput in constant time.

During writing of the test, I discovered that we didn't actually expose
`Throughput` so I took that as an opportunity to change it to use `u64`
instead of `f64` for it's byte count representation.

## Testing
- [x] Manual test of downloading a file then turning off the wifi.
Verify that the connection is aborted within the grace period.

## 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-11-20 21:32:08 -05:00
Russell Cohen 505c0dbfd2
Use the `rust-launch` from the the docs repo (#3240)
## 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-11-20 21:30:19 -05:00
AWS SDK Rust Bot 26fc3fa84d
Merge smithy-rs-release-1.x.y back into main (#3237) 2023-11-20 15:37:56 -05:00
82marbag 05dea1ad30
Symbol provider to inject custom symbols (#3209)
## Description
Add a SymbolProvider that uses a custom trait to return the symbol.

## Testing
Unit tests.



----

_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-11-20 08:48:46 +00:00
AWS SDK Rust Bot 9a66e88ca5 Update changelog 2023-11-17 23:56:42 +00:00
AWS SDK Rust Bot f66f9246bc Upgrade the smithy-rs runtime crates version to 1.0.0 2023-11-17 23:54:55 +00:00
Russell Cohen 404f402e59
Feature-gate http versions in aws-smithy-runtime-api (#3236)
## Motivation and Context
Without this, we will have http = 0.2 permanently in-tree.

## Description
- Add feature gate for http 02x. 
- ~Add http 1x as an experiment.~

## 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._
2023-11-17 15:00:56 -08:00
ysaito1001 f17aeb4d53 Remove #[doc(hidden)] from stable crates (#3226)
This PR removes `#[doc(hidden)]` from types/functions in stable crates
(as defined in
[CrateSet.kt](ad520b080a/buildSrc/src/main/kotlin/CrateSet.kt (L19-L33))).
They are now `pub`, however, for those that are not intended to be used
directly, we preserve the original docs to be explicit about it.

After this PR, stable crates contain neither
<details>
<summary>#[doc(hidden)]</summary>

```
➜  smithy-rs git:(ysaito/remove-doc-hidden) rg -l '#\[doc\(hidden\)\]'
aws/rust-runtime/aws-http/src/user_agent.rs
CHANGELOG.next.toml
CHANGELOG.md
rust-runtime/aws-smithy-http/src/lib.rs
rust-runtime/aws-smithy-http/src/event_stream/sender.rs
rust-runtime/aws-smithy-http/src/event_stream/receiver.rs
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/error/ErrorImplGenerator.kt (this is only for CodegenTarget.SERVER)
codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/StructureGeneratorTest.kt
design/src/server/instrumentation.md
design/src/rfcs/rfc0039_forward_compatible_errors.md
design/src/rfcs/rfc0032_better_constraint_violations.md
design/src/rfcs/rfc0026_client_crate_organization.md
rust-runtime/aws-smithy-http-server/src/macros.rs
rust-runtime/aws-smithy-http-server/src/routing/mod.rs
rust-runtime/aws-smithy-http-server/src/shape_id.rs
rust-runtime/aws-smithy-http-server/src/body.rs
rust-runtime/aws-smithy-http-server/src/lib.rs
rust-runtime/aws-smithy-http-server/src/plugin/mod.rs
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/MapConstraintViolationGenerator.kt
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/CollectionConstraintViolationGenerator.kt
```
</details>

nor

<details>
<summary>DocHidden</summary>

```
➜  smithy-rs git:(ysaito/remove-doc-hidden) rg -l 'DocHidden'
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustType.kt
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerBuilderConstraintViolations.kt
```
</details>

<!--- 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: Russell Cohen <rcoh@amazon.com>
2023-11-17 14:34:17 -06:00
Russell Cohen caf86d3f98 Add Display impl for DateTime (#3235)
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
It implements Display trait For DateTime

<!--- If it fixes an open issue, please link to the issue here -->
https://github.com/smithy-lang/smithy-rs/issues/3161

## Description
<!--- Describe your changes in detail -->
I implemented Display trait for DateTime

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->

I used this test
```rust
    fn test_display_formatting() {
        // Create a DateTime instance for testing
        let datetime = DateTime {
            seconds: 1636761600, // Example timestamp (replace with your actual timestamp)
            subsecond_nanos: 123456789, // Example subsecond nanos (replace with your actual value)
        };

        // Expected RFC-3339 formatted string
        let expected = "2021-11-13T00:00:00.123456789Z";

        // Format the DateTime using Display trait
        let formatted = format!("{}", datetime);

        // Assert that the formatted string matches the expected result
        assert_eq!(formatted, expected);
    }
```

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

---------

Co-authored-by: Hakan Vardar <hakovardo123@gmail.com>
2023-11-17 14:34:17 -06:00
John DiSanti 04ede19216 Remove deprecations from rust-runtime (#3222)
This PR removes deprecations throughout smithy-rs client and the SDK.
Some of these deprecations were ignored by the compiler (in the case
where `#[deprecated]` was used with `pub use`), so these will need to be
explicitly called out in the changelog.

----

_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>
2023-11-17 14:34:17 -06:00
Miles Ziemer a055471ead Remove defaults for more services (#3228)
## 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 -->
Removing defaults from these shapes may not have a codegen impact since
these are in top level input, but doing this just to be safe from future
changes.

## Description
<!--- Describe your changes in detail -->
Adds more services/shapes to RemoveDefaultsDecorator, which will have
their models changed in the future. Also updates RemoveDefaults to allow
for members to be present in the list.

## 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. -->
- Updated unit test for RemoveDefaults
- Generated clients and looked at the output code

## 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._
2023-11-17 14:34:17 -06:00
Adam Steinberg 3d34cb7c40
Fix broken link in README.md (#3227)
## Motivation and Context
The link to the design documentation in the root-level README is broken.
It produces a 404 error.

## Description
I changed the link in the README from
`https://awslabs.github.io/smithy-rs/design` to
`https://smithy-lang.github.io/smithy-rs/design/`

## Testing
I clicked the new link and it worked :)

## Checklist
N/A

----

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