Commit Graph

28 Commits

Author SHA1 Message Date
John DiSanti bac720ef42
Independently version deprecated runtime crates (#3364)
This PR sets independent versions for the deprecated runtime crates so
that they won't publish new version numbers with every release anymore.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2024-01-16 18:36:30 +00:00
Russell Cohen 06e66d191c
Scrape doc examples (#3334)
## Motivation and Context
Extracted from #3308, this adds doc example scraping. This won't make
much of a difference yet but it will help if we're able to move example
repos directly under the SDKs themselves when appropriate.

## Description
https://doc.rust-lang.org/rustdoc/scraped-examples.html

## Testing
verified that examples appear in docs when expected

## Checklist
no changelog

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-12-20 18:11:43 +00:00
Russell Cohen 0bcc193628 Add the `docsrs` autocfg attr to all crates
This also adds it to generated crates, and adds an autofix+lint to manage these attributes.
2023-12-08 10:24:19 -05:00
John DiSanti 6438a09bef
Fix repo org move issues (#3166)
This PR fixes issues introduced by moving the repository from
awslabs/smithy-rs to smithy-lang/smithy-rs.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-11-10 18:51:04 +00:00
John DiSanti 08196ec893
Remove remaining middleware code (#3038)
This PR removes the remaining rust-runtime code to support middleware,
deprecates empty crates, and removes the remaining codegen references to
any of that code. In the interest of keeping code review easier, a
separate PR will finish addressing the remaining
`TODO(enableNewSmithyRuntime)` comments.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-10-09 17:13:22 +00:00
Russell Cohen 05f920f672
Upgrade Tokio to 1.23.1 (RUSTSEC-2023-0001) (#2474) 2023-03-20 17:44:00 +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
Russell Cohen 61934da044
Add connection poisoning to aws-smithy-client (#2445)
* Add Connection Poisoning to aws-smithy-client

* Fix doc links

* Remove required tokio dependency from aws-smithy-client

* Remove external type exposed

* Rename, re-add tokio dependency

* Change IP to 127.0.0.1 to attempt to fix windows

* Add dns::Name to external types

* Remove non_exhaustive not needed

* Add client target to changelog
2023-03-14 20:08:35 +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 bf6cf7508a
Add `tracing` events to signing and event streams (#2057)
* Emit a trace with the string to sign when signing
* Add traces to event stream message send/receive
* Add a message to dispatch trace
2022-12-07 23:43:00 +00:00
John DiSanti 3cdf49e6cb
Improve client tracing spans (#2044)
* Emit spans for implementers of map request middleware traits
* Instrument dispatch with its own span
* Fix trace span hierarchy
* Partially flatten the middleware span hierarchy
* Make `MapRequest::name` required
* Add sub-spans to the `load_response` span
2022-12-07 23:06:16 +00:00
John DiSanti fba88df3ee
Revamp errors in `aws-smithy-http` (#1884) 2022-11-15 19:18:26 +00:00
Zelda Hessler 4c852b1d0b
Add operation metadata to property bag just before sending request through middleware (#1920)
* update: add operation metadata to property bag during `make_operation`
add: test ensuring metadata is added to property bag
add: CHANGELOG.next.toml entry

* update: use new strategy for op metadata insertion
update: a new strategy requires a new test
update: CHANGELOG.next.toml

* format: run cargo fmt
2022-10-28 15:30:41 -05:00
Vojtech Kral b02f9ade3c
aws-smithy-http-tower: Lower log level of two info logs (#1735) 2022-09-19 17:40:26 +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
John DiSanti 31c5a91a25
Upgrade min versions of tokio, tracing-subscriber, and criterion (#1662)
* Upgrade minimum Tokio version to 1.8.4

This addresses RUSTSEC-2021-0072 and RUSTSEC-2021-0124.
The SDK, runtime crates, and server are set to the minimum secure
version of Tokio to allow a larger range of versions to be used by
consumers of those libraries. The tools and the Python server are
both set to the latest Tokio version since they are not intended
to be consumed as a libraries.

* Upgrade `tracing-subscriber` to 0.3.15

* Upgrade `criterion` to 0.3.6

This addresses RUSTSEC-2021-0093 by upgrading `criterion`, which
upgrades `rayon`, which upgrades `crossbeam-deque`.
2022-08-31 21:19:04 +00: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
Zelda Hessler 3f108165aa
Update: swap pin-project for pin-project-lite (#1503)
* update: swap pin-project for pin-project-lite
* remove: pin attribute from `aws_smithy_http::body::Inner::Once` enum variant
* remove: unnecessary usage of pin-project
* Update CHANGELOG.next.toml

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-06-28 14:01:39 -05: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
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
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
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
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