Commit Graph

27 Commits

Author SHA1 Message Date
Zelda Hessler 9c95803a73
add support for adaptive retries when orchestrator mode is enabled (#2800)
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
#2190  

## Description
<!--- Describe your changes in detail -->
add support for adaptive retries

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
I wrote some tests and I'm open to suggestions for more.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-06-28 17:38:00 +00:00
John DiSanti fbeaab9d38
Remove `get`/`put` methods from `ConfigBag` and `Layer` (#2807)
This PR removes the non-storable `get`/`put` methods from `ConfigBag`
and `Layer`.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-06-23 23:13:12 +00:00
John DiSanti 3d0db5650c
Categorize orchestrator TODO comments into `Launch` and `Cleanup` (#2774)
This PR categorizes orchestrator TODO comments into `Launch` and
`Cleanup`:

- `enableNewSmithyRuntimeLaunch`: Comment needs to be addressed before
orchestrator launch
- `enableNewSmithyRuntimeCleanup`: Comment needs to be addressed after
launch when removing middleware

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-06-15 17:06:28 +00:00
John DiSanti 8e37d42f3c
Unpin the `arbitrary` and `derive-arbitrary` dependencies (#2765)
These no longer need to be pinned since the current MSRV is compatible
with their latest versions.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-06-13 15:58:27 +00:00
Zelda Hessler 8c4d186487
Update dependencies flagged by cargo audit (#2753)
Also, sort `Cargo.toml` dependencies if they were disordered.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-06-12 17:09:29 +00:00
John DiSanti 8773a70428
Simplify event stream message signer configuration (#2671)
## Motivation and Context

This PR creates a `DeferredSigner` implementation that allows for the
event stream message signer to be wired up by the signing implementation
later in the request lifecycle rather than by adding an event stream
signer method to the config.

Refactoring this brings the middleware client implementation closer to
how the orchestrator implementation will work, which unblocks the work
required to make event streams work in the orchestrator.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-05-26 15:49:56 +00:00
Zelda Hessler 92952cbe51
Update MSRV to 1.66.1 (#2468)
* update: MSRV to 1.66.1

* add: CHANGELOG.next.toml entry

* update: Dockerfile too

* fix: clippy lints

* fix: sigv4 event_stream.rs clippy lint
update: codegen clippy lint allowlist

* fix: doc lint that's nightly only
add: docs for aws-smithy-http
add: docs for aws-smithy-client
add: docs for aws-smithy-async

* add: more missing docs.

* fix: add more missing docs

* remove: unnecessary & in HttpBindingGenerator
fix: lint name

* fix: another doc import

* fix: test broken by changing compiler error

* fix: even more lints\nadd: lint warns to all smithy runtime crates

* fix: broken doc links

* fix: clippy bug

* fix: don't use modules named lib in codegen tests

* fix: the paginator_canary.rs unnecessary cast
2023-03-16 21:58:14 +00:00
Nugine de186678ee
Bump Rust MSRV to 1.63.0 (#2222)
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2023-02-10 12:59:31 -08:00
John DiSanti 12f217b38f
Revamp errors in `aws-smithy-eventstream` (#1873) 2022-11-11 23:25:13 +00:00
John DiSanti 03b83473ff
Pin `derive_arbitrary` version (#1887) 2022-10-21 09:40:28 -05:00
Luca Palmieri 18d969e160
Upgrade to Rust 1.62.0 (#1825)
* Run clippy --fix for Rust 1.62.0 and format the resulting code

* Run clippy --fix on all targets

* Run clippy --fix with all features enabled

* Avoid extra allocation

* Use more idiomatic assert

* Ignore noisy lint

* Update pyo3 and pyo3-asyncio to 0.17.0

* Implement Eq on aws-smithy-checksums::Error

* Implement Eq on Protocol

* Replace conditionals with range-containment

* Implement Eq on types in aws-smithy-types

* Implement Eq on types in aws-smithy-http-server-python

* Implement Eq on types in aws-smithy-eventstream

* Implement Eq on types in aws-smithy-xml

* Implement Eq on aws-sigv4

* Update CI to use Rust 1.62.0

* Add Eq for generated types that implement PartialEq

* Allow clippy::needless_return in generated code

* Remove unnecessary reborrow in http_serde

* Remove unnecessary borrow in operation_deser

* Add CHANGELOG entries

* Revert "Add Eq for generated types that implement PartialEq"

This reverts commit 5169bd95aa.

* Update pyo3 and pyo3-asyncio in generated code for python server

* Allow clippy::derive_partial_eq_without_eq on structs and builders

* Run clippy on tools

* Fix accidental move in generated code

* Revert "Allow clippy::derive_partial_eq_without_eq on structs and builders"

This reverts commit 068c63ca20.

* Fix another accidental move in generated code

* Undo unwanted change to model

* Re-add reborrow in HttpBindingGenerator

* Fix clippy::format-push-string in changelogger

* Fix more uses of str.push_str(&format!(...))

* Remove unnecessary parenthesis

* Run ktlint

* Update aws/rust-runtime/aws-http/src/content_encoding.rs

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

* Update aws/rust-runtime/aws-http/src/content_encoding.rs

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

* Ignore doctest for non-exported macro

Rust 1.62 introduced a breaking change where doctests for non-exported
macros are now run by default. These don't compile because the macro
can't be imported in it.
See https://github.com/rust-lang/rust/issues/97030 for more info.

* Run cargo fmt

* Use $crate instead of crate in macro

* Revert "Implement Eq on types in aws-smithy-types"

This reverts commit c45a6b5a56.

* Revert "Implement Eq on types in aws-smithy-eventstream"

This reverts commit 78f4b07344.

* Revert "Implement Eq on types in aws-smithy-xml"

This reverts commit 590f01af73.

* Revert "Implement Eq on aws-sigv4"

This reverts commit d78bb62124.

* Revert "Implement Eq on types in aws-smithy-http-server-python"

This reverts commit f2cd901884.

* Revert "Implement Eq on aws-smithy-checksums::Error"

This reverts commit 5da170405e.

Co-authored-by: Julian Antonielli <julianantonielli@gmail.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-10-17 09:32:12 +01:00
John DiSanti 2bcf4da6b8
Fix CI by pinning version of `arbitrary` (#1681) 2022-08-30 09:13:45 -05:00
John DiSanti cbbbec4a48
Check external types for runtime and SDK crates in CI (#1625)
* Rename `cargo-api-linter` to `cargo-check-external-types`
* Run `cargo-check-external-types` on Smithy client/shared runtime crates
* Run `cargo-check-external-types` on SDK runtime crates
* Fix bug in determining crate name
* Run `cargo-check-external-types` on generated SDK crates
2022-08-10 18:33:43 -07:00
Harry Barber 0fb5ccb814
Remove excess cargo test passes from additional-ci (#1595)
* Use --exclude-all-features in additional-ci

* Remove excess cargo test --all-features

* Improve powerset echo
2022-07-28 20:40:49 +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
Russell Cohen c8fe6e2adf
Fix several minimal version bugs and add it to CI (#1365)
* Fix several minimal version bugs and add it to CI

* Fix docker image

Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-05-09 17:14:14 +00:00
John DiSanti a0539e20b0
Fix `SPDX-License-Identifier` in header comments (#1377)
* Fix misc whitespace with pre-commit

* Revise copyright check in `sdk-lints`

* Fix `SPDX-License-Identifier` in header comments
2022-05-09 09:50:46 -05:00
Russell Cohen 6bbc776d67
Smithy async docs (#1278)
* Add lints to aws-smithy-async

* Write some event stream docs, and enable lints

* Codegen docs

* Fix one missing doc

* Compile fixes

* remove accidentally added code

* Update codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt

* Update response headers docs
2022-04-05 16:17:00 +00:00
Zelda Hessler b2c989630f
Update to Rust Edition 2021 (#1268)
* update: set rust edition to 2021
update: strict param of intoCrate to set clippy to set #![deny(clippy::all)]

* add: changelog entry
2022-03-22 21:29:04 +00:00
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
John DiSanti 3b54f12443
Reorganize CI and add per-crate CI checks (#942)
* Add ability to have per-crate CI checks

* Split SDK CI into a separate workflow file

* Combine SDK tests into one matrix job

* Rename the codegen diff workflow

* Combine codegen tests into one matrix job
2021-12-08 15:43:13 -08: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 1f71c35713
Docs licenses (#909)
* CR feedback

* Correct warning
2021-12-01 13:01:53 -05: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
Russell Cohen 35de48a214
Add a few READMEs + linter script (#899)
* Add a few READMEs + linter script

* Add initial linter script

* Add CI job

* Apply suggestions from code review

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

* Add README fix command

* Add newline in footer

* Add footer support to generator

* Also run fixes in CI

* Add note about smithy-types

* cleanups to scripts and READMEs

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2021-11-30 14:37:42 -05: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 1aa59693ee
Prefix Smithy runtime crates with `aws-` (#788)
* Prefix Smithy runtime crates with `aws-`

* Update changelogs
2021-10-20 10:21:15 -07:00