Commit Graph

548 Commits

Author SHA1 Message Date
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