Commit Graph

175 Commits

Author SHA1 Message Date
AWS SDK Rust Bot bcea15ad4a Update changelog 2023-01-11 15:22:58 +00:00
AWS SDK Rust Bot b2b8e7e424 Update changelog 2022-12-12 15:37:03 +00:00
david-perez fb631b4f4c
Export `Router` from `aws-smithy-http-server` crate root again (#1910)
This reverts unintentional breakage introduced in
`aws-smithy-http-server` v0.51.0.
2022-10-26 17:09:05 +02:00
AWS SDK Rust Bot 3e24477ae7 Update changelog 2022-10-24 17:47:44 +00:00
AWS SDK Rust Bot 7b27f376cd Update changelog 2022-09-20 12:42:29 +00:00
AWS SDK Rust Bot 2cb76641b6 Update changelog 2022-08-31 09:48:52 +00:00
AWS SDK Rust Bot db48039065 Update changelog 2022-08-04 01:37:32 +00:00
AWS SDK Rust Bot 700cee65ca Update changelog 2022-07-20 17:48:27 +00:00
AWS SDK Rust Bot 334f6dd203 Update changelog 2022-06-28 23:05:33 +00:00
AWS SDK Rust Bot 5b49350037 Update changelogs 2022-06-22 21:20:42 +00:00
AWS SDK Rust Bot 7b5954ed8f Update changelogs 2022-06-09 22:53:53 +00:00
AWS SDK Rust Bot 9db2a737c4 Update changelogs 2022-05-13 17:56:33 +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
Zelda Hessler c5e2ce5083
update: gradle.properties for release (#1324)
* update: gradle.properties for release

* update: aws.sdk.version to 0.10.1
fix: changelog
2022-04-14 16:08:11 -05:00
Zelda Hessler 7885dc7197
Release 2022 04 14 (#1323)
* undo: MSRV bump
* update: changelog
2022-04-14 18:10:15 +00: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
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
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
Russell Cohen 058f28e4a6
Release 0.7.0 (#1202)
* Update changelogs

* Sync models

* bump versions
2022-02-18 10:31:13 -05: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 f4d3910f22
prepare for release of 0.35.2/0.5.2 (#1103) 2022-01-20 14:06:33 -08:00
Russell Cohen 18998f3ff3
Changelogs (#1090)
* Update changelogs

* Update versions
2022-01-19 14:58:50 -08: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 2b90cc9b11
Cut release (#1055) 2022-01-10 18:19:44 +00: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 35ac555e0f
Release v0.33.1 (#980)
* Bump version

* Changelogs
2021-12-15 12:46:07 -05: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
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
Russell Cohen e7cbcfffbe
Prune extra xmlns from generated XML (#892)
* Prune extra xmlns from generated XML

* Fix tests impacted by namespace serialization

* Update changelogs
2021-12-03 10:45:30 -05:00
Russell Cohen 88fc76801f
Fixes for generated docs (#920)
* Fixes for generated doc

- Avoid generating `#Examples` when no examples exist
- Fix typo

* Split out client customizations

* Update changelogs

* Fix generated READMEs
2021-12-02 20:52:10 +00:00
John DiSanti b1835a145f
Version bump to fix crates.io conflict with aws-sigv4 (#919) 2021-12-01 22:06:46 -08:00
Russell Cohen 71fef7aacc
version numbers and changelogs (#910) 2021-12-01 18:48:40 +00:00
Russell Cohen 4b12d80d9f
prepare alpha release (#889) (#913) 2021-12-01 12:28:56 -06:00
Russell Cohen cc82edf173
docs.rs metadata & license linter & fixes (#904)
* Lint & fix docs.rs + LICENSEs

* Clippy fixups

* Update changelogs

* Fix reverse condition & make repo_root lazy_static

* Update copyright
2021-12-01 12:26:47 +01:00
Zelda Hessler 692bf94ba3
Feature: add TimeoutError variant to SdkError (#886)
* feature: add TimeoutError variant to SdkError
add: TimeoutError variant to ImdsError
update: tests broken by new variant

* update: changelogs

* add: new inner timeout error RequestTimeoutError
update: tests broken by new inner error
rename: aws_smithy_client::hyper_ext::TimeoutError to HttpTimeoutError
add: missing dep to integration test

* revert: IMDS error change
update: content for HttpTimeoutError
fix: clippy lint

* add: back the source method to HttpTimeoutError
update: connector timeout tests
remove: TODO
2021-11-23 16:26:31 +00:00
Russell Cohen 32a09ecda6
set appropriate minimum httpbody version (#883)
* set appropriate minimum httpbody version

* Update changelogs

* changelog

* HTTP Body version in generated code

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2021-11-22 11:16:55 -05:00
Zelda Hessler a9a691b6b4
Feature: Fine-grained Timeout Configuration (#831)
* add: TimeoutConfig
add: provider to fetch timeout from profile
add: provider to fetch timeout from environment
add: default provider for TimeoutConfigs
update: aws_config::Config to support timeout conf
update: rustdoc lint

* add: TimeoutConfigBuilder::merge_with test

* update: changelogs

* add: timeout_config to client and builder
add: generic timeout service
add: non-working timeout layer

* add: timeout layer/service with configurable duration
add: test that ensures timeout service works

* fix: eliminate useless clones

* feature: Kotlin decorator for TimeoutConfig
add: tests for timeout-related codegen
update: incorrect package path in RetryConfigDecorator.kt
fix: outdated aws-config timeout config code

* remove: link to struct in external crate
fix: outdated doc test
fix: add missing import to doc test
fix: copypaste error in doc test
update: outdated lint name

* update: comment on Builder::timeout_config panics
add: test ensuring timeouts can't be infinite
update: use a floating point number in a timeout doc
update: message for failed profile load to mention that profile will be skipped
remove: commented out code
update: attempt to make difference between api_call_timeout and api_call_attempt_timeout clearer
update: outdated doc comments
update: TimeoutConfigError descriptions

* formatting: arrange imports in aws_smithy_client lib.rs
add: todo for improving timeout error categorization

* update: var parsers to work without needless allocations
update: improve example for default timeout config provider
update: improve example for default retry config provider
fix: unhelpful doc comment for TimeoutLayerFuture<T>
remove: outdated TODO

* fix: various typos in docs
add: PR links to changelogs
format: doc references to structs to look nicer
add: note about expected form and unit of timeout config data
update: expand ProfileFileTimeoutConfigProvider example

* fix: relocate provider config tests to the correct package/directory
remove: unimplemented timeouts from `Settings`

* add: S3 integration test for timeouts
update: re-enable TimeoutLayers
add: "list_of_set_timeouts" logging helper to TimeoutConfig
refactor: the way TimeoutService handles futures so that it can work better with no timeout set
add: helper structs to make creating timeout services easier

* update: split timeout_config example into multiple lines

* fix: Clippy lints

* fix: outdated test

* fix: more clippy lints

* fix: typo
add: TimeoutConfig example

* Update CHANGELOG.md

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

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

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

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

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

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

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

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

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

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

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

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

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

* feature: user-configurable AsyncSleep impls
update: fallback to sleep impl that sleeps forever instead of sleep impl being optional

* Update rust-runtime/aws-smithy-types/src/timeout.rs

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

* update: changelogs
format: SleepImplDecorator.kt
update: TimeoutConfig doc
remove: list_of_set_timeouts in favor of Debug impl for TimeoutConfig

* Apply suggestions from code review

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

* fix: broken macro doc test by ignoring it
fix: outdated struct ref in doc
fix: outdated generated doc

* fix: mode broken doc tests

* fix: broken doc test

* attempt to fix CI-only doc test error

* add: moduleUseName method to CodegenContext
remove: pub use reexports from timeout and sleep impl decorators
add: pub use reexports to aws_config for timeout and retry configs
undo: default_sleep_impl changes
attempt to add tokio time feature to S3 integration test

* Update timeout.rs

* Apply suggestions from code review

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

* refactor: consolidate timeout parsing logic
rename: `RetryConfigBuilder::merge_with` to `RetryConfigBuilder::take_unset_from`
refactor: move timeout parsing tests to timeouts.rs
add: entry to SDK changelog noting the renaming
remove: redundant feature from s3 integration test Cargo.toml
update: various setters added by this PR to have the same form as our preexisting setters
add: extra info to the warning emitted when ConfigLoader calls default_async_sleep and gets None

* fix: tests broken when implementing suggestions

* update: doc hide sleep_impl for aws_types::Config
remove: leftover comment

Co-authored-by: Russell Cohen <rcoh@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-11-19 21:16:24 +00:00
Russell Cohen cab7de3faf
Add / fix smithy-client docs (#855)
* Add / fix smithy-client docs

* Rework hyper impls to be a regular public module instead of pub use

* clarify comments, fix changelog

* cleanup code in docs

* Add doc linking

* Update rust-runtime/aws-smithy-client/src/hyper_ext.rs

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

* fix changelog

* SDK changelog docs

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-11-19 20:41:25 +00:00
Zelda Hessler 0bc5523f2e
Release preparation v0.29.0/v0.0.26-alpha (#874)
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-11-18 22:41:00 +00:00
Florian Richter ee6e210047
docs: fixed examples url (#862)
* docs: fixed examples url

* docs: updated README files

* Update CHANGELOG.md

* Update SDK_CHANGELOG.md

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-11-15 09:33:37 -06:00
John DiSanti 72eae556ae
Relegate `chrono` to an optional feature in a new conversion crate (#849)
* Refactor Instant to use `time` instead of `chrono`
* Rename methods on Instant to have a consistent naming scheme.
* Remove built-in Instant conversions.
* Remove `chrono` from `aws-sigv4`
* Re-export `Instant` from service crates
* Implement `aws-smithy-types-convert`
* Rename `Instant` to `DateTime`
* Make date-time formatting operations fallible
* Add initial changelog entries
* Update changelog
* Make DateTime to SystemTime conversion fallible
* Incorporate review feedback
* Fix merge issues
* Fix examples
* Fix doc comments
* Fix unused import warning when using `convert-chrono` feature exclusively
2021-11-11 16:01:30 -08:00
John DiSanti 3ae9bcf78f
Prepare `v0.28.0-alpha` release (#852) (#854) 2021-11-11 11:53:06 -08:00
Matteo Bigoi d215bb0815
Update MSRV to 1.54.0 (#844) 2021-11-10 12:51:31 +00:00
Russell Cohen 50d812bf9d
Cut release v0.27.0-alpha.2 (#847) 2021-11-09 18:15:17 +00:00
John DiSanti 758fc313bf
Add accessor methods to generated structs (#842)
* Add accessor methods to generated structs

* Update changelogs

* Don't emit empty impl blocks

* Incorporate feedback

* Fix builder method conflict

* Don't emit empty impls for errors with only a message
2021-11-08 14:51:52 -08:00
John DiSanti 4a1261f9db
Fix bug in epoch second parsing and improve tests (#834)
* Implement time format/parse test suite generator

* Run generated test suite against `aws-smithy-types`

* Fix minor difference with test suite HTTP date formatting

* Fix bugs discovered in epoch seconds parsing

* Reduce allocations in epoch seconds formatting

* Update changelogs

* Improve test data format

* Remove unsafe from epoch-seconds parsing and increase test coverage

* Add fuzz test suite for date-time parsing to `aws-smithy-types`
2021-11-04 22:33:09 +00:00
Russell Cohen c8a940be89
Unknown variants (#818)
* Add symbol provider support for renaming union variants

* Generate errors when serializing unknown variants in JSON

* Add support for serializing Unknown variants in XML

* Support optionally generating the unknown variant

* Add support for parsing unknown JSON variants

* Add unknown union support to XML

* fixup tests & clippy

* backup changes to mk-generated

* Support the unknown variant for event streams

* fix compilation warning

* fix awsquery serializer tests

* Remove conversion & lint supression

* Remove unused custom attributes

* remove some more pointless conversions

* Fix test indentation

* CR feedback

* Update Changelogs

* Remove usages of toPascalCase

* Fix eventstream error message

* Fix braces in server codegen

* Fix doublequoted string issue
2021-11-04 14:54:05 +00:00
Russell Cohen 643f2eee17
Update versions and changelog (#832) 2021-11-03 17:07:53 +00:00
Russell Cohen caf52ee6f5
Fix docs on union converters (#826)
* Fix docs on union converters

* update changelog

* Fix generation when escaping happens

* clarify docs
2021-11-02 17:27:23 -04:00
Russell Cohen bd37a9c640
Add check for incomplete_message from Hyper (#815)
Co-authored-by: Zelda Hessler <zelda.hessler@pm.me>
2021-10-27 14:45:35 -04:00
Russell Cohen ad588131f0
Refactor generation of versions to support generating crate versions … (#808)
* Refactor generation of versions to support generating crate versions directly

* Update changelog

* Fix generated SDK version during tests
2021-10-27 13:58:09 -04:00
Russell Cohen c0fa7f0b92
Upgrade to Smithy 1.12 (#812)
* Upgrade to Smithy 1.12

* update changelog

* Add protocol test

* Remove S3 customization: S3 content length fixed upstream

* Delete unuse S3 customization

Co-authored-by: Zelda Hessler <zelda.hessler@pm.me>
2021-10-26 21:19:52 +00:00
Russell Cohen d341c6eec7
Change `make_operation(..)` to be an async function (#797)
* Change `make_operation(..)` to be an async function

As part of the work towards glacier customizations, calling `make_operation(..)` needs to be able to perform asyncrhonous operations like potentially reading the body. To enable this and other future requirements, we now always generate make_operation as an async function.

* Add CR to changelog

* Fix server tests
2021-10-21 17:32:17 -04:00
John DiSanti 84b6098598
Prepare for a release (#790)
* Update AWS models

* Version bump

* Update changelog

* Correct version numbers in changelog
2021-10-20 18:56:43 +00:00
John DiSanti 6c9402b40d
Improve generated documentation (#779)
* Fill in missing generated documentation for S3

* Document the `smithy-types` runtime crate

* Fix wildcard imports

* Normalize doc notes

* Fix some CI issues

* Incorporate feedback

* Fix `EnumGeneratorTest`

* Fix more CI issues

* Fix server codegen tests

* Fix more doc issues

* Update changelogs

* Update aws/SDK_CHANGELOG.md

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

* Update aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt

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

* Run pre-commit on all Kotlin files

* Use `emptySection`

* Fix namespace in doc comments
2021-10-20 18:34:25 +00:00
John DiSanti 1aa59693ee
Prefix Smithy runtime crates with `aws-` (#788)
* Prefix Smithy runtime crates with `aws-`

* Update changelogs
2021-10-20 10:21:15 -07:00
Russell Cohen 1cbcd049b6
Release preparation v0.26/v0.0.21-alpha (#773)
* bump version for release

* update changelogs

* Fix runtime crate version

* fix comment

* use a 3 segment version
2021-10-15 11:49:03 -04:00
John DiSanti cf46613360
Generate service READMEs and fix module descriptions (#766)
* Generate service readmes and fix module descriptions

* Add missing `moduleDescription` to codegen tests

* Update changelogs

* Add `moduleDescription` to server codegen tests

* Fix event stream allow list in build.gradle.kts

* Type alias and doc comment the manifest customizations
2021-10-14 14:39:03 -07:00
John DiSanti 89ad0d3d8a
Normalize runtime crate manifests and apply correct version numbers (#755)
* Rename `protocol-test-helpers` to `smithy-protocol-test-helpers`

* Add missing licenses to runtime crates

* Normalize runtime crate manifests

* Remove unused dependencies

* Make `pretty_assertions` version consistent

* Add repository to generated SDK crate manifests

* Create `smithy-rs-head` crate version tag

* Set correct crate versions when relocating runtimes

* Run version replacement only on Cargo.toml files

* Revise head version number from RFC feedback

* Rename `smithy-protocol-test-helpers` to `smithy-protocol-test`

* Incorporate feedback

* Update changelogs

* Fix rename issues

* Fix EventStreamMarshallerGeneratorTest
2021-10-12 21:42:36 +00:00
Zelda Hessler 95714395f1
feature: make retry behavior user-configurable (#741)
* feature: add retry_config to aws_config::ConfigLoader and aws_config::default_provider
feature: add retry_config to aws_types::Config and aws_types::Builder
feature: add RetryConfig and RetryMode to smithy_types
feature: create EnvironmentVariableRetryConfigProvider
feature: create RetryConfigProviderChain
feature: create ProfileFileRetryConfigProvider
update: make smithy-types dep non-optional for aws-config
add: smithy-types dep to aws-types

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

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

* refactor: simplify configuration logic of retry_configs
update: use non-allocating string comparison for RetryMode::from_str
update: panic on setting invalid values for RetryConfig
remove: provider chain for retry_config
remove: ProvideRetryConfig trait and related functionality

* update: AwsFluentClientDecorator to work with retry_config
refactor: rename smithy_client::retry::Config.max_retries to max_attempts and fix code broken by this change
add: RetryConfigDecorator to smithy codegen with example and test
add: RetryConfigDecorator to decorators list
add: update SharedConfigDecorator to work with retry_config
add: prop getters to RetryConfig
add: From<RetryConfig> for smithy_client::retry::Config
update: RegionDecorator example of generated code
sort: decorators list alphabetically

* fix: clone moved valued in AwsFluentClientDecorator
update: imds client to refer to max attempts instead of max retries
fix: clippy lint about FromStr
add: RetryModeErr error struct for when FromStr fails
fix: code affected by added FromStr<RetryMode> trait usage

* formatting: run rustfmt

* format: use 1.53 version of fustfmt

* fix: smithy_client tests broken by max_attempts change

* fix: clarify some confusing counter logic around request attempts

* update: set_retry_config example code to be more helpful
fix: broken docs link

* add: missing PartialEq impl for RetryConfig
update: EnvironmentVariableRetryConfigProvider tests
remove: unused import

* update: CHANGELOGs

* update: Config builder decorators to match Config builder methods

* fix: old references to ProtocolConfig

* refactor: surface all retry_config errors in the default_provider
add: RetryConfigErr

* update: Changelog to not new semantics of max_attempts
update: Config::retry_config() example
fix: copy paste error
rename: RetryModeErr to RetryModeParseErr
update: note valid retry modes in error message
add: helper for creating RetryConfig that disables retries
update: use Cow<&str> for RetryConfigErr to save on allocations
add: FailedToParseMaxAttempts error when creating RetryConfig from invalid max_attempts
update: don't ignore invalid/unparseable max_attempts
update: note panic that can occur in retry_config::default_provider
remove: invalid/useless code from RetryConfigDecorator.kt
remove: inside baseball comments previously added to CHANGELOG

* disable: adaptive RetryMode tests

* fix: don't listen to the IDE, err is being used

* fix: don't listen to the IDE, err is being used

* fix: really struggling with this underscore

* fix: typo in doc comment example

* fix: typo in doc comment example
fix: outdated tests

* Update rust-runtime/smithy-client/src/retry.rs

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

* update: retry_config::default_provider to consider precedence per-field instead of per struct
add: RetryConfigBuilder to make the above possible
update: Env and Profile provider for RetryConfig to return RetryConfigBuilder
add: docs to generated retry_config builders
add: from_slice method to os_shim_internal::Fs

* update: use old ordering of decorators in AwsCodegenDecorator

* update: use old ordering of decorators in AwsCodegenDecorator
fix: os_shim_internal example not compiling
formatting: run ktlint
update: tests broken by RetryConfigDecorator.kt changes

* formatting: don't use * imports in kotlin

* fix: tests broken by stubConfigProject change

* Update codegen/src/test/kotlin/software/amazon/smithy/rust/RetryConfigProviderConfigTest.kt

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

* formatting: run ktlint

* add: back accidentally removed presigning decorator

Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
2021-10-12 13:54:23 -05:00
John DiSanti e6220849d0
Add `RustSettings` to `CodegenContext` (#752)
* Add `RustSettings` to `CodegenContext`

* Update changelog
2021-10-11 20:14:03 +00:00
Zelda Hessler fc4a9c5209
update: CHANGELOG (#760) 2021-10-11 15:50:28 +00:00
Zelda Hessler 0ae12fd9c0
fix: accidental ser instead of deser (#757)
* fix: accidental ser instead of deser

* update: CHANGELOG
2021-10-08 15:11:14 -05:00
Russell Cohen bef5382650
Establish `ConnectorError` for errors from SmithyConnector (#744)
* Introduce ClientError to differentiate between different error types coming from HTTP connectors

* Add test

* Fix tests

* Fix the DVR connections

* Fix event-stream client

* clippy cleanups

* Fix poorly named variables in downcast error

* Update docs

* Rename ClientError to ConnectorError

* Fix more incorrectly named errors

* Update rust-runtime/smithy-http/src/result.rs

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

* Update changelog

* Update SDK_CHANGELOG.md

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-10-08 17:42:56 +00:00
Russell Cohen b88b2c3539
Pre release v0.0.20 (#751)
* Update SDK version to 0.20

* Bring in new AWS models

* Update changelog

* Update SDK changelog

* Update CHANGELOG.md
2021-10-07 20:13:49 +00:00
John DiSanti 275baef70a
Add presigned request support for Polly (#735)
* Split out MakeOperationGenerator for HttpProtocolGenerator

* Clean up body metadata calculation

* Add debug instructions to readme

* Add example for Polly presigned requests

* Add ability to change payload signing type for query signing

* Generate special cased make operation functions for presigning

* Reorganize protocol generators

* Rename ProtocolConfig to CodegenContext and move to a central location

* Consolidate protocol classes in protocols package

* Make protocol generator names consistent

* Fully decompose ProtocolGenerator

* Add integration test for Polly presigning

* Add make_operation and presigned to reserved words

* Update presigning RFC

* Make Polly transforms reusable and add tests

* Fix RequestBindingGeneratorTest

* Update changelogs

* Remove `HttpBodySigningType`

* Perform model transformations up front

* Add checks to presigning transformers

* Fix `codegen-server` build
2021-10-07 10:58:37 -07:00
John DiSanti 9d3bad7e6e
Fix bugs in Event Stream unmarshalling (#736)
* Fix bugs in Event Stream unmarshalling

- S3 Select's `Cont` event doesn't come across with a `:content-type`
  header, but the unmarshaller was expecting this header.
- The unmarshaller attempted to parse events that were modeled as empty
  structs, but S3 sends an empty payload for empty structs rather than
  an empty XML payload conforming to restXml.
- The event stream `Receiver` was returning that there were no more events
  even when it had some remaining events in its buffer.

* Update changelogs

* Incorporate feedback

* Split `smithy_http::event_stream` into multiple modules

* Add another test case to Receiver

* Fix CI

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-10-07 11:37:51 -04:00
Russell Cohen 1ca2b46971
Increase MSRV to 1.53.0 (#730)
* Make to_* fns take self by value

* Changelog update

* Fix 2 missing autolinks

* Allow bare urls in generated code
2021-09-28 09:08:23 -04:00
Predrag Gruevski 0dd0c93f92
Fix XML ElWriter bug allowing incomplete XML to be written (#719)
* Add test cases that point out the bugs.

* Fix the bugs by using an owned Option<&mut String>.

* Improve test comments.

* Update CHANGELOG.md.

* Clean up and add explanatory comments.

* Fix whitespace.

* Update CHANGELOG.md

Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
2021-09-27 09:35:44 -04:00
John DiSanti 2eb0e28c5b
Prepare v0.24 release (#717) 2021-09-24 20:35:41 +00:00
Russell Cohen 54d7f42bfc
Imds region provider (#715)
* Add IMDS Region Provider

* Fix config-only profile parsing bug

* Add IMDS region test

* Update changelogs

* update IMDS comment
2021-09-24 19:32:03 +00:00
John DiSanti 0665040231
Add query param signing to the aws-sigv4 crate (#707)
* Refactor aws-sigv4 to allow for query param signatures

* Implement query param signing

* Fix SigV4Signer in aws-sig-auth

* Address todo comments and document sigv4 test suite

* Add additional lints and improve documentation

* Update changelog

* CR feedback
2021-09-23 13:28:04 -07:00
Russell Cohen b3a95af612
feat(aws-config): Add IMDSv2 Credentials Provider (#709)
* feat(aws-config): Add IMDSv2 Credentials Provider

This follows up on #701 to use IMDS to act as a credentials provider. IMDS sits in the chain in two places:

1. IMDS may be used as a `credential_source` in `~/.aws/config`
2. IMDS is the last provider in the default chain of credential providers.

The IMDS credential provider may also be used directly.

* fix doc links

* Update aws/rust-runtime/aws-config/src/imds/credentials.rs

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

* Update aws/rust-runtime/aws-config/src/imds/credentials.rs

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

* CR feedback

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-09-23 10:35:45 -04:00
Jon Gjengset 8e115e1d4a
Add credential provider for assuming roles via STS (#703) 2021-09-21 10:45:45 -07:00
Russell Cohen 273a2698df
IMDS Client (#701)
* feat(aws-config): Add IMDS Client

* Fix docs

* Add two missing error implementations + usage example

* Fix clippy errors

* Fix doctest in os_shim_internal

* Fix a missed occurence of test connection assertions

* fix doc link

* remove link to private item

* Update changelog, make depedencies optional

* CR feedback cleanups

* Apply suggestions from code review

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

* Update aws/rust-runtime/aws-config/src/imds/client.rs

* refactor cache into its own module

* fix clippy warning

* add additional internal changelog entries

* endpoint mode comparsion should be case insensitive

* update docs to remove references to credentials

* Fix bug in token that doubled the buffer period

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-09-17 22:35:02 +00:00
Zelda Hessler bc2476d961
update: require that unmarshaller used to create a Receiver is Send (#702)
* update: require that unmarshaller used to create a Receiver is Send

* update: changelogs

* Fix typo in CHANGELOG.md

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

* Fix typo in aws/SDK_CHANGELOG.md

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

* add: test ensuring Receiver is Send

* remove: extra colons
2021-09-16 17:34:30 +00:00
Russell Cohen 7da5908b01
V0.23 prepare release (#698)
* Update models

* Bump generated SDK version

* Update changelogs, bump generated SDK version
2021-09-14 14:34:40 -04:00
Russell Cohen 2be10ed9dd
fix(codegen): Fix bug triggered by operation input/output naming (#699)
* fix(codegen): Fix bug triggered by operation input/output naming

During codegeneration, synthetic copies of input & output shapes are created. However, due to a Smithy shape id conflict, these
shapes were overwriting existing shapes in the model instead of creating new shapes.

This lead to a number of bugs exposed by the new s3control model. A minimal example of this model is included as a test in rest-xml-extras.

This commit augments the namespace of synthetic shapes to exist in the `synthetic` Smithy namespace, removing the conflict. After this bug was fixed, a subsequent bug in the serializer function naming was exposed where two shapes with the same name but in different modules generated a conflicting serializer.

Tests:
- [x] new s3control model compiles
- [x] test case added to rest-xml-extras

* cl: update changelog

* fix(codegen): Fix smithy-rs#662 & cleanup

* Update CHANGELOG.md

* fix another unit test
2021-09-14 13:53:29 -04:00
Russell Cohen 53b35afd6d
fix(signing): Fix duplicate content-length header (#697)
If `content_length` was set explicitly, we were erroneously duplicating it for non-streaming bodies. This commit:
- Uses `set_header_if_absent` to avoid double setting content length
- Adds a trace level log of the canonical request during signing
- Adds an additional protocol test that fails prior to this change
2021-09-14 10:07:33 -04:00
John DiSanti e57c71f233
Prepare changelog for release (#687) 2021-09-02 11:23:33 -07:00
John DiSanti d770c03887
Fix JSON parsing bug for modeled empty structs (#683)
* Fix JSON parsing bug for modeled empty structs

* Update changelog

* CR feedback
2021-09-02 11:07:13 -07:00
John DiSanti 1d7d7ec063
Add bug fix that was lumped in with other changes to changelog (#684)
Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-09-02 14:11:33 +00:00
Russell Cohen f649d559a9
Create Profile File Provider for Region (#682)
* Create Profile File Provider for Region

As part of this work, I unified handling of provider configuration into `ProviderConfig`. This simplifies and removes boilerplate from the credential provider builders.

* Fix profile name bug, add test

* More cleanups around connection management

* Lots of cleanups around connector handling and crate features

* Update Changelog

* Remove unecessary sleep module

* Add builder convenience method

* CR feedback

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

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-09-02 09:54:51 -04:00
Russell Cohen 0242158fe1
Add `Credentials` to `aws-config` (#678)
* Add ProvideCredentials to aws-types

* Integrate ProvideCredentials into SDK runtime and codegen

* Add CredentialsChainProvider to aws-config

* Move lazy_caching and async_provide_credentials_fn to config

* Migrate profile & web identity token providers

* Complete refactoring of aws_auth_providers

* Update examples

* Delete profile parser from aws-types and move fuzz tests

* Cleanups

* Fix some test failures

* Fix docs

* Fix select-object-content example

* convert tests, remove STS

* Fix doc comment

* remove usages of test-env-log

* take 2 fix doc comment

* Update changelog

* rename asycn_provide_credentials_fn
2021-09-01 10:05:12 -04:00
John DiSanti 8676d8dcf7
Customize S3 `Size` to use correct integer size (#679)
* Clean up `sync-models.py`

* Add hack to `sync-models.py` to correct the S3 model

* Add disabled S3 customization

* Run S3 model through `jq .` to make diffing nicer

* Sync S3 model

* Add integration test for the customization

* Update changelog
2021-08-31 16:06:34 -07:00
John DiSanti 8c268fe195
Update AWS service models (#677)
* Update AWS service models

* Update changelog
2021-08-31 15:22:44 -04:00
John DiSanti 2c372ed436
Fix signing when Hyper ALPN negotiates to h2 (#674)
The endpoint middleware was adding a host header to the request, and
this worked when using HTTP/1.1. However, when the connection gets
upgraded to h2, this results in the remote service expecting the
canonical request to have two `host` headers.

This change moves the addition of the host header into the signing code,
and lets hyper take charge of the host header.

* Update changelog

* Remove `transcribestreaming` exclusion from full SDK build

* Fix failing tests

* CR feedback
2021-08-30 19:08:06 -07:00
Russell Cohen c6143ec5e2
Minimal Support for Shared Config Loading (#675)
* create an AWS config module

This commit adds a new AWS config module. It only currently supports region resolution. A follow up commit will remove `ProvideRegion` from AWS types.

* create aws-config

This commit introduces `aws-config`, the configuration loader entry point for the SDK. Currently, this adds very little new code, instead, it migrates code from `aws_types` into the shared-config package.

* Update Examples to use shared-config

* Fix KMS IT

* Fix cargo docs

* Fix clippy

* Clarify doc comment on EnvLoader

* Clarify region chain impl, add tests

* Update CHANGELOG.md

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

* Delete dead module

* CR feedback

* Add more docs to aws-config

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-08-30 18:23:21 -04:00
Russell Cohen bab8e2303e
Add a minimal implementation of shared config (#673)
* Add a minimal implementation of shared config

* update changelog
2021-08-27 16:19:16 -04:00
Russell Cohen 5b8fc1ef51
Add now_or_later future (#672)
* Add now_or_later future

* Update changelog

* Update CHANGELOG.md
2021-08-27 13:52:54 -04:00
John DiSanti 5c0e294126
Add full Event Stream marshalling support and working S3 example (#667)
* Add generic error support to event stream unmarshallers

* Validate content-type in event stream unmarshaller

* Implement header marshalling and test

* Introduce SharedPropertyBag

* Send empty end frame

* Add `try_recv_initial()` to Receiver

* Set up Event Stream approval list and shrink default service list

* Add support and example for S3 SelectObjectContent

* Improve Event Stream error ergonomics

* Update changelog

* Fix CI

* Split generic error parsing in `Protocol`

* Incorporate CR feedback

* Make raw message available when failng to unmarshall into event or error
2021-08-27 09:27:44 -07:00
Russell Cohen dbe0dc0eca
Improve documentation on collection builders (#664)
* Improve documentation on collection builders

Generated builders include "magic" collection methods that will append to the builder. However, the generated names of these methods are confusing because they are often pluralized. To alleviate this, this diff will generate doc hints on these methods to clarify their behavior.

* Update CHANGELOG

* Update CHANGELOG.md
2021-08-23 22:07:36 -04:00
Russell Cohen 130703dadf
Breaking: Make `ProvideRegion::region` async (#661)
* Update region interface to be async

* Update all examples

* Update aws-auth-providers to support async regions

* Fix KMS tests

* Fix all examples again

* Update CHANGELOG, fix broken test

* Fix ses examples

* fix ses examples take 2
2021-08-20 15:03:17 -04:00
John DiSanti 3b8f69c18d
Add incomplete Event Stream support with working Amazon Transcribe example (#653)
* Add incomplete Event Stream support with working Amazon Transcribe example

* Make the raw response in SdkError generic

* Fix XmlBindingTraitSerializerGeneratorTest

* Make the build aware of the SMITHYRS_EXPERIMENTAL_EVENTSTREAM switch

* Fix SigV4SigningCustomizationTest

* Update changelog

* Fix build when SMITHYRS_EXPERIMENTAL_EVENTSTREAM is not set

* Add initial unit test for EventStreamUnmarshallerGenerator

* Add event header unmarshalling support

* Don't pull in event stream dependencies by default

* Only add event stream signer to config for services that need it

* Move event stream inlineables into smithy-eventstream

* Fix some clippy lints

* Transform event stream unions

* Fix crash in SigV4SigningDecorator

* Add test for unmarshalling errors

* Incorporate CR feedback
2021-08-20 10:50:42 -07:00
John DiSanti b119782a65
Prepare release (#658) 2021-08-19 13:22:20 -07:00
John DiSanti 4bccda460f
Sync AWS models (#657)
* Sync AWS models

* Update changelog
2021-08-19 12:13:39 -07:00
Russell Cohen 38f84dc5e9
Add support for web identity token providers (#654)
* Add support for web identity token providers

This diff adds support for WebIdentity token providers which may be utilized in three ways:
1. Via environment variables
2. Via a profile directly
3. As a source profile of another assume role profile

Along the way, I overhauled the way that tests work to be primarily self-contained test directories.

* make fs::read_to_end async

For future compatibility I updated read_to_end to be an async function. This drove a subsequent change to push profile file parsing into credentials loading. This should be generally useful anyway since we'll want a way to force reparsing of the profile file.

* Revert change to env

This removes the need for an allocation in the non-test case.

* Fix broken doc tests

* Fix clippy

* Update changelog, fix docs

* Remove caching from profile provider
2021-08-19 14:32:06 -04:00
Russell Cohen 01cdd25d69
fix sigv4 tests to work on httparse 1.5 (#656)
* fix sigv4 tests to work on httparse 1.5

httparse 1.5 has a small behavior change: https://github.com/seanmonstar/httparse/issues/102 which
changes the parsing behavior of headers when the request is not terminated with a second newline.

Although 1.5 may eventually fix this issue, this works around the build failure by inserting an additional
newline into the parser prior to parsing the test requests.

* update changelog

* Proper test fix
2021-08-19 09:50:57 -07:00
Russell Cohen 7b451c573d
Add support for the Smithy Auth trait (#652)
* Add support for the Smithy Auth trait

Some services have explicitly disabled authentication. This adds two things:
1. Customization to remove auth schemes for 2 STS operations
2. Add codegen support for the OptionalAuth and Auth trait to code generation.

CredentialsStage now will pass through unset credentials and the signer will check the signing trait.

A future enhancement may remove the signing middleware entirely.

* Update changelog

* Remove unused STS import

* remove unused variable

* Update CHANGELOG.md

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-08-17 18:50:40 +00:00
Russell Cohen f7ba94c16c
Remove jcenter / bintray from gradle (#651)
* Remove jcenter / bintray from gradle

Our build was referencing the old bintray repositories. This would 403 and make the build much slower as at retried 5 times against the broken URL.

* Update CHANGELOG.md

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-08-16 22:02:04 +00:00