Commit Graph

136 Commits

Author SHA1 Message Date
John DiSanti 839e3ce402
Add RFC for improving SDK credential caching through type safety (#1842) 2022-12-21 22:44:29 +00:00
Russell Cohen 2e3fa573d9
Add initial RFC document (endpoints 2.0) (#1637)
* Add initial RFC document

* CR feedback

* RFC updates

* Rename doc, add to summary / overview

* Apply suggestions from code review

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

* Update design/src/rfcs/rfc_0020_endpoints_20.md

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

* RFC updates

* More cleanups

* Delete old file

* rfc updates

* delete old file

* fix merge

Co-authored-by: John DiSanti <jdisanti@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-12-21 16:03:33 +00:00
Chase Coalwell ac0d99137c
Fix codegen doc link (#2120) 2022-12-21 00:14:09 +00:00
John DiSanti 381467d2ef
Add RFC for client crate organization (#1936)
Co-authored-by: Russell Cohen <rcoh@amazon.com>
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-12-08 20:12:37 +00:00
Russell Cohen 6beec943ab
Endpoints 2.0 Integration pre-work (#2063)
* Split endpoint resolution middleware into two parts & refactor endpoint generation

* Endpoints 2.0 Integration pre-work

This PR does a 3 bits of pre-work ahead of ep2 integration:
1. Split endpoint resolution into two separate middlewares:
  1. A smithy native middleware that applies URI and headers
  2. An AWS middleware that applies the auth schemes
2. Add vendorParams support to the ProtocolTestGenerator so that protocol tests can insert a region.
3. Simplify endpoint resolution logic by allowing `make_operation` to fail when an endpoint cannot be resolved.

* Back out previous change to insert endpoint directly into the bag

* backout changes to property bag

* Update changelog & add more docs

* Fix AWS test

* Fix test
2022-12-07 13:24:34 -05:00
Harry Barber d02ddea9d3
Fix server book documentation links (#2059) 2022-12-05 17:38:47 +00:00
Harry Barber 17cb98c975
Unhide new service builder and deprecate the prior (#1886)
Co-authored-by: david-perez <d@vidp.dev>
2022-12-02 18:31:00 +00:00
Harry Barber 5073a25bdb
Various small corrections to server documentation (#2050)
* Link to super from Handler and OperationService

* Note that structure documentation is from model

* Don't refer to ZSTs in operation_shape.rs opener

* Re-export everything from service to root

* Add reference to root documentation on service

* Fix spelling of MissingOperationsError

* #[doc(hidden)] for opaque_future

* Rename from-parts.md to from_parts.md

* Fix Connected link

* Use S type parameter and service as variable name

* Remove MissingOperation dead code

* Remove Operation header from operation.rs

* Remove reference to closures

* Document ConnectInfo<T> .0

* Add BoxBody documentation

* Rephrase operation.rs documentation

* Reference PluginPipeline from PluginStack

* Move the BoxBody documentation

* Document Plugin associated types

* Add example implementation for Plugin

* Link to plugin module from Plugin

* Improve FromParts/FromRequest documentation

* Remove links to doc(hidden) RuntimeError

* Add link from Upgradable to operation module
2022-12-02 13:56:35 +00:00
david-perez 7c86ecfc36
Add server SDK constraint traits RFC (#1199) 2022-12-01 16:07:23 +00:00
82marbag 9ae16e7949
RFC: RequestId for services (#1942)
* RFC 24 RequestId

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-11-30 14:20:53 +00:00
Luca Palmieri 044ebeac6f
Implement RFC 23, Part 2 - Plugin pipeline (#1971)
* Implement RFC 23, with the exception of PluginBuilder

* Update documentation.

* Avoid star re-exports.

* Elide implementation details in `Upgradable`.

* Update wording in docs to avoid personal pronouns.

* Update `Upgradable`'s documentation.

* Template the service builder name.

* Template MissingOperationsError directly.

* Code-generate an array directly.

* Sketch out the implementation of `PluginPipeline`.
Remove `PluginExt`.
Add a public constructor for `FilterByOperationName`.

* Ask for a `PluginPipeline` as input for the generated builder.

* Rename `add` to `push`.

* Remove Pluggable.
Rename `composer` module to `pipeline`.

* Remove all mentions of `Pluggable` from docs and examples.

* Fix punctuation.

* Rename variable from `composer` to `pipeline` in doc examples.

* Add a free-standing function for filtering.

* Rename.

* Rename.

* Update design/src/server/anatomy.md

Co-authored-by: david-perez <d@vidp.dev>

* Use `rust` where we do not need templating.

* Remove unused variable.

* Add `expect` message to point users at our issue board in case a panic slips through.

* Typo.

* Update `expect` error message.

* Refactor the `for` loop in ``requestSpecMap` into an `associateWith` call.

* Remove unnecessary bound - since `new` is private, the condition is already enforced via `filter_by_operation_name`.

* Use `Self` in `new`.

* Rename `inner` to `into_inner`

* Rename `concat` to `append` to correctly mirror Vec's API terminology.

* Fix codegen to use renamed method.

* Cut down the public API surface to key methods for a sequence-like interface.

* Add a note about ordering.

* Add method docs.

* Add Default implementation.

* Fix new pokemon bin example.

* Fix new pokemon bin example.

* Fix code-generated builder.

* Fix unresolved symbolProvider.

* Assign the `expect` error message to a variable.

* Do not require a PluginPipeline as input to `builder_with_plugins`.

* Reverse plugin application order.

* Upgrade documentation.

* Add a test to verify that plugin layers are executed in registration order.

* Add license header.

* Update middleware.md

* Typo.

* Fix more builder() calls.

Co-authored-by: david-perez <d@vidp.dev>
2022-11-16 18:10:51 +00:00
Luca Palmieri f13bb260a7
Implement RFC23 - Evolve the new service builder API (#1954)
* Implement RFC 23, with the exception of PluginBuilder

* Update documentation.

* Elide implementation details in `Upgradable`.

* Update wording in docs to avoid personal pronouns.

* Update `Upgradable`'s documentation.

* Template the service builder name.

* Template MissingOperationsError directly.

* Code-generate an array directly.

* Update design/src/server/anatomy.md

Co-authored-by: david-perez <d@vidp.dev>

* Use `rust` where we do not need templating.

* Remove unused variable.

* Add `expect` message to point users at our issue board in case a panic slips through.

* Typo.

* Update `expect` error message.

* Refactor the `for` loop in ``requestSpecMap` into an `associateWith` call.

* Fix new pokemon bin example.

* Fix new pokemon bin example.

* Fix unresolved symbolProvider.

* Assign the `expect` error message to a variable.

* Omit additional generic parameters in Upgradable when it's first introduced.

Co-authored-by: david-perez <d@vidp.dev>
2022-11-16 12:32:43 +00:00
John DiSanti 547dd4d608
Update errors RFC (#1977) 2022-11-11 09:35:04 -06:00
Luca Palmieri fa03f20bb9
Rename rfc0022_refine_builder.md to rfc0023_refine_builder.md (#1946)
* Rename rfc0022_refine_builder.md to rfc0023_refine_builder.md

* Add RFC23 to indexes
2022-11-04 11:06:24 +00:00
82marbag 49eb921b8d
Update RFC template (#1943) 2022-11-04 01:21:54 +00:00
Luca Palmieri 11e9a5f2c5
[RFC - Server] Refining the service builder API (#1859)
* RFC draft.

* Fix checkbox.

* Briefly describe the strategy in the `Overview` section.

* Add setter snippet

* Dive deeper into alternative mechanisms for scoping plugins.

* Add more changes.

* Fix snippet.

* Elaborate on type erasure.

* Remove dangling footnote.

* Fix common type.

* Add more caveats.

* Update the first approach for lazy type erasure
2022-11-03 17:18:23 +00:00
Harry Barber a026f6f6d6
Add FromParts documentation (#1930) 2022-11-01 18:04:39 +00:00
John DiSanti c35f0f1c7f
Add `#[non_exhaustive]` to example actionable error in RFC (#1883) 2022-10-26 22:28:43 +00:00
Harry Barber c18b1a0ab7
Add middleware documentation (#1844)
* Tweak plugin.rs documentation

* Add middleware.md
2022-10-25 12:21:20 +00:00
Harry Barber 55d16b1131
Make protocol ZSTs match shape ID names (#1858) 2022-10-17 14:00:43 +00:00
John DiSanti 7866477fd4
Add RFC for Error Context and Compatibility (#1819)
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-10-12 17:53:28 +00:00
Harry Barber 03ad6e7e52
Fix broken module path in instrumentation documentation (#1843) 2022-10-12 12:16:13 +01:00
Harry Barber bf3fbc2e1d
Add "Anatomy of a Service" documentation (#1782)
* Rust documentation improvements

* Add "Anatomy of a Service" documentation
2022-10-11 18:40:49 +00:00
Harry Barber d953a4466f
Add Server section to the Book (#1813)
* Move docs to server folder

* Index the Server folder

* Fix markdown lints

* Add basic overview.md to server folder
2022-10-05 17:10:43 +00:00
Luca Palmieri 368e13f23d
Amend the example of generated code in the design docs to match current behaviour (#1789)
* Amend the example of generated code in the design docs to match current behaviour.

* A few more capitalization issues.
2022-09-30 12:44:13 +00:00
Luca Palmieri 4c5cbc3938
Fix a few rendering issues in the design docs (#1787)
* Fix backtick fences to render code block

* Render list as a list instead of a code block.

* Indent further to get nested code block.

* Remove `ignore` descriptors.
2022-09-30 12:30:47 +01:00
Harry Barber dcfb85578e
Add Instrumentation documentation (#1772)
* Add documentation covering instrumentation approaches for Smithy Rust.

* Tweak the logging in the Pokemon service to better exemplify instrumentation.
    * Remove `TraceLayer` which violates sensitivity contract.
    * Switch to [Pretty](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/format/struct.Pretty.html) logs to better showcase the outputs.

* Update [Logging in the Presence of Sensitive Data](https://github.com/awslabs/smithy-rs/pull/1536) checklist.
* Rename `logging` module to `instrumentation` to improve coherence across struct names and documentation.
2022-09-28 12:57:48 +01:00
82marbag 911f2817b7
Docs: generation of Pokemon service (#1652)
* Docs: generation of Pokemon service

This is an overview of the Pokémon service. It describes:
* How a smithy-rs customer uses the vanilla SDK and writes their business logic
* What the runtime is and how code is generated
* The folder structure of the project

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-09-27 08:11:08 +00: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
Harry Barber fd94858db8
Add new service builder codegen (#1693)
* Add `ServerProtocol` interface to allow for server side protocol specific methods.

* Make public the structs merged in https://github.com/awslabs/smithy-rs/pull/1679.

* Add `ServerOperationGenerator`, which generates a ZST and implements `OperationShape` on it.

* Add `ServerServiceGeneratorV2`, which generates the service newtype around a router and a service builder.

* Add `hidden` argument to `RustModule` which allows modules to be marked with `#[doc(hidden)]`.

* Add `BuildModifier` trait to provide a common interface for extending service builders.

* Add `Upgradable` trait to simplifying bounds when upgrading from an `Operation` to a HTTP service.

* Add `FromRequest`, `FromParts`, and `IntoResponse` implementations.

* Make `RoutingService` accept general body types `B` for the inner services `http::Response<B>`.

* Use new service builder in protocol tests.
2022-09-12 14:27:41 +01:00
John DiSanti 0122f15eff
Update dependency versions RFC status (#1712) 2022-09-07 15:04:50 -05:00
John DiSanti d8a8ce5f39
RFC: Rust dependency versions (#1685)
* Add RFC for Rust dependency versions
* Fix categorization of generated server crates
2022-09-06 15:28:47 +00:00
82marbag dd5e4bf0b4
Add RFC 20 to the RFCs (#1704)
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-09-06 09:47:31 -05: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
Harry Barber bc9c9f3bad
RFC: Service Builder Improvements (#1620)
Co-authored-by: david-perez <d@vidp.dev>
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2022-08-30 16:56:42 +01:00
Zelda Hessler 5b260e5db9
Add: Q to FAQ about `make_operation` vs middleware (#1642) 2022-08-18 19:49:12 +00:00
Harry Barber ed2a866c8e
Add server side HTTP logging layer (#1550)
* Add `MakeFmt` trait which modifies `Display`/`Debug` implementations.

* Add `http` wrappers which modify the `Debug` and `Display` implementations based on closures marking sensitivity. Each wrapper has an associated `MakeFmt` impl.

* Add `InstrumentOperation` [tower::Service](https://docs.rs/tower/latest/tower/trait.Service.html) which logs requests and responses. Accepts a `MakeFmt` for each potentially sensitive component of the request/response.

* Add [ServerHttpSensitivityGenerator.kt](https://github.com/awslabs/smithy-rs/compare/harryb/add-logging?expand=1#diff-a7ad7f28d152bba6f2a63f3bde498582d91c8f7ab9c2de0c7f4494d6fd1c02ff) which generates marker closures from models.

* Apply `InstrumentationOperation` to the `OperationHandler` using `MakeFmt`s using the marker closures.

Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
2022-08-02 21:32:03 +00:00
Harry Barber 738d84cc2a
RFC(edit): Logging in the Presence of Sensitive Data (#1591)
* Fix grammar

* Merge public and internal guideline
2022-07-29 19:11:36 +00:00
82marbag 74a106f195
Update Status of RFCs (#1593)
* Update Status of RFCs

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-07-28 14:48:38 +00:00
82marbag 68feb37e0a
Add RFC 19 to the summary (#1584)
Add RFC 19 to the summary (#1584)

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-07-27 16:31:58 +00:00
82marbag 720a106bbb
Update RFC links (#1574)
* Update RFC links

Some links in https://awslabs.github.io/smithy-rs/design/rfcs/overview.html
are broken.

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-07-26 17:58:51 +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
Harry Barber 5edd9d265d
RFC: Logging in the Presence of Sensitive Data (#1536) 2022-07-22 21:33:41 +01:00
John DiSanti e4d8dca25b
RFC: Customizable client operations (#1545)
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-07-18 16:46:15 -07:00
Zelda Hessler 4d4f91a007
add: RFC for supporting flexible checksums (#1451)
* add: RFC for supporting flexible checksums
add: link to RFC0016 in SUMMARY.md
fix: too many zeroes in RFC filenames

* update: sigv4 update section language

* update: RFC overview
remove: arbitrary chunk size limit

* update: RFC code to be safe from num conversion panics
2022-06-10 15:32:43 -05:00
Zelda Hessler 4194333c88
add: rfc template (#1428)
add: info about RFC process
update: CONTRIBUTING.md to mention RFCs
2022-06-01 10:41:29 -05:00
Zelda Hessler 8ef9a8580b
add: article on difficulties Zelda encountered while implementing streaming checksums (#1427)
* add: contributing docs overview page
add: article on difficulties Zelda encountered while implementing streaming checksums
update: SUMMARY.md table of contents
add: link to contributor design docs in CONTRIBUTING.md
2022-06-01 10:03:23 -05:00
Zelda Hessler c66ef58ce1
RFC: How Cargo "features" should be used in the SDK and runtime crates (#1067)
* in-progress draft of features RFC

* add: info on default feature functionality change

* Update design/src/rfcs/rfc0009_using_features_responsibly.md

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

* rename: RFC filename
add: rfc to summary page
remove: TODO section

* update: design summary ToC
remove: default feature example

* fix: RFC numbers in SUMMARY ToC

* fix: bad link

Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-04-28 13:40:26 -05:00
Zelda Hessler 278cc765ad
RFC: Fine-grained Timeout Configuration (#816)
* add: boilerplate for new RFC

* update: "Configuring Timeouts" section

* add: unstructured thoughts on confusing terms

* update: Refine and organize the terms section

* Update design/src/rfcs/rfc0007_timeout_config.md

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

* update: terms section based on comments

* add: section on current structure of services
add: proposal for where to implement timeouts

* update: implementation checklist section

* update: refer to read timeout instead of write timeout

* Update design/src/rfcs/rfc0007_timeout_config.md

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

* Update design/src/rfcs/rfc0007_timeout_config.md

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

* Update design/src/rfcs/rfc0007_timeout_config.md

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

* Update design/src/rfcs/rfc0007_timeout_config.md

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

* fix: update opening summary
update: terminology section per John's suggestions
add: section demonstrating necessary changes to Client
update: implementation checklist

* update: implementation status/notes
remove: TODO
add: note about layers

Co-authored-by: Russell Cohen <rcoh@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-04-27 15:41:11 -05:00
Zelda Hessler d9e3bb6646
add FAQ entry on "why we don't use `serde`" (#1348)
* add: FAQ entry "why don't we use serde?"

* update: quantify how much serde slows compilation
2022-04-27 15:52:09 -04:00
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