Commit Graph

1143 Commits

Author SHA1 Message Date
82marbag 8a79ba50d1
Remove CodegenMode, use CodegenTarget (#1414)
* Remove CodegenMode, use CodegenTarget

Closes: #1413

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-05-27 10:05:03 -04:00
82marbag e577766517
Allow @required with @httpPrefixHeaders (#1410)
* Allow `@required` with `@httpPrefixHeaders`

The server generates members with `@required` and `@httpPrefixHeaders` as if
they were always optional. This commit allows the correct generation with `@required`.

Closes: #1394

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-05-27 12:34:19 +00:00
82marbag 1f31eae373
Correctly generate http response codes (#1405)
* Correctly generate http response codes

http response codes will be:
* `@httpResponseCode` if set
* `@http`'s code, if `@httpResponseCode` is not set
* the default one, if neither of the above are set

@httpResponseCode honors @required and generates code that
doesn't use Option when applied.

Closes: #1229
2022-05-27 09:25:33 +00:00
John DiSanti a5790f7e5f
Implement release-aware yank tooling (#1407) 2022-05-26 17:28:36 -07:00
John DiSanti 16fda3a839
Simplify a `Clone` impl (#1418) 2022-05-26 22:56:18 +00:00
Jesse Szwedko 53fab07a46
Add support for `credential_process` from profiles (#1356)
Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-05-26 14:01:50 -07:00
Kyle Thomson fe582a8d68
Add local publish configuration to rust-runtime (#1415)
* Add local publish configuration to rust-runtime

* Removing unnecessary `maven` plugin
2022-05-26 17:04:27 +00:00
John DiSanti 7035f48d8e
Add flag to bypass confirmation prompt for crate publish (#1408) 2022-05-25 17:38:14 -07:00
Petros Angelatos bb9f2dc111
Use md5 implementation of RustCrypto organization (#1404) 2022-05-24 10:36:03 -07:00
John DiSanti f4a053bee0
Add release metadata to `versions.toml` (#1400) 2022-05-23 23:31:23 +00:00
82marbag 35989d2fec
Unknown enum variants removed from server (#1398)
The server must have the most up to date variants and the unknown enum
variant should not be used. Clients are generated with it because they
might not have the most recent model and the server might return
an unknown variant to them.

Closes #1187

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

Co-authored-by: Daniele Ahmed <ahmeddan@amazon.de>
Co-authored-by: david-perez <d@vidp.dev>
Co-authored-by: Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
2022-05-23 20:16:23 +01:00
david-perez d6e2944c40
Refactor `testCodegenContext` (#1340)
Instead of fabricating a new service shape when the caller does not
explicitly provide one, first attempt to obtain one from the passed in
model, which is a more faithful test code generation context.
2022-05-23 17:39:53 +00:00
Matteo Bigoi 5438979a2e
Add 82marbag to the list of maintainers (#1402) 2022-05-23 10:26:40 -05:00
Matteo Bigoi ebabb98745
Implement Python runtime crate and shared socket (#1399)
* Add the Python runtime crate `aws-smithy-http-server-python`
* Implement SharedSocket support.
* Implement logging to tracing support.
2022-05-20 17:08:57 +00:00
John DiSanti 2cd82cb862
Remove individual devs from crate ownership in crates.io (#1396) 2022-05-18 16:26:30 -07:00
Matteo Bigoi 5881feaf8f
[Server] Implement Gradle subprojects and scaffolding for the Python server. (#1366) 2022-05-18 14:26:29 +00:00
John DiSanti 6fe28ceeee
Remove `smithy-rs-sync` tool (#1393) 2022-05-17 08:53:57 -07:00
Zelda Hessler 75d50dd157
feature: conversion method for `ByteStream` into `AsyncRead` implementor (#1391)
* feature: conversion method for ByteStream into AsyncRead implementor
add: impl From<byte_stream::Error> for std::io::Error
add: CHANGELOG.next.toml entries

* fix: unused dep

* add: docs
2022-05-16 22:34:54 +00:00
alonlud 5620922d23
Add excluded headers option to `aws-sigv4` (#1381) 2022-05-16 14:02:02 -07:00
AWS SDK Rust Bot 9db2a737c4 Update changelogs 2022-05-13 17:56:33 +00:00
82marbag 154c5d1bd0
Update crates to Rust 2021 (#1388)
Generate crates using Rust 2021 instead of Rust 2018
Remove use std::convert::TryFrom which is in the prelude

Closes #1332

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-05-13 14:28:52 +01:00
John DiSanti 4b3f9e06c4
Add retry to the `publish` tool (#1376) 2022-05-12 11:42:25 -07:00
John DiSanti 895b8c0020
Prep for release (#1386)
* Version bump

* Update SDK models

* Revert the S3 model since checksum support hasn't landed yet
2022-05-12 10:17:39 -07:00
John DiSanti d50093bb41
Add comment about `SMITHY_RS_DOCKER_BUILD_IMAGE` (#1383)
Co-authored-by: Zelda Hessler <zhessler@amazon.com>
2022-05-12 08:01:06 -04:00
John DiSanti e1e9a29d5d
Fix some bugs in the `sdk-sync` tool (#1382) 2022-05-11 16:46:04 -07:00
John DiSanti 83af60855f
Add option to create a release manifest to changelog tool (#1384) 2022-05-11 15:20:27 -07:00
david-perez fb5e235446
Register Gradle tasks instead of eagerly creating them (#1374)
Using `.register()` avoids creating possibly unnecessary tasks.
2022-05-11 19:51:14 +02:00
82marbag 003b1db6e7
Remove axum-core dependency (#1368)
This change removes the dependency on axum-core and brings in the
relevant resources we are using from that crate.

Issue: #1170

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
2022-05-11 13:02:59 +01:00
Zelda Hessler 34369e2dc0
Update `FsBuilder`-based `ByteStreams` to support file offsets (#1361)
* add: offset setter to FsBuilder
remove: file_size setter from FsBuilder
add: length setter to FsBuilder
add: test for ByteStream w/ offset
add: test for ByteStream w/ length less than file size
update: path_based_bytestreams_with_builder test

* add: test ensuring offset and length work correctly together
add: test ensuring that no data is returned when offset is greater than file size
add: test ensuring that nothing breaks if length to read is larger than file size

* add: chunking test
add: CHANGELOG.next.toml entry
refactor: new code based on PR comments

* remove: unused use statement

* refactor: length API

* update: prefer unwrap() to returning error in tests

* update: prefer unwrap() to returning error in tests
add: test for Length::Exact behavior

* update: error if offset is greater than file length

* fix: test to work with new offset error

* update: error test to be more specific
2022-05-10 21:41:24 +00:00
david-perez 45323f7455
Minimize `AdditionalErrorsDecoratorTest.kt` (#1339) 2022-05-10 18:14:20 +02:00
John DiSanti ad569b17d0
Add locale env vars to build image (#1380)
Co-authored-by: Russell Cohen <rcoh@amazon.com>
2022-05-10 15:14:49 +00: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
Matteo Bigoi f312de343e
Add Pokemon service cmdline arguments using clap. (#1371)
* Add command line arguments for server and port. Default the bind address to localhost
* Update rust-runtime/aws-smithy-http-server/examples/pokemon_service/src/main.rs
* Remove tracing::instrument as we should create the spans inside the code generated code

Co-authored-by: david-perez <d@vidp.dev>
2022-05-06 17:53:38 +00:00
John DiSanti ae9a5ed50a
Add support for automated model updates to the changelog tool (#1360) 2022-05-03 10:38:57 -07:00
Caleb McCarthy 6b3a033a0a
Point example links to example's in current branch so this will work for all branches and other git applications like gitea (#1358)
Co-authored-by: Caleb McCarthy <caleb.a.mccarthy@gmail.com>
2022-05-03 09:33:25 -05:00
John DiSanti 959d42931e
Refactor the `sdk-sync` tool to sync commits in parallel (#1357)
* Fix tests on MacOS

* Sync smithy-rs commits in parallel
2022-05-02 13:25:44 -07:00
John DiSanti 3aab82749b
Add a debug log entry for retries (#1352) 2022-05-02 18:02:09 +00:00
Russell Cohen 9b6210c105
Release (#1351)
* Bump version numbers in gradle.properties

* Add auto-changelog script

* Update models, holding back S3

* Update CI to 1.58.1
2022-04-28 22:24:21 +00: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
John DiSanti 8149106ca2
Fix the CI status badge in the README (#1350) 2022-04-28 09:06:48 -07:00
John DiSanti 734acc175c
Update locked dependencies (#1349) 2022-04-27 15:24:30 -07: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
John DiSanti 0c011d635c
Fix local CI on M1 Macs (#1346)
The `acquire-build-image` script was coded up with the assumption that
it would only work with x86_64 build images. This commit revises that
script and the `Dockerfile` to correctly work on ARM64 architectures as
well.
2022-04-27 16:45:15 +00: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
Ryan Scott Brown bea5f1d2c3
fix: Silence home directory warning in Lambda Extensions (#1344)
* fix: Silence home directory warning in Lambda Extensions

This PR follows on to https://github.com/awslabs/smithy-rs/pull/893 which added
LAMBDA_TASK_ROOT check. When running as a [Lambda Extension][ext]
the environment variable for TASK_ROOT is redacted, so it is not
reliable for testing whether you are in Lambda.

Related commit: fbb4bc

[ext]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html

* update changelog

* fixup: use AWS_LAMBDA_FUNCTION_NAME which is available in both environments

* Update CHANGELOG.next.toml

* Fix failing unit test

Co-authored-by: John DiSanti <jdisanti@amazon.com>
2022-04-26 20:19:34 -07:00
John DiSanti b43dc6df7b
Fix SDK assemble Gradle pathing issue (#1343)
On M1 Macs, Gradle's working directory is the path of the Gradle daemon
rather than the project root. The SDK's `IntegrationTestDecorator` was
assuming that the working directory would always be the project root, so
assemble was failing on this setup.

This commit adds SDK-specific settings so that the integration test
directory can be configured in `smithy-build.json`.
2022-04-26 16:28:56 +00:00
John DiSanti c60da3faad
Lint for external types in `aws-config` during CI (#1337) 2022-04-26 08:47:09 -07: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