Commit Graph

249 Commits

Author SHA1 Message Date
Nicolas Farrier ff13b087fe
Run `cargo clippy` when building the Pokémon Service (#1742) 2022-09-21 11:26:02 +00:00
AWS SDK Rust Bot 7b27f376cd Update changelog 2022-09-20 12:42:29 +00:00
Vojtech Kral b02f9ade3c
aws-smithy-http-tower: Lower log level of two info logs (#1735) 2022-09-19 17:40:26 +00:00
Manuel Sugawara ffafbec885
Correctly determine nullability of members in IDLv2 models (#1725) 2022-09-16 17:11:09 -07:00
John DiSanti e6177b3dc2
Fix native Smithy client retry and retry response errors (#1717)
* Fix retry for native Smithy clients
* Treat `SdkError::ResponseError` as a retryable transient failure
* Rename `ClassifyResponse` to `ClassifyRetry`
* Rename 'policy' to 'classifier' in AWS SDK public API
* Rename `AwsResponseClassifier` to `AwsResponseRetryClassifier`

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-09-14 20:36:17 +00:00
John DiSanti 56f4be3207
Add customization to retry STS `IDPCommunicationErrorException` (#1718) 2022-09-09 17:25:43 -07:00
Zelda Hessler 4809a5b4fd
Remove the need for operation type aliasing in codegen (#1710)
* remove: need for operation type aliasing
rename: FluentClientGenerics.sendBounds params to be more accurate
update: FlexibleClientGenerics.sendBounds impl for readability
update: type of FluentClientGenerator input param `retryPolicyType` to be `Any` with a default of `RustType.Unit`
update: PaginatorGenerator to take retryPolicy as an input
chore: fix some spelling and grammar issues
remove: redundant `nextTokenEmpty` function from PaginatorGenerator

* Update CHANGELOG.next.toml

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

* add: `writable` property to RustType that returns the type as a Writable
add: test for RustType writable
add: `writable` property to RuntimeType that returns the type as a Writable
update: FluentClientGenerator to take a writable for retry

* format: run formatter

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-09-07 17:26:56 +00:00
David Oguns e3239e1a17
Flatten and remove mixins from code generation (#1680) 2022-09-06 16:00:42 -07:00
Zelda Hessler 50d88a5bf5
Feature: Customizable Operations (#1647)
feature: customizable operations
update: CHANGELOG.next.toml
update: RFC0017
update: add IntelliJ idea folder to .gitignore
add: GenericsGenerator with tests and docs
add: rustTypeParameters helper fn with tests and docs
add: RetryPolicy optional arg to FluentClientGenerator
move: FluentClientGenerator into its own file
2022-09-02 17:47:25 -05:00
John DiSanti 353d81c539
Improve manual config experience for SDK retries and timeouts (#1603)
* Remove `Default` implementation from `RetryConfig`
* Add use case integration tests
* Panic when retries/timeouts are enabled without a `sleep_impl`
* Combine the sleep, retry, and timeout customizations
* Add `sleep_impl` validation to the Smithy client builder
2022-09-01 17:12:06 +00:00
AWS SDK Rust Bot 2cb76641b6 Update changelog 2022-08-31 09:48:52 +00:00
Zelda Hessler 63afb41022
Add "invalid xml body root" check exemption for S3's `GetObjectAttributes` (#1665)
* add: ability for certain operations to be exempt from XML body root checking
* add: XML body root checking exemption for com.amazonaws.s3#GetObjectAttributesOutput
2022-08-27 02:08:02 +00:00
Zelda Hessler a65b1aaa8d
Update MSRV to 1.61.0 (#1672) 2022-08-25 15:43:35 -07:00
Russell Cohen fc1e1799da
Refactor endpoints to be Smithy-native (#1641)
* Refactor endpoints to be Smithy-native

* Add test to DynamoDb

* Fix clippy

* Fix some clippy errors and update changelog
2022-08-23 19:19:16 +00:00
David Oguns 7f4dad62a4
Update Smithy to 1.23.1 to support IDL 2 (#1623) 2022-08-19 13:29:05 -07:00
david-perez 7e7d571845
Refactor converters to numeric types for `aws_smithy_types::Number` (#1274)
Currently, conversions from `aws_smithy_types::Number` into numeric Rust
types (`{i,u}{8, 16, 32, 64}` and `f{32, 64}`) are always lossy, because
they use the `as` Rust keyword to cast into the target type. This means
that clients and servers are accepting lossy data: for example, if an
operation is modeled to take in a 32-bit integer as input, and a client
incorrectly sends an integer number that does not fit in 32 bits, the
server will silently accept the truncated input. There are malformed
request protocol tests that verify that servers must reject these
requests.

This commit removes the lossy `to_*` methods on `Number` and instead
implements `TryFrom<$typ> for Number` for the target numeric type
`$typ`. These converters will attempt their best to perform the
conversion safely, and fail if it is lossy.

The code-generated JSON parsers will now fail with
`aws_smithy_json::deserialize::ErrorReason::InvalidNumber` if the number
in the JSON document cannot be converted into the modeled integer type
without losing precision. For floating point target types, lossy
conversions are still performed, via `Number::to_f32_lossy` and
`Number::to_f64_lossy`.
2022-08-19 11:42:14 +00:00
Hugo Bastien 9ee45bfd44
feat: support for server `lambda_http::Request` (#1551)
Co-authored-by: david-perez <d@vidp.dev>
2022-08-19 10:13:07 +00:00
82marbag b98b160799
Allow `*` in ACCEPT header (#1646)
Allow `*` in ACCEPT header

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-08-18 17:20:59 +00:00
Weihang Lo e185990a0e
Support granular control of specifying runtime crate versions (#1635)
* Support granular control of specifying runtime crate versions

**BREAKING**: after this PR, `in smity-build.json` the path
`rust-codegen.runtimeConfig.version` no longer exists. Instead, a new
field `versions` comes in. It's an object mapping a runtime crate name
to a version string. There is also a special key `DEFAULT`, which is
presetted as detected runtime version but open to override. Crates
without version specified would be set as the same version as which
associated to key `DEFAULT`.

Signed-off-by: Weihang Lo <weihanglo@users.noreply.github.com>
2022-08-17 22:20:44 +00:00
Zelda Hessler e4e9a1d34f
fix: move smithy config customization into the smithy code generator (#1599)
* fix: move smithy config customization into the smithy code generator

* add: CHANGELOG entry

* update: tests

* fix: config codegen tests

* update: hide config fields and provide accessors instead

* fix: usage of private fields
add: accessor docs

* format: run ktlint

* fix: update more old code

* update: clone sleep_impl since that's why people access it

* update: CHANGELOG.next.toml

* Update CHANGELOG.next.toml

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-08-16 15:47:07 -05:00
John DiSanti 0f47f69ddf
Fix changelog template (#1638) 2022-08-16 18:59:10 +00:00
Burak 610d963df6
Add codegen version to generated package (#1621)
* Add codegen version to generated package metadata

* Update `CHANGELOG.next.toml`

* Remove unnecessary try-catch block from `smithyCodegenVersion`

* Add git commit hash to version

* Fix version filename

* Add tests for `Version`

* Store version in "$smithyRsVersion\n$gitCommitHash" format

* Make version parsing more strict
2022-08-12 11:35:55 +01:00
AWS SDK Rust Bot db48039065 Update changelog 2022-08-04 01:37:32 +00:00
John DiSanti a2ccdf70fb
Add `#[doc(hidden)]` to struct fields to encourage accessor use (#1573) 2022-08-03 01:26:04 +00:00
Weihang Lo e38db43ceb
Basic support of @deprecated trait in Smithy model (#1570)
* Add helper for creating deprecated attribute

* `Attribute.Custom.deprecated` is the main logic for building up
  `#[deprecated]` attribute
* `RustWriter.deprecatedShape` is the counterpart of `documentShape`,
  but we do not going to generalize it as what `documentShape` does.
  Deprecated is only for Rust code and probably won't be used in other
  output language.

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* Test `@deprecated` trait for RustWriter

* Support `@deprecated` trait for StructureGenerator

* Support `@deprecated` trait for UnionGenerator

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* Support `@deprecated` trait for EnumGenerator

* Support `@deprecated` trait for TopLevelErrorGenerator

* Support `@deprecated` trait for CombinedErrorGenerator

* Support `@deprecated` trait for ServerCombinedErrorGenerator

* Support `@deprecated` trait for FluentClient

* Support `@deprecated` trait for BuilderGenerator

* Cleanup leftover in test

* Use `dq()` helper method instead of escaping by hands

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* Leverage Kotlin null safety well

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* Allow `deprecated` rustc lint rule

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* Allow deprecated in unit tests

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* Leverage kotlin null safety check again

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

* changelog: Support @deprecated trait

Signed-off-by: Weihang Lo <whlo@amazon.co.uk>

Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
2022-07-28 19:02:55 +00:00
Oleksandr Kolomiiets 0f2fae1183
Change detailed logs in CredentialsProviderChain from info to debug (#1578) 2022-07-26 18:38:28 -07:00
Matteo Bigoi c7b97dcc02
Codegenerate Python application example and add explicit cast during JSON deserialization (#1520)
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-07-26 15:53:42 +00:00
Zelda Hessler 2ad87c0eed
feature: support flexible checksums (#1561)
feature: support flexible checksums
update: s3 model
update: CHANGELOG.next.toml
2022-07-26 15:14:49 +00:00
John DiSanti 7d2a6595f7
Add client creation example to SDK crate READMEs (#1571) 2022-07-25 22:30:03 +00:00
82marbag 3610085af9
Support server event streams (#1479)
* Support server event streams
* Rename EventStreamInput to EventStreamSender
* Custom event stream errors
* EventStreamSender and Receiver are parametrized also on event stream error types
* Pokemon service model updated
* Pokemon server event handler
* Pokemon client to test event streams
* EventStreamDecorator to make optional using SigV4 signing
* Use forInlineFun for all errors

Closes: #1157

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-07-25 13:24:06 -04:00
AWS SDK Rust Bot 700cee65ca Update changelog 2022-07-20 17:48:27 +00:00
John DiSanti 010a234832 Expose `sleep_impl` configuration in `SdkConfig` (#1556) 2022-07-20 09:42:28 -07:00
John DiSanti 1023c5035a Make `imds::Client` implement `Clone` (#1557) 2022-07-20 09:42:28 -07:00
John DiSanti d9ac9959de Don't warn about home dir expansion for default profile paths (#1558) 2022-07-20 09:42:28 -07:00
John DiSanti 32122ce285 Remove warning for valid IMDS provider use-case (#1559) 2022-07-20 09:42:28 -07:00
John DiSanti 6143d90197
Enable independent crate versioning for SDK crates (#1540)
* Update `hydrate-readmes` to take versions from `versions.toml`
* Add cleanup TODO comments to `changelogger`
* Update SDK readme template
* Split up `generate-version-manifest` subcommand
* Eliminate the `aws.sdk.version` property
* Fallback to model hash comparison if model metadata claims no changes
* Add `acquire-base-image` to `release.yml`
* Use empty model metadata for SDK generation in CI
* Fix the `aws-config` version number in SDK crate readmes
2022-07-19 12:27:45 -07:00
Zelda Hessler 298748a606
fix: misspelled name (#1554) 2022-07-19 17:21:19 +00:00
Zelda Hessler b32395bfcc
Feature: checksum related body-wrappers (#1502)
* add: checksum related body-wrappers
add: tests for checksum related body-wrappers

* add: aws-smithy-checksums to CrateSet.key

* add: missing base64::encoded_length fn

* update: use the checksum digest trait's output_size method to get checksum size
add: proptest for base64 encoded length
remove: old base64 encoded length test
remove: incorrect leftover comments and comment quotes

* remove: unnecessary pin

* remove: use of clone during checksum finalization
refactor: checksum fns are no longer fallible
refactor: HttpChecksum is now responsible for reporting size correctly
fix: don't consider trailers as part of ChecksumBody size hint

* remove: Taken error state
update: prefer if-let to match
fix: incorrect is_end_stream impl
refactor: use default trait impl for HttpChecksum::header_value

* fix: clippy lint

* add: header value tests

* undo: accidental retry changes

* add: http-checksum-related errors

* refactor: break up and modularize body wrappers
update: docs
update: ChecksumValidatedBody::new now takes a Box<dyn HttpChecksum>

* fix: broken test

* refactor: rename checksum body structs to be differentiated only by their module
2022-07-18 12:51:10 -05:00
Zelda Hessler 70c6a02555
update: impl From<DynConnector> for HttpConnector (#1549)
update: CHANGELOG.next.toml
2022-07-18 15:33:48 +00:00
Zelda Hessler e6005fb191
Feature: make retry strategy exponential backoff multiplier configurable (#1548)
* feature: make retry strategy backoff configurable
update: smithy client to respect configurable backoff
update: CHANGELOG.next.toml

* fix: calculate_exponential_backoff

* update: make the backoff calculation simpler
update: default backoff multiplier to be 1 second to better match previous retry behavior

* update: retry builder backoff multiplier default

* rename: backoff_multiplier to initial_backoff
update: calculate_exponential_backoff tests for readability

* remove: copypasted code

* update: CHANGELOG.next.toml
2022-07-15 11:22:47 -05:00
Josh Triplett c6193bd31d
`aws-config`: Fix compilation error with `rustls` and `native-tls` disabled (#1533)
* `aws-config`: Fix compilation error with `rustls` and `native-tls` disabled

The `ProviderConfig::with_tcp_connector` method uses
`aws_smithy_client::hyper_ext`, which only exists with the
`client-hyper` feature enabled. Add a feature enabling that, and enable
it by default.

Introducing this feature does not cause breakage, because aws-config
did not previously compile with `default-features = false` and neither
`rustls` nor `native-tls` enabled.

* CHANGELOG.next.toml: Update for aws-config compilation fix

* Fix doctest by adding feature gate

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-07-13 11:26:09 -05:00
David Calavera b1d50b5611
Re-export aws_types::SdkConfig in aws_config (#1457)
* Re-export aws_types::SdkConfig in aws_config

This way people that want to access that structure don't have to add aws_types.

Signed-off-by: David Calavera <david.calavera@gmail.com>

* Add entry about SdkConfig to the changelog

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-07-06 00:05:30 +00:00
Zelda Hessler b77c66cbf7
Feature: add support for aws-chunked content encoding (#1501)
* add: support for unsigned aws-chunked content encoding

* add: aws-smithy-checksums to CrateSet.key

* refactor: API of AwsChunkedBodyOptions
update: AwsChunkedBody to note we only support single chunks
remove: unnecessary `Option`s
remove: overly smart total_length_of_trailers_in_bytes in trailers_as_aws_chunked_bytes
update: use "where"-style declaration for `impl<Inner> Body for AwsChunkedBody<Inner>`
add: helpful data to trace logging
add: trailer len double check in AwsChunkedBody::poll_data
add: test for trailer len double check
add: assert to size_hint
fix: incorrect body emitted when body is empty
add: test for empty encoded body

* Update CHANGELOG.next.toml

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

* update: CHANGELOG.next.toml message

* refactor: aws-chunked trailer encoding and size calculation
update: when aws-chunked formatting a `HeaderMap`, header names with multiple values will be written out one value per line
remove: unnecessary AwsChunkedBodyOptions::stream_length method
add: trace fields
refactor: make inserting the final body CRLF more explicit
add: test to ensure trailer encoding and trailer len calculation stay in sync

* udpate: emit error instead of panicking for incorrect trailer length

* add: test ensuring trailer serialization and length calculation stay in sync for empty HeaderMap

* update: avoid repeated allocations in trailers_as_aws_chunked_bytes
fix: don't convert to str before getting len of HeaderValue

* add: aws-chunked body test for inner bodies that emit intermittent chunks
add: double check that stream_length used to create an `AwsChunkedBody` is correct.

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-07-05 11:36:14 -05:00
AWS SDK Rust Bot 334f6dd203 Update changelog 2022-06-28 23:05:33 +00:00
Zelda Hessler 3f108165aa
Update: swap pin-project for pin-project-lite (#1503)
* update: swap pin-project for pin-project-lite
* remove: pin attribute from `aws_smithy_http::body::Inner::Once` enum variant
* remove: unnecessary usage of pin-project
* Update CHANGELOG.next.toml

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-06-28 14:01:39 -05:00
Kyle Thomson ed04cbcfe8
Fix platform issue when determining module name from file (#1505) 2022-06-28 11:56:59 +00:00
Joseph Klix 424d736768
Docker hop limit (#1449)
* Docker settings

add note on settings needed when using sdk inside docker container

* update changelog.next

* move to group relevant info

* mark code snippet as txt
2022-06-27 17:07:23 -04:00
Russell Cohen b88d72e237
Add a trailing slash to iam/security-credentials/ when querying IMDS (#1487) 2022-06-23 20:09:54 +00:00
Russell Cohen edb1394561
Upgrade to Gradle 7 (#1411)
* Upgrade to Gradle 7

* Document the upgrade and update changelogs
2022-06-23 12:27:43 -04:00
AWS SDK Rust Bot 5b49350037 Update changelogs 2022-06-22 21:20:42 +00:00
Russell Cohen 1446681c0a
Add support for retrying individual call timeouts (#1478)
When timeout support was added initially, the resulting error `SdkError::TimeoutError` was never added to the retry policy which prevented these errors from being retried. This was a bug—This commit rectifies the and adds two integration-level tests that ensure that timeouts are properly retried.
2022-06-21 17:37:04 +00:00
Zelda Hessler 2f2db5a637
rename: hosted_zone_preprocessor.rs to route53_resource_id_preprocess… (#1472)
* rename: hosted_zone_preprocessor.rs to route53_resource_id_preprocessor.rs
update: trim_hosted_zone to work for more resource ids
add: new Route53 protocol test for GetChange resource id trimming
update: InlineDependency.forRustFile to accept filenames with a ".rs" extension
add: CHANGELOG.next.toml entry
2022-06-16 14:37:01 -05:00
Zelda Hessler 04eeb4ff13
update: simplify and fix a latent issue with bytestream's streaming impl (#1461)
update: print helpful panic message for users on 32bit systems that try to stream large bodies
update: CHANGELOG.next.toml
2022-06-15 20:18:20 +00:00
Russell Cohen b45c1f03d8
Fixes for RustWriter bugs #1465 & #1459 (#1467) 2022-06-15 16:20:47 +00:00
John DiSanti ea2ae7bfc6
Add lints to `aws-config` (#1421)
* Add `unreachable_pub` lint to `aws-config`
* Add `missing_debug_implementations` lint to `aws-config`
* Add `rust_2018_idioms` lint to `aws-config`
* Update changelog
2022-06-13 20:34:11 +00:00
Russell Cohen 6e3e010e91
Relax behavior of profile parser (#1458)
- Fixes aws-sdk-rust#547

Previously, if no default profile was defined and no explicit profile was selected, the profile file provider would return an error. This relaxes that behavior to allow provider chains to move onto the next provider when that is the case.
2022-06-13 14:47:59 +00:00
AWS SDK Rust Bot 7b5954ed8f Update changelogs 2022-06-09 22:53:53 +00:00
Jesse Szwedko 53fab07a46
Add support for `credential_process` from profiles (#1356)
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-05-26 14:01:50 -07:00
Petros Angelatos bb9f2dc111
Use md5 implementation of RustCrypto organization (#1404) 2022-05-24 10:36:03 -07:00
Zelda Hessler 75d50dd157
feature: conversion method for `ByteStream` into `AsyncRead` implementor (#1391)
* feature: conversion method for ByteStream into AsyncRead implementor
add: impl From<byte_stream::Error> for std::io::Error
add: CHANGELOG.next.toml entries

* fix: unused dep

* add: docs
2022-05-16 22:34:54 +00:00
alonlud 5620922d23
Add excluded headers option to `aws-sigv4` (#1381) 2022-05-16 14:02:02 -07:00
AWS SDK Rust Bot 9db2a737c4 Update changelogs 2022-05-13 17:56:33 +00:00
82marbag 154c5d1bd0
Update crates to Rust 2021 (#1388)
Generate crates using Rust 2021 instead of Rust 2018
Remove use std::convert::TryFrom which is in the prelude

Closes #1332

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-05-13 14:28:52 +01:00
Zelda Hessler 34369e2dc0
Update `FsBuilder`-based `ByteStreams` to support file offsets (#1361)
* add: offset setter to FsBuilder
remove: file_size setter from FsBuilder
add: length setter to FsBuilder
add: test for ByteStream w/ offset
add: test for ByteStream w/ length less than file size
update: path_based_bytestreams_with_builder test

* add: test ensuring offset and length work correctly together
add: test ensuring that no data is returned when offset is greater than file size
add: test ensuring that nothing breaks if length to read is larger than file size

* add: chunking test
add: CHANGELOG.next.toml entry
refactor: new code based on PR comments

* remove: unused use statement

* refactor: length API

* update: prefer unwrap() to returning error in tests

* update: prefer unwrap() to returning error in tests
add: test for Length::Exact behavior

* update: error if offset is greater than file length

* fix: test to work with new offset error

* update: error test to be more specific
2022-05-10 21:41:24 +00:00
John DiSanti 3aab82749b
Add a debug log entry for retries (#1352) 2022-05-02 18:02:09 +00:00
Russell Cohen 9b6210c105
Release (#1351)
* Bump version numbers in gradle.properties

* Add auto-changelog script

* Update models, holding back S3

* Update CI to 1.58.1
2022-04-28 22:24:21 +00:00
Ryan Scott Brown bea5f1d2c3
fix: Silence home directory warning in Lambda Extensions (#1344)
* fix: Silence home directory warning in Lambda Extensions

This PR follows on to https://github.com/awslabs/smithy-rs/pull/893 which added
LAMBDA_TASK_ROOT check. When running as a [Lambda Extension][ext]
the environment variable for TASK_ROOT is redacted, so it is not
reliable for testing whether you are in Lambda.

Related commit: fbb4bc

[ext]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html

* update changelog

* fixup: use AWS_LAMBDA_FUNCTION_NAME which is available in both environments

* Update CHANGELOG.next.toml

* Fix failing unit test

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-04-26 20:19:34 -07:00
Zelda Hessler 1372754f42
add: callback trait proposed in rfc#0012 (#1329)
* add: callback trait proposed in rfc#0012
add: callback setting API to ByteStream
add: callback setting API to SdkBody
add: callback tests for streaming and buffered data
add: private callback fns for calculating checksums
udpate: pub methods on private struct `Inner` to be private
update: changelog
remove: Sync bound from SdkBody test "sdk_body_is_send()"
add: fn to merge `HeaderMap`s by appending
add: tests for new functionality

* add: Sync bound to callbacks
refactor: poll_trailers method
update: split out checksum callbacks into their own module
formatting: use throwaway let binding instead of allow unused variable

* add: license file to new crate
add: readme file to new crate

* add: missing anchor to Cargo.toml

* rename: aws-smithy-checksum-callbacks to aws-smithy-checksums
add: two more append_merge_header_maps tests
update: make append_merge_header_maps pub(crate)
remove: check for non-existent log line

* remove: doc test for private fn

* update: checksum callback struct names
2022-04-21 12:51:01 -05:00
John DiSanti 27acbc6d30
Upgrade Smithy (#1330)
* Upgrade to Smithy 1.16.2

* Remove extra test fixed in Smithy 1.16.2

* Upgrade to Smithy 1.16.3

* Remove extra test fixed in Smithy 1.16.3

* Remove failing expectation from server tests

* Upgrade to Smithy 1.17.0

* Upgrade to Smithy 1.18.1

* Upgrade to Smithy 1.19.0

* Upgrade to Smithy 1.21.0

* Update changelog

* Fix Gradle repositories
2022-04-21 09:22:35 -04:00
Zelda Hessler 52b808ec13
update: MSRV from 1.56.1 to 1.58.1 (#1325)
* update: MSRV from 1.56.1 to 1.58.1

* update: CHANGELOG.next.toml
fix: cdk rust issues

* Update CHANGELOG.next.toml

* Update CHANGELOG.next.toml
2022-04-15 14:01:18 -05:00
Zelda Hessler d16ee113ad
Prepare for 2022-04-13 release (#1317)
* update: models for release

* update: Changelogs for release
update: gradle properties for release
2022-04-13 11:00:30 -05:00
Nikhil Benesch b7a8eb5824
Add endpoint resolver to SdkConfig (#1300)
* Add endpoint resolver to SdkConfig

This commit adds an `endpoint_resolver` field to SdkConfig, which flows
through to the `endpoint_resolver` field on each individual service
configuration. To avoid a circular dependency between the aws-types
crate and the aws-endpoint crate, the `AwsEndpoint` type and its
dependencies are moved from the aws-endpoint crate to the aws-types
crate, then rexported in aws-endpoint.

Fix aws-labs/aws-sdk-rust#396.

* impl From<'static str> for signing service and signing region

* Code generate for the static string implementation

* Add EndpointResolver to aws_config

* Add docs and adapt test

* Fix test

* Fix endpoint config customizations test to remove dead code

* Re-add `.set_endpoint`

* Remove print and update changelog

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-04-12 17:51:50 +00:00
Nikhil Benesch 3aa1e36b6f
aws-smithy-query: bump to urlencoding v2.1 (#1301)
* aws-smithy-query: bump to urlencoding v2.1

* Add changelog entry for urlencoding update

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-04-04 15:05:18 -07:00
Russell Cohen 6e8c1d873e
Improve AssumeRoleProvider (#1296)
This adds to improvements to `AssumeRoleProvider`:
1. This adds a cache aroudn this provider. Since this provider is intended to be used directly by customers,
it should be cached to improve performance and predictability.

2. Add support for configuring the role session length.
2022-04-01 12:30:53 -07:00
Rob Speller bd38d0dd1e
fix: treat blank env credentials as missing (#1272) 2022-03-29 16:53:13 -07:00
Zelda Hessler da8d59e0a1
fix: incorrect issue reference (#1270) 2022-03-22 22:23:35 +00:00
Zelda Hessler b2c989630f
Update to Rust Edition 2021 (#1268)
* update: set rust edition to 2021
update: strict param of intoCrate to set clippy to set #![deny(clippy::all)]

* add: changelog entry
2022-03-22 21:29:04 +00:00
Bin Liu 622712058f
Fix developer guide URL (#1262)
* Update README.md to fix invalid Developer Guide URL

The old guide:
https://github.com/awslabs/aws-sdk-rust/blob/main/Guide.md

has been deleted and changed to:
https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html

See: https://github.com/awslabs/aws-sdk-rust/pull/325

Signed-off-by: bin liu <liubin0329@gmail.com>

* Update invalid Developer Guide URL in AwsReadmeDecorator.kt

The old guide:
https://github.com/awslabs/aws-sdk-rust/blob/main/Guide.md

has been deleted and changed to:
https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html

See: https://github.com/awslabs/aws-sdk-rust/pull/325

Signed-off-by: bin liu <liubin0329@gmail.com>

* Add fixing Developer Guide link to  CHANGELOG.next.toml

Signed-off-by: bin liu <liubin0329@gmail.com>

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-03-21 15:20:25 +00:00
John DiSanti 61b0a8a8e5
Prepare for release (#1261)
* Update AWS models

* Version bump

* Revert S3 model update

* Update changelogs

* Update endpoints config
2022-03-17 14:18:46 -07:00
Zelda Hessler 3eaddcf738
Add default list of http versions to request property bag (#1258)
* add: default list of http versions
add: type alias for list of http versions
add: decorator to add desired http versions to property bag
fix: gradle warning for argument "model"
update: CHANGELOG

* fix: clippy lint

* update: use more accurate name for test RustCodegenDecorators
rename: HttpVersionListGenerator.kt to HttpVersionListCustomization.kt
update: HttpVersionListCustomization to grab versions from models when possible
fix: various docs issues reported by IDE
add: new "Extras" section to ServiceConfig
update: code broke by "Extras" change
add: tests for http version sniffing
2022-03-17 08:09:01 -05:00
Zelda Hessler 107194f106
Timeouts refactor (#1246)
* rename: in aws_smithy_types, timeout::TimeoutConfig is now timeout::Config
update: timeout::Config now wraps 3 config structs (Http, Tcp, Api)
update: aws_config timeout setting to work with timeout::Config changes
update: providers to work with new timeout config structure
update: codegen to work with new timeout config structure
update: CHANGELOG.next.toml

* add: missing copyright header

* update: impl From instead of Into for timeout conf
fix: clippy lints

* fix: service config codegen for timeouts

* fix: broken doc tests

* fix: bad doc link

* update: transfer aws_types::Config changes to new aws_types::SdkConfig

* fix: two outdated doc tests

* Apply suggestions from code review

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

* undo: doc change for timeout env vars
refactor: move parse_str_as_timeout to aws_config and privatize it
update: aws_config code for parse_str_as_timeout
move
remove: comments from private struct members
update: comments for pub struct methods

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-03-11 11:35:13 -06:00
Zelda Hessler e6d09ea686
Rename `aws_types::config::Config` to `sdk_config::SdkConfig` (#1241)
* rename: aws_types::config::Config to sdk_config::SdkConfig
update: code affected by SdkConfig rename
update: CHANGELOG.next.toml

* update: reëxport SdkConfig from aws_types root module

* Update aws/rust-runtime/aws-config/src/lib.rs

* Update CHANGELOG.next.toml

Co-authored-by: Russell Cohen <rcoh@amazon.com>

* add: deprecated config helper
update: use reexported SdkConfig in docs referencing it

* fix: bad doc link
fix: wrong deprecation version

* Revert "fix: bad doc link"

This reverts commit eaa1b68e3b.

* fix: try new link style

* add: deprecation notice for `aws_types::config` module

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-03-10 19:55:08 +00:00
Russell Cohen 3a54b91359
Enable presigning for two more S3 operations (#1242) 2022-03-09 13:27:03 -05:00
Zelda Hessler e42aa10ac3
Update: impl `Clone` for `DynMiddleware` (#1226)
* update: make DynMiddleware cloneable
rename: BoxCloneLayer to ArcCloneLayer
update: make ArcCloneLayer cloneable

* update: CHANGELOG.next.toml
2022-02-25 10:58:41 -06:00
John DiSanti f7e1f0836e
Prepare for `v0.38.0` release (#1223)
* Update changelogs

* Update AWS models

* Version bump
2022-02-24 19:51:00 +00:00
John DiSanti 4ff8dc6d8b
Make it possible to configure the default credentials cache (#1220)
* Make it possible to configure the default credentials cache

* Update changelog

* Add settings directly to the `DefaultCredentialsChain` builder

* Improve doc comments for `load_timeout`
2022-02-24 19:04:45 +00:00
John DiSanti b989a8d059
Fix presigning bug with `content-length` and `content-type` in S3 (#1216)
* Fix presigning bug with `content-length` and `content-type` in S3

* Fix presigning test in `aws-sigv4`

* Update changelog

* Clean when generating code for diff preview

* Incorporate feedback

* Fix server codegen

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-02-24 11:30:45 -06:00
John DiSanti 801808061a
Make `rustls` and `native_tls` client builder helpers dyn (#1217)
* Make `rustls` and `native_tls` client builder helpers dyn

* Update changelog
2022-02-23 10:58:10 -08:00
John DiSanti e1099324e1
Replenish cross-request retry allowance on successful response (#1197)
* Replenish cross-request retry allowance on successful response

* Update changelog

* Rename `NotRetryable` to `UnretryableFailure` and fix credential retry classifiers

* Incorporate feedback
2022-02-22 12:58:24 -08:00
John DiSanti 375e0b2b82
Hide external buffer types used by `primitive::Encoder` in aws-smithy-types (#1209)
* Fix exit status in `api-linter`

* Run `api-linter` against `aws-smithy-types` in CI

* Hide external buffer types used by `primitive::Encoder`

* Unpin nightly in CI

* Make `Encoder` a struct and split out an inner enum

* Update changelog
2022-02-22 20:05:02 +00:00
Russell Cohen 058f28e4a6
Release 0.7.0 (#1202)
* Update changelogs

* Sync models

* bump versions
2022-02-18 10:31:13 -05:00
John DiSanti 548f6ed430
Fix the hardcoded credentials example in `aws-types` (#1180) 2022-02-11 16:16:53 -08:00
Zelda Hessler bd6b65bd6b
fix: region provider now respects chained profiles (#1183)
* fix: region provider now respects chained profiles
update: profile chain creation for load_credentials

* update: CHANGELOG.next.toml

* Update aws/rust-runtime/aws-config/src/profile/region.rs

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-02-11 22:39:22 +00:00
Zelda Hessler a1f065272b
HTTP Connectors Refactor pt.1 - Laying the groundwork (#1144)
* refactor: HttpSettings, HttpConnection location
update: replace timeout::Settings with TimeoutConfig
add: HttpConnector to aws_types::Config and Builder
refactor: divide default_provider.rs modules into separate files

* add: missing copyright headers

* add: missing http_connector accessor to Config

* remove: unused import

* update: undo changes to aws_config::connector module
remove: impl Default for HttpConnector

* update: CHANGELOG.next.toml
2022-02-04 20:17:31 +00:00
Zelda Hessler 4c7515f6a8
fix: Client's fluent builder doc links now correctly link to raw identifiers (#1142)
* fix: don't escape member names in doc links

* update: CHANGELOG.next.toml

* update: use docLink to format builderInputLink

* Apply suggestions from code review

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

* remove: "r#" prefix from reserved word names in docs

* leave: "r#" prefix from reserved word names in docs
giving the people what they want

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-02-02 18:42:14 +00:00
John DiSanti 4029afd439
Eliminate SDK client generics (#1132) 2022-02-01 13:52:45 -08:00
Russell Cohen b79cb2658b
Remove unneeded doc parser (#1123)
* Remove unneeded doc parser

* Maintain identical behavior for empty documents

* Changelog
2022-01-28 18:18:56 -05:00
John DiSanti a183f1246b
Move re-exports into `types` and re-export `AggregatedBytes` (#1085)
* Move re-exports into `types` and re-export `AggregatedBytes`

* Remove extra newline from changelog generator

* Only re-export types when they're used

* Re-export `Config` and `Client` with `#[doc(inline)]`

* Update changelog

* Fix the canary build

* Don't check examples in full services check
2022-01-28 10:11:42 -08:00
John DiSanti dac48166c1
Bump MSRV to `1.56.1` (#1130) 2022-01-27 17:36:55 -08:00
John DiSanti ed3daf613e
Prepare smithy-rs `0.36.0` release (#1122)
* Version bump

* Update service models

* Update changelogs
2022-01-26 10:47:42 -08:00
Zelda Hessler 5b6965aae1
Add conversion methods for `PresignedRequest` and update docs (#1116)
* update: s3 presigning example with curl command generator
add: impl into for PresignedRequest -> http::request::Builder
sort: cargo deps

* update: CHANGELOG.next.toml

* appease: clippy

* add: struct conversion doc links
add: fn for PresignedRequest -> http::Request<B>
update: expand presigning example

* update: changelog
move: declaration of From<PresignedRequest> for http::request::Builder

* remove: leftover import
2022-01-26 18:09:31 +00:00
mchoicpe-amazon e0f01933ae
Provide SigningService creation via owned String (#1114) (#1120) 2022-01-25 15:23:21 -08:00
John DiSanti 39e33163e6
Take SDK examples from `awsdocs/aws-doc-sdk-examples` (#1118)
* Split SDK service checks from example checks

* Delete examples

* Take examples from `aws-doc-sdk-examples`

* Fix example checkout

* Fix example manifests after relocation

* Update changelog
2022-01-25 22:24:13 +00:00
Russell Cohen a411bc3b34
Endpoint docs & aws-config spans (#1087)
* Add more details to custom endpoint docs

* Cleanup aws-config spans

* Cleanup aws-config spans

* Cleanups & update changelog
2022-01-25 21:16:42 +00:00
Zelda Hessler f4d3910f22
prepare for release of 0.35.2/0.5.2 (#1103) 2022-01-20 14:06:33 -08:00
Russell Cohen 88aaa3308b
Sync script needs gradle clean (#1100)
* Sync script needs gradle clean

* Update changelogs
2022-01-20 12:30:47 -05:00
Russell Cohen 18998f3ff3
Changelogs (#1090)
* Update changelogs

* Update versions
2022-01-19 14:58:50 -08:00
Russell Cohen 3e15e4a90c
Add SSO to the list of circular dep supressions (#1089)
* Add SSO to the list of circular dep supressions

* Update CHANGELOG.next.toml

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-01-19 22:08:53 +00:00
Zelda Hessler c7ff41707c
release v0.35.0 (#1088)
* release v0.35.0

* update: aws models
2022-01-19 16:23:44 +00:00
Russell Cohen 21ffa905db
Fix paginator bug where `None` was returned immediately (#1083)
* Fix paginator bug where `None` was returned immediately

The escape hatch added by aws-sdk-rust#391 did not properly handle the case where the first response was `None` and _not_ the empty string. This diff:
- Checks for emptiness for both maps and strings
- Fixes the check so that an initial `None` input does not cause an incorrect paginator error

* Update changelog

* Apply suggestions from code review

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* rustfmt

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-01-18 12:46:53 -05:00
John DiSanti 38fc65da5f
Add changelog entry for #1065 (#1074) 2022-01-13 18:13:26 -08:00
John DiSanti 4bbc677c5a
Fix several warnings and reduce Rust target clobbering (#1069) 2022-01-13 16:45:04 -08:00
John DiSanti c25c24d0f9
Upgrade Smithy to 1.16.1 (#1053) 2022-01-12 15:35:40 -08:00
Russell Cohen 00bc624a87
Add Support for SSO (#1051)
* Add Support for SSO

This commit adds support for the SSO credential provider, which enables the aws-config to support using SSO when specified in `~/.aws/config`.

* Rename & add test of configuration failure

* Add SSO to the smoke test list

* CR improvements

- Improve error messages
- zeroize token
- add track_caller to improve test failure error messages

* Apply suggestions from code review

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

* Update changelogs

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-01-11 13:42:11 -05:00
Zelda Hessler 15eb1c0841
add: links to related types for fluent builders (#1022)
* add: links to related types for fluent builders

* update: CHANGELOG.next.toml

* update: generate fancy documented lists

* refactor: put docs on client builder methods instead of fluent builder
rename: generateShapeMemberList -> generateShapeMemberDocs
refactor: move generateShapeMemberList to FluentClientDecorator.kt
update: appease spellchecker

* remove: extra line in docs

* remove: unnecessary snake case conversion
2022-01-11 00:46:34 +00:00
Russell Cohen 2b90cc9b11
Cut release (#1055) 2022-01-10 18:19:44 +00:00
Russell Cohen 2e50dab45d
Fix bug where paginators looped forever on empty string next token (#1054)
* Fix bug where paginators looped forever on empty string next token

* Update changelogs
2022-01-10 11:38:29 -05:00
Nicolas Moutschen a5554e0691
fix: typo for _X_AMZN_TRACE_ID (#1052)
* fix: typo for _X_AMZN_TRACE_ID

* chore: add entry to CHANGELOG.next.toml

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-01-10 09:35:59 -05:00
Zelda Hessler 9be54c9ee6
prepare for release of smithy-rs 0.34 (#1047)
* prepare for release

* remove: extra backtick
2022-01-06 19:04:35 +00:00
Russell Cohen 0592a1bad4
Fix IMDS bug where the profile was cached (#1046)
* Fix IMDS bug where the profile was cached

* Update changelog

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-01-06 11:19:30 -06:00
Zelda Hessler df150737a3
remove: telephone-game example (#1043)
update: CHANGELOG.next.toml
2022-01-06 15:57:14 +00:00
Russell Cohen a77c5ca2a9
Add support for Paginators (#1006)
* Add Support for Paginators

This commit adds pagination support for both clients. It does this via the `FnStream` abstraction which combines a rendezvous-channel with a closure to produce a stream. When the stream is polled, the underlying closure is polled to advance the computation which then pushes data into the channel.

Two paginators are generated:
1. `.paginate()` which produces a stream of `Result<Page, Err>`
2. `.paginate().items()` which produces a stream of `Result<Item, Err>` where items are flattened from the individual pages. This uses `TryFlatMap` to support conveniently generating a flat page iterator.

In addition, docs are generated to point customers towards the paginators.

* Add RFC, more tests

* backout unrelated changes

* Fix paginators for glacier

* Fix clippy error

* Add test for paginators that point to maps & fix apigateway paginator

* Fix docs

* remove extraeneous println

* Fix DynamoDB examples

* Disallow paginating operations with the idempotency token trait

* Apply suggestions from code review

misc typos / cleanups

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

* CR feedback

* Fix typo

* Update changelog

* Apply suggestions from code review

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

* CR feedback round 1

* Rename paginate to into_paginator()

* update pr bot comment

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-01-05 17:46:57 +00:00
Kyle Thomson 36faba8ee6
add: function that exposes profile names (#1021)
* add: function that exposes profile names

* code style

* formatting

* changelog
2021-12-30 23:24:59 +00:00
Zelda Hessler 4dc75bb21c
fix: in generated docs, convert bare anchor tags to pre (#1019)
* fix: in generated docs, convert bare anchor tags to pre

* update: CHANGELOG.next.toml

* update: use html transformation instead of regex find/replace

* Update codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt
2021-12-30 15:38:10 -06:00
Russell Cohen 40cab68886
Aws config feature simplification (#1017)
* Massively simplify features in aws-config

* Update example

* Update changelog

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2021-12-30 18:41:10 +00:00
Jacco Kulman 9708aa8307
Clone-able structs (#985)
* Clone-able structs

* Change log entry

* Update CHANGELOG.next.toml

Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>

* Added two Clone directives and integration test

Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-12-30 11:15:01 -05:00
Jacco Kulman 1992bf3fa6
Examples for Config builder region function (#1008)
* region function documented

* Example changelogs back

* Solve doc error

* text fixes (still fails)

* added back changelog items accidently removed

* refactor and fix test

* fix test

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-12-30 15:02:09 +00:00
Zelda Hessler d9ffac3c96
update: don't generate useless Into<impl T> (#1010)
* update: don't generate useless Into<impl T>

* update: changelog

* remove: unnecessary into

* update: use helper fns to generate shared code

* refactor: simplify type-to-argument converter and make it act on all RustTypes
update: fixes predating this PR
2021-12-29 16:57:19 -05:00
Russell Cohen cbd61ab1ff
Add recursion detection middleware to the default middleware stack (#1003)
* Add recursion detection middleware to the default middleware stack

Side refactorings:
- move AWS retry logic into its own module
- small update to protocol test to make it a little easier to use

* fixups

* Fix clippy

* Add more tests and comments
2021-12-27 18:04:10 +00:00
Russell Cohen e9bd850d1a
Add Clone derive to aws_types::Config (#1002)
* Add Clone derive to aws_types::Config

* changelog

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2021-12-23 15:03:26 -05:00
Russell Cohen e559e4cf59
Add Route53 Hosted Zone Trimming (#999)
* Add Route53 Hosted Zone Trimming

Route53 requires a customization where `/hostedzone/` is stripped from hosted zone arguments when round-tripped. This adds a trait and customization to the route53 model to trim hosted zone prefixes.

* Add missing copyright header

* Also allow no leading slash

* Add route53 to smoke test because it has unit tests

* Update changelog

* Add missing call to flush()

* Remove unused env_logger depedendency
2021-12-21 19:19:32 +00:00
Russell Cohen 898cc93d28
[fix] Sleep not passed to ECS provider (#998)
* [fix] Sleep not passed to ECS provider

When constructing an ECS credential provider, sleep_impl was not properly passed along from the provider config. This adds a test that asserts that retries will be made, and fixes the bug.

* Fix clippy lint

* Update changelog

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2021-12-21 13:36:40 -05:00
Russell Cohen 2e7ed94351
Fix numerous todos & attach them to issues (#973)
* Fix numerous todos & attach them to issues

* Update changelog

* remove unused import in sigv4
2021-12-16 16:27:47 +00:00
John DiSanti 6325c8a277
Move additional-ci step into SDK smoke test (#961)
* Move additional-ci step into SDK smoke test

* Add `cargo hack` test to `aws-config` and make it pass

* Fix warning introduced by merge

* Incorporate feedback

* Fix native-tls example
2021-12-15 18:40:51 -08:00
Russell Cohen 35ac555e0f
Release v0.33.1 (#980)
* Bump version

* Changelogs
2021-12-15 12:46:07 -05:00
Russell Cohen cf2034f9cf
Smithy Client cannot be an optional dependency (#979)
* Smithy Client cannot be an optional dependency

* Update changelogs
2021-12-15 16:57:46 +00:00
John DiSanti d5750d48af
Include non-service-specific examples in the generated workspace (#957)
* Include non-service-specific examples in the generated workspace

* Update changelog

* Fix missing dependency for compilation

* Fix typo in Kinesis example
2021-12-15 00:58:16 +00:00
Russell Cohen b9d5923ab3
Release 0.3.0 / 0.33.0 (#974)
* Fixup changelog generation

* Delete superceded changlog guidance

* Update changelogs

* Bump version numbers
2021-12-14 16:43:17 -05:00
Zelda Hessler e63b827ada
Fix query string signing bug (#965)
* update: use shared encoder definition when encoding url paths, query strings
add: query string writer test
add: changelog entry for bugfix

* format: test file

* fix: integration test
add: ", ^, `, \, (space), {, }, and | to list of chars to percent encode

* add: tracing and tracing-subscriber dep to generated integration tests

* add: canonical req query param test
remove: obsolete LABEL_SET ascii set

* fix: outdated aws-hyper import
2021-12-14 10:12:45 -06:00
Russell Cohen 6e16e2ba82
remove aws-hyper (#959)
* Replace generated code references to AwsMiddleware from hyper with inline dependency

* remove usages of aws-hyper

* RIP aws-hyper

* rename AwsMiddleware to default Middleware

* Delete unused aws-hyper deps

* Update changelog

* Update RFC

* Add deprecation note to aws-hyper
2021-12-13 13:07:10 -05:00
Zelda Hessler 979c703424
add: example showing how to use native-tls (#946)
* add: native-tls example and test
update: aws-config to correctly separate the native-tls and rustls features for its dependencies
fix: native-tls feature gate typo
update: prefix unused id field with an underscore

* update: CHANGELOG.next.toml

* remove: unnecessary aws-sdk-sts feature deps from aws-config

* remove: obsolete dep features
2021-12-09 21:23:51 +00:00
Zelda Hessler 953c774c81
Update CHANGELOG.next.toml (#955) 2021-12-09 17:13:51 +00:00
Russell Cohen fe0b125dd7
Fix label & query URI encoding (#953)
* Fix label & query URI encoding

https://github.com/awslabs/aws-sdk-rust/issues/331 demonstrated that we were failing to properly encode characters for URI path components and query components in several situation. This:
- Fixes the specific bugs
- Adds proptests (run locally with 16K cases) to verify that this is the complete set.
- Adds an S3-specific protocol test that targets this issue

* Make the test a bit stronger

* Update changelog
2021-12-09 11:57:05 -05:00
Russell Cohen cb67d8004b
Cleanup AWS Hyper Features (#947)
* Cleanup features from aws-hyper

* Update codegen

* Update changelog

* Fix examples

* Update CHANGELOG.next.toml

Co-authored-by: Zelda Hessler <zhessler@amazon.com>

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2021-12-08 17:10:05 -05:00
Zelda Hessler b5f53bed35
remove: default features from runtime crates (#935)
* remove: default features from runtime crates
update: tests and examples broken by default feature change
update: code generation broken by default feature change
fix: follow lint suggestion to lowercase variable names

* update: CHANGELOG.next.toml

* fix: add missing feature
fix: typo
formatting: sort imports

* update: make SDK changelog less worrying for SDK users not depending on a runtime crate
update: undo default feature change for SDK
fix: tests broken by default feature change
fix: examples broken by default feature change

* remove: empty defaults
add: doc w/ feature grid to aws-smithy-client
add: doc w/ feature grid to aws-smithy-http

* add: upgrade helper table to changelog
undo: bad formatting
formatting: add backticks to feature names in doc table

* remove: bytestream-util feature usage where possible
formatting: update CHANGELOG.next.toml

* remove: the client feature from generated SDKs
rename: feature "bytestream-util" to "rt-tokio"
update: mark "tower" dep as non-optional in SDKs
docs: update aws-smithy-http docs and README.md

* Update CHANGELOG.next.toml

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

* Update rust-runtime/aws-smithy-http/README.md

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

* revert: aws-sigv4 changes
update: CHANGELOG.next.toml
remove: rt-tokio dep feature for aws-smithy-async usage in aws-types

* fix: don't gate entire byte_stream module on rt-tokio feature
fix: typos

* remove: rt-tokio feature from SDKs generated with EventStreamSymbolProvider.kt
fix: incorrect doc comment

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-12-08 16:57:12 +00:00
Russell Cohen 4073ebab5c
Fix several bugs associated with retry/sleep (#940)
* Fix several bugs associated with retry/sleep

The sleep implementation was late-bound but early loaded in retry which created a large surface area for bugs & meant that we emitted a lot of spurious warnings. This commit:
- Removes more kruft from aws-hyper and deals with the consequences
- Cleans up the way that HTTP clients are generated
- Passes in sleep to each incarnation of the retry controller to work around issues caused by late-binding vs. early binding sleep.

* first round of cleanups

* delete unused import

* Update integration tests

* Fix examples

* Fix aws-smithy-client docs

* Clippy fix

* fix flaky test

* Fix  which relies on tokio/io
2021-12-08 11:29:25 -05:00
John DiSanti 3bf906fe09
Improve log messaging around missing sleep implementation (#907)
* Improve missing sleep warning

* Update changelog

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-12-07 13:43:52 -08:00
Russell Cohen 8136ba4a01
Use provided sleep_impl in aws-smithy-client::retry (#923)
* Use provided sleep_impl in aws-smithy-client::retry

Previously, aws_smithy_client was hard coded to use tokio::sleep. This change:
- threads the sleep implementation into the retry controller
- moves the integration test out of aws-hyper and into aws-smithy-client
- takes a first pass at fixing the cargo featres (cargo hack --feature-powerset passes now)

* cleanups

* several test fixups

* Use tristate to conditionally log

* Update changelog
2021-12-06 16:49:13 +00:00
Russell Cohen d4bc9d60b0
Changelog Automation (#922)
* Automate changelog update process

* Update PR template

* Update references

* Cleanups and comments
2021-12-03 11:47:52 -08:00