Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: relocate AWS protocol support #1051

Merged
merged 261 commits into from
Mar 14, 2024
Merged

refactor: relocate AWS protocol support #1051

merged 261 commits into from
Mar 14, 2024

Conversation

aajtodd
Copy link
Contributor

@aajtodd aajtodd commented Mar 11, 2024

Issue #

downstream: awslabs/aws-sdk-kotlin#1254

Description of changes

This PR relocates AWS protocol support and protocol tests from aws-sdk-kotlin into smithy-kotlin. Commit history has been preserved. If you want to see the actual changes look at commits starting from ae7a697

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

aajtodd and others added 30 commits September 18, 2020 10:05
* Add provisional types for AWS region and credentials.  Add extension mechanism for AWS-specific client config class codegen.

* client runtime work in progress.  This snapshot is on a branch to help debugging multiplatform build issue.

* Remove js mpp code

* Add documentation and cleanup for aws service configuration types.

* WIP

* Integrate AwsRegion into a ServiceEndpointResolver feature used to map region ids to endpoint host names.

* Break region and credentials into seperate modules from core.  Update dependency relationships.

* Add service config integrations for aws regions and credentials.

* Add new test to ignore set, will address in follow-up PR.

* Cleanup

* Add note regarding demo code

* Updates from PR feedback

* Fix credential resolver function from PR feedback

* Update PR based on feedback.  Ktlint upgrade for Kotlin 1.4 and associated automated style changes.
* Add build flag to always regenerate from models, following build in protocol test module

* Specify idempotency state to HttpSerde feature for codegen.
* Augment response code matching policy to allow httpResponseTest code to pass

* Enable HttpResponseCode test
* Update gradle version to current prod version

* Update JVM test dependencies for MPP modules.  Update JUnit to current prod version, synced with smithy-kotlin.

* auto lint cleanup
* WIP

* Add RestJsonListsSerializeNull tests back in for Smithy 1.4 update.

* Support ability to generate a specific protocol test in addition to specifying exclusions.

* Remove ignored tests for sparce and null test cases.

* cleanup

* Update test containment code based on upstream changes
* Remove invalid property on RegionConfig type to fix compiler error when running tests.

* Rename codegen package namespace in prep for awsJson support in subsequent PR

* automagic lint fix
* Refactor integration codegen for protocol-directed http binding resolution

* Refactor protocol test code to allow awsJson in addition to restJson protocols

* Refactor RestJsonError

* Shorten base package name to aws.sdk.kotlin. Organize classes by theme.

* Comments and cleanup

* Add unit tests for awsJson protocol support

* Remove previously moved classes re-added by rebase from main

* Populate service name in target header

* automatic lint fixes

* Minor cleanup from PR feedback

* Fixes and cleanup from PR feedback

* Fixes and cleanup from PR review

* lint cleanup

* Cleanup from PR feedback

* Fix invalid imports generation added when switching to symbol builder dsl
This commit adds a simplified endpoint resolver that replaces the "dummy" interceptor before it.

This new simplified resolver uses the proper AWS service endpont prefix (before this service name was used erroneously).

This will be expanded on in the future to be based on endpoints.json.
* Rename client runtime packages to aws.sdk.kotlin.runtime.

* Fix copyright headers from bad local config.

* Package namespace and annotation cleanup from PR feedback

* Update references to aws-crt-kotlin to use updated package namespace, add some lingering copyright header fixes missed in previous commit.
This commit sets up a "two pass" build system which requires you to first generate the SDK artifacts (including the build.gradle.kts file). After you've generated the SDK(s) they are available to build as part of the overall gradle build. See the README for use.
* Update CI workflows to use [`aws-crt-builder`](https://github.com/awslabs/aws-crt-builder). 
* Split lint workflow out to run on every `push`
* Run all protocol tests as part of CI
* Fix generated (protocol) unit tests to configure dummy aws credentials as necessary
…ta (#61)

* Generate an endpoint resolver using endpoints.json data
* Implement a resolver in terms of endpoints.json types (e.g. partitions, endpoint definitions, etc)
* Update the service resolver middleware to apply hostname prefix if present in the context
aws-sdk-kotlin-ci and others added 17 commits November 28, 2023 05:31
First step to separating AWS protocol support from AWS SDK specific customizations. Specifically we introduce a new module aws-sdk-codegen which is everything AWS SDK for Kotlin specific. The existing smithy-aws-kotlin-codegen now only contains AWS protocol support.

refactor: Split out AWS SDK for Kotlin specific customizations into a new module aws-sdk-codegen
refactor: Use the software.amazon.smithy.kotlin.codegen.aws namespace for AWS protocol support instead of aws.sdk.kotlin.codegen to better align with the rest of the code generation in smithy-kotlin
refactor: Remove S3Generator in favor of overriding sections
fix: Fix route53 customization to only apply to the operation it is meant to
refactor: Migrate flow utils to smithy-kotlin runtime.
* chore: upgrade to gradle 8.5

* bump plugin version and remove suppression

* bump to 1.9.21 and fix warnings

* more fixes

* fix: use KGP from version catalog

* bump atomicfu to 0.23.1
This commit relocates AWS protocol support from `awslabs/aws-sdk-kotlin`
to `smithy-kotlin` directly. Original commits have been kept and merged
as unrelated history.
@aajtodd aajtodd force-pushed the relocate-protocols branch 2 times, most recently from 713f6d1 to 814d7fd Compare March 12, 2024 12:44
@aajtodd aajtodd marked this pull request as ready for review March 12, 2024 12:46
@aajtodd aajtodd requested a review from a team as a code owner March 12, 2024 12:46
@aajtodd aajtodd force-pushed the relocate-protocols branch from 814d7fd to b62c8c9 Compare March 12, 2024 13:11
@aajtodd aajtodd force-pushed the relocate-protocols branch from b62c8c9 to ae7a697 Compare March 12, 2024 13:40
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
8.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@aajtodd aajtodd merged commit 636b86f into main Mar 14, 2024
13 of 15 checks passed
@aajtodd aajtodd deleted the relocate-protocols branch March 14, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants