-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
326 changed files
with
71,135 additions
and
18,618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Kat Transform | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened, labeled, unlabeled ] | ||
branches: [ main ] | ||
|
||
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed | ||
concurrency: | ||
group: kat-pr-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
env: | ||
RUN: ${{ github.run_id }}-${{ github.run_number }} | ||
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false" | ||
|
||
jobs: | ||
verify-transform: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'aws-sdk-kotlin' | ||
|
||
- name: Setup Build | ||
uses: ./aws-sdk-kotlin/.github/actions/setup-build | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | ||
aws-region: us-west-2 | ||
|
||
- name: Setup kat | ||
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main | ||
|
||
- name: Build | ||
working-directory: ./aws-sdk-kotlin | ||
shell: bash | ||
run: | | ||
pwd | ||
ls -lsa | ||
kat bump-version # Bump from `vNext-SNAPSHOT` to `vNext`. kat transform only works on non-SNAPSHOT versions | ||
./gradlew build | ||
./gradlew publishAllPublicationsToTestLocalRepository | ||
- name: Transform | ||
working-directory: ./aws-sdk-kotlin | ||
shell: bash | ||
run: | | ||
pwd | ||
ls -lsa | ||
kat brazil transform -i ./build/m2 -o ./transformed -t .brazil.json -v live -m ./codegen/sdk/packages.json | ||
# Check for manifest file | ||
if [ ! -f "./transformed/brazil-import-manifest.json" ]; then | ||
echo "Error: brazil-import-manifest.json not found in the transformed artifact" | ||
exit 1 | ||
fi | ||
echo "Transformation succeeded!" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/AwsQueryModeCustomization.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package aws.sdk.kotlin.codegen.customization | ||
|
||
import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait | ||
import software.amazon.smithy.kotlin.codegen.KotlinSettings | ||
import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration | ||
import software.amazon.smithy.kotlin.codegen.model.hasTrait | ||
import software.amazon.smithy.kotlin.codegen.rendering.protocol.MutateHeadersMiddleware | ||
import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator | ||
import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolMiddleware | ||
import software.amazon.smithy.model.Model | ||
|
||
/** | ||
* Send an extra `x-amzn-query-mode` header with a value of `true` for services which have the [AwsQueryCompatibleTrait] applied. | ||
*/ | ||
class AwsQueryModeCustomization : KotlinIntegration { | ||
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean = | ||
model | ||
.getShape(settings.service) | ||
.get() | ||
.hasTrait<AwsQueryCompatibleTrait>() | ||
|
||
override fun customizeMiddleware(ctx: ProtocolGenerator.GenerationContext, resolved: List<ProtocolMiddleware>): List<ProtocolMiddleware> = | ||
resolved + MutateHeadersMiddleware(extraHeaders = mapOf("x-amzn-query-mode" to "true")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
.../kotlin/codegen/customization/route53/ChangeResourceRecordSetsUnmarshallingIntegration.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,5 @@ val smokeTestDenyList = setOf( | |
"Application Auto Scaling", | ||
"SWF", | ||
"WAFV2", | ||
"IoT Data Plane", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.