Commit Graph

136 Commits

Author SHA1 Message Date
Russell Cohen ca849fb544
Design Doc Updates (#1347)
* Remove makefile, add mdbook-mermaid

* Add design doc section about backwards compatibility

* fix footnotes
2022-04-27 15:49:25 +00:00
John DiSanti 6a028e9476
RFC: Independent Crate Versioning (#1194)
* Start writing RFC for long-term versioning scheme

* Incorporate feedback

* Rename the RFC

* Reduce RFC scope and finish it

* Remove unused changes checklist

* Rename RFC to Independent Crate Versioning

* Incorporate feedback

* Fix some section headers

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-04-25 17:34:07 +00:00
Zelda Hessler 699e289324
RFC: Callbacks for `ByteStream` and `SdkBody` (#1307)
* add: initial draft of bytestream callback RFC

* add: builder-style method

* update: remove callback insert method in favor of builder method
update: Arc callbacks instead of boxing them
remove: most bounds from ByteStreamReadCallback trait
add: PartialEq/Eq impl for Inner that disregards callback list

* update: RFC with SdkBody impl
update: RFC with checksum callback example

* update: respond to PR comments

* update: callback impls

* remove: Sync bounds from callback traits

* update: consolidate and simplify callback API

* fix: leftover terminology
2022-04-15 14:56:06 -05:00
John DiSanti 2019aaf39d
Add RFC for publishing to crates.io (#759)
* Add RFC for publishing to crates.io

* Incorporate initial feedback

* Revise RFC to only cover the alpha crates.io publishing approach
2022-02-15 15:29:43 -08:00
John DiSanti 2cf4a3bbd9
RFC: Waiters (#1149) 2022-02-08 13:49:55 -08:00
Russell Cohen 4312e3ee4b
Update README.md (#1134) 2022-02-07 16:52:45 +00:00
Russell Cohen 8d1a64a776
Bring RFCs up to date (#1135) 2022-01-28 23:54:05 +00:00
John DiSanti cc535bc107
Update the example consolidation RFC (#1124) 2022-01-27 09:33:42 -08:00
John DiSanti 638ed74a1f
Add RFC for SDK example consolidation (#1041) 2022-01-12 16:47:37 -08: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
John DiSanti 166ffd62f3
Update the Split Release Process RFC (#992) 2021-12-17 10:04:37 -05:00
John DiSanti af1832edf6
RFC: Split the release process between `smithy-rs` and `aws-sdk-rust` (#970)
* Add RFC for a split release process

* Incorporate feedback

* Fix change checklist

* Simplify release process further

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-12-16 15:28:06 +00: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
Russell Cohen a491afe04d
service specific middleware (#954)
* service specific middleware

* Uncheck the boxes

* Update design/src/rfcs/rfc0006_service_specific_middleware.md

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

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-12-09 20:42:43 +00:00
Ian Botsford 155d24aaf8
Fix a small typo in tenets (#856) 2021-11-12 00:27:23 +00: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
Zelda Hessler 841f51113f
update: retry config rfc status (#817) 2021-10-27 20:00:55 +00:00
Zelda Hessler 1586d0b0c4
fix: various typos (#813)
* fix: various typos

* undo: model spellchecking

* revert: bad change to model docs
2021-10-27 18:21:06 +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
John DiSanti 8eb3b98fd6
Fix RFC organization (#758)
* Fix RFC organization

* Minor corrections
2021-10-08 15:12:12 -07: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
Matteo Bigoi ada243be64
[POC] Basic server type serde for RestJson1 (#737)
* Initial implementation of RestJson and Http ser/de

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Visitor render operation shapes from server generators

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Use a symlink for the ebs test model

* Revert "Use a symlink for the ebs test model"

This reverts commit 0c2adcbf12.

* Now the model is emitted in different files

* A little more general model generation

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Use a very simple model to try the service generators

* Move serializer in its own folder

* Initial implementation of RestJson and Http ser/de

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Visitor render operation shapes from server generators

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Use a symlink for the ebs test model

* Revert "Use a symlink for the ebs test model"

This reverts commit 0c2adcbf12.

* Now the model is emitted in different files

* A little more general model generation

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Use a very simple model to try the service generators

* Move serializer in its own folder

* Refactor RestJson to accomodate upstream changes

* Refactor a little RestJson1 and add simple RFC doc

* Remove inheritance from Json ser/de and refactor codegen visitor to
directly use the rendering functions

* Make operation.rs module public

* Use the protocol ID instead of its string representation

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
2021-10-05 13:05:00 -04:00
Zelda Hessler 5b2f7c670b
add: RFC for user-configurable retry behavior (#732)
* add: incomplete draft rfc for retry configuraion

* update: rfc based on suggestions
add: reference to SDK reference page on max_attempts
fix: heading levels
update: simplify shared config example
fix: copypaste error in EnvironmentVariableRegionProvider

* update: to use builder method called max_attempts

* fix: leftover language

* update: go back to RetryConfig
add: more definitions
update: examples
add: explainer for process of sending a request
add: note about breaking change to
update: changes checklist
add: note about breaking changes

* fix: use correct module for shard config
update: emit warn log for invalid AWS_MAX_ATTEMPTS

* add: note about where RetryConfigDecorator will be defined
add: note about panics when setting invalid max_attempts
2021-09-30 14:44:42 +00:00
John DiSanti 4cf1c0235c
Update Presigning API RFC (#706) 2021-09-24 14:41:03 -07:00
John DiSanti aa883141d8
RFC: API for Pre-signed URLs (#681)
* Add initial draft RFC for pre-signed URLs

* Change "pre-sign" to "presign" to match other AWS documentation

* Incorporate initial round of feedback

* Change `http::Request` to `PresignedRequest`

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-09-17 15:42:34 -04:00
Russell Cohen 5bb82b6e19
RFC: Shared Config (#655)
* Add initial design for shared config

* Update shared config RFC

* add no-configuration proposal

* clarify `aws-types`, remove references to `aws-core`

* Update design/src/aws_config.md

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

* Update design/src/aws_config.md

Co-authored-by: David Barsky <me@davidbarsky.com>

* wip

* Update shared config RFC

* Update aws_config.md

* Update aws_config.md

* Update Shared config RFC to match reality

Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: David Barsky <me@davidbarsky.com>
2021-09-17 08:47:07 -04:00
John DiSanti b2187deb83
RFC: Supporting multiple HTTP versions for SDKs that use Event Stream (#669)
* Add initial RFC doc for supporting multiple HTTP versions

* Incorporate `SharedConfig` design and HTTP settings requirements

* Improve design for HTTP settings that vary per operation

* Create a place for RFCs to be merged into
2021-08-27 15:41:03 -07:00
John DiSanti 68984dc408
Refactor middleware to use new `operation::Response` instead of `http::Response<SdkBody>` (#635)
* Refactor Smithy service tower to include a property bag with the response

* Add doc comments and rename functions on operation Request/Response

* Fix codegen

* Update CHANGELOG

* Attach PR number to CHANGELOG

* Fix test compile error

* CR feedback

* Fix AWS runtime tests

* Fix doc comment link

* Fix API gateway customization

* Fix AWS integration tests and update design doc

* Make it possible to run IAM test outside CI and fix it
2021-08-05 17:44:58 -07:00
John DiSanti 398ac41364
Update design documentation (#536)
Co-authored-by: Russell Cohen <rcoh@amazon.com>
2021-06-23 21:30:45 +00:00
Russell Cohen f6267033bc
Update design docs link 2021-05-24 10:51:03 -04:00
Russell Cohen 72a5c5b3e8
Add initial set of docs (#313)
* Add initial set of docs

* More design documentation updates

* Updates to the docs

* Update tenets again to remove the dependeny tenet

* Remove `!`

* Add more design documentation

* More updates to tenets

* More tenets updates

* tenets typo

* Rephrase as 'AWS SDK for Rust'

* rephrase tenets
2021-05-06 22:59:12 +00:00
Russell Cohen bc511ec77f
Add two Amazon Polly examples (#286)
* Add to Amazon Polly examples

* Fix copy-paste error

* Update aws/sdk/examples/polly-helloworld/src/main.rs

Co-authored-by: David Barsky <dbarsky@amazon.com>

* Update aws/sdk/examples/polly-helloworld/src/main.rs

Co-authored-by: David Barsky <dbarsky@amazon.com>

* Some cleanups

* Rerun precommit

* CR Feedback

* Fix clippy lint

* Small cleanup

Co-authored-by: David Barsky <dbarsky@amazon.com>
2021-04-01 21:49:57 -04:00
Russell Cohen 36f67c5f40
Add AwsEndpointResolver when constructing operations (#198)
* Add AwsEndpointResolver when constructing operations

This commit adds a customization for AWS-services to allow specifying an EndpointResolver, with a default fallback provided.

* Enforce no doc warnings, fix bug, add cargoCheck to CI
2021-02-15 17:35:51 -05:00
Russell Cohen 6da99699bb
Implement core Smithy endpoint support (#183)
* Implement core Smithy endpoint support

This commit adds `Endpoint` to smithy-http & records our design decisions in `endpoint.md`. This provides support for the endpoint trait in Smithy. A design for endpoint discovery is proposed but is not currently implemented.

* Apply suggestions from code review

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>

* More cleanups

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2021-02-08 10:16:16 -05:00
Russell Cohen 86fc5f25c9
Add middleware & update design docs (#175)
* Add middleware & update design docs

* Add missing design folder

* Improve MapRequest middleware example

* Vendor pin_utils::pin_mut

* Remove Debug body restrictions

* Modify error bound

* Remove redundant return
2021-02-02 12:42:15 -05:00
Russell Cohen 2ff12e6ac9
Http Operation traits and structures (#167)
* Http Operation traits and structures

Initial implementation of `Operation` for HTTP based services and `ParseHttpResponse`. I'm also starting to collect design documentation in `design`, an mdBook intended to serve as a repository for public facing design documentation.

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

Co-authored-by: Jonathan Esterhazy <jonathan.esterhazy@gmail.com>

* Add retry policy

* Fix doctest failures

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

Co-authored-by: Kerem Kat <keremkat@gmail.com>

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

Co-authored-by: Kerem Kat <keremkat@gmail.com>

* Update design/src/operation.md

Co-authored-by: Kerem Kat <keremkat@gmail.com>

* Update design/src/operation.md

Co-authored-by: Kerem Kat <keremkat@gmail.com>

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

Co-authored-by: Kerem Kat <keremkat@gmail.com>

* Update design/src/operation.md

Co-authored-by: Kerem Kat <keremkat@gmail.com>

* Update design/src/operation.md

Co-authored-by: Kerem Kat <keremkat@gmail.com>

Co-authored-by: Jonathan Esterhazy <jonathan.esterhazy@gmail.com>
Co-authored-by: Kerem Kat <keremkat@gmail.com>
2021-01-25 08:56:55 -05:00