Skip to content
Unverified Commit 92b0704d authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Allow SDK to be built with unknown traits in models (upgrading Smithy to...

Allow SDK to be built with unknown traits in models (upgrading Smithy to 1.29.0 as part of it) (#2547)

## Motivation and Context
Addresses https://github.com/awslabs/smithy-rs/issues/2104

## Description
This PR allows us to build `aws-sdk-rust` even with unknown traits
present in the AWS models. This requires `Smithy` 1.29.0 that includes
[support](https://github.com/awslabs/smithy/pull/1685) for an extension
property,
[allowUnknownTraits](https://smithy.io/2.0/guides/building-models/gradle-plugin.html?highlight=allowunknowntraits#smithy-extension-properties

).

## Testing
Manually added a unknown trait into an AWS model like so:
```
diff --git a/aws/sdk/aws-models/sts.json b/aws/sdk/aws-models/sts.json
--- a/aws/sdk/aws-models/sts.json
+++ b/aws/sdk/aws-models/sts.json
@@ -69,6 +69,7 @@
                 "aws.auth#sigv4": {
                     "name": "sts"
                 },
+                "aws.protocols#awsQuery2": {},
                 "aws.protocols#awsQuery": {},
```
and confirmed `/gradlew :aws:sdk:assemble` built SDK successfully. Also
verified that without `allowUnknownTraits = true` in
`aws/sdk/build.gradle.kts`, `/gradlew :aws:sdk:assemble` failed with the
above unknown trait.

----

_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: default avatarYuki Saito <awsaito@amazon.com>
parent 437ae5bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment