Skip to content

Commit 3f082bb

Browse files
committed
Merge from main
2 parents 6a7b812 + 290c048 commit 3f082bb

File tree

326 files changed

+71135
-18618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+71135
-18618
lines changed

.brazil.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"dependencies": {
3+
"org.jetbrains.kotlin:kotlin-gradle-plugin:2.*": "KotlinGradlePlugin-2.x",
34
"org.jetbrains.kotlin:kotlin-stdlib-common:2.*.*": "KotlinStdlibCommon-2.x",
45
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.*.*": "KotlinStdlibJdk8-2.x",
56
"org.jetbrains.kotlin:kotlin-stdlib:2.*.*": "KotlinStdlib-2.x",
67
"org.jetbrains.kotlinx:atomicfu:0.*.*": "Atomicfu-0.x",
78
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*": "KotlinxCoroutinesCoreJvm-1.x",
8-
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": "KotlinxCoroutinesJdk8-1.x"
9+
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": "KotlinxCoroutinesJdk8-1.x",
10+
"com.google.devtools.ksp:symbol-processing-api:2.*": "Maven-com-google-devtools-ksp_symbol-processing-api-2.x",
11+
"com.google.devtools.ksp:symbol-processing-gradle-plugin:2.*": "Maven-com-google-devtools-ksp_symbol-processing-gradle-plugin-2.x"
912
},
1013
"packageHandlingRules": {
1114
"versioning": {
1215
"defaultVersionLayout": "{MAJOR}.0.x"
1316
},
1417
"ignore": [
1518
"aws.sdk.kotlin:bom",
16-
"aws.sdk.kotlin.crt:aws-crt-kotlin-android",
1719
"aws.sdk.kotlin:testing",
1820
"aws.sdk.kotlin:version-catalog"
1921
],
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Kat Transform
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened, labeled, unlabeled ]
6+
branches: [ main ]
7+
8+
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed
9+
concurrency:
10+
group: kat-pr-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
id-token: write
15+
contents: read
16+
17+
env:
18+
RUN: ${{ github.run_id }}-${{ github.run_number }}
19+
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false"
20+
21+
jobs:
22+
verify-transform:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout sources
26+
uses: actions/checkout@v4
27+
with:
28+
path: 'aws-sdk-kotlin'
29+
30+
- name: Setup Build
31+
uses: ./aws-sdk-kotlin/.github/actions/setup-build
32+
33+
- name: Configure AWS Credentials
34+
uses: aws-actions/configure-aws-credentials@v4
35+
with:
36+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
37+
aws-region: us-west-2
38+
39+
- name: Setup kat
40+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main
41+
42+
- name: Build
43+
working-directory: ./aws-sdk-kotlin
44+
shell: bash
45+
run: |
46+
pwd
47+
ls -lsa
48+
kat bump-version # Bump from `vNext-SNAPSHOT` to `vNext`. kat transform only works on non-SNAPSHOT versions
49+
./gradlew build
50+
./gradlew publishAllPublicationsToTestLocalRepository
51+
52+
- name: Transform
53+
working-directory: ./aws-sdk-kotlin
54+
shell: bash
55+
run: |
56+
pwd
57+
ls -lsa
58+
kat brazil transform -i ./build/m2 -o ./transformed -t .brazil.json -v live -m ./codegen/sdk/packages.json
59+
60+
# Check for manifest file
61+
if [ ! -f "./transformed/brazil-import-manifest.json" ]; then
62+
echo "Error: brazil-import-manifest.json not found in the transformed artifact"
63+
exit 1
64+
fi
65+
66+
echo "Transformation succeeded!"

CHANGELOG.md

Lines changed: 249 additions & 0 deletions
Large diffs are not rendered by default.

aws-runtime/aws-config/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414
description = "Support for AWS configuration"
1515
extra["moduleName"] = "aws.sdk.kotlin.runtime.config"
1616

17-
apply(plugin = "kotlinx-atomicfu")
17+
apply(plugin = "org.jetbrains.kotlinx.atomicfu")
1818

1919
kotlin {
2020
sourceSets {

aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/config/profile/ConfigSection.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package aws.sdk.kotlin.runtime.config.profile
88
import aws.sdk.kotlin.runtime.InternalSdkApi
99

1010
@InternalSdkApi
11+
@ExposedCopyVisibility // FIXME Change to @ConsistentCopyVisibility in 1.4.x minor version bump
1112
public data class ConfigSection internal constructor(
1213
public val name: String,
1314
internal val properties: Map<String, AwsConfigValue>,

aws-runtime/aws-endpoint/api/aws-endpoint.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public final class aws/sdk/kotlin/runtime/endpoint/functions/PartitionConfig {
4747
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
4848
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
4949
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
50+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
5051
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;)V
5152
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
5253
public final fun component1 ()Ljava/lang/String;

aws-runtime/aws-endpoint/common/src/aws/sdk/kotlin/runtime/endpoint/functions/Functions.kt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,31 @@ public data class Partition(
6262
* the result of a partition call.
6363
*/
6464
@InternalSdkApi
65-
public data class PartitionConfig @JvmOverloads constructor(
65+
public data class PartitionConfig(
6666
public val name: String? = null,
6767
public val dnsSuffix: String? = null,
6868
public val dualStackDnsSuffix: String? = null,
6969
public val supportsFIPS: Boolean? = null,
7070
public val supportsDualStack: Boolean? = null,
7171
public val implicitGlobalRegion: String? = null,
7272
) {
73+
@Deprecated("This constructor does not support implicitGlobalRegion") // but is added for backwards compatibility
74+
@JvmOverloads
75+
public constructor (
76+
name: String? = null,
77+
dnsSuffix: String? = null,
78+
dualStackDnsSuffix: String? = null,
79+
supportsFIPS: Boolean? = null,
80+
supportsDualStack: Boolean? = null,
81+
) : this(
82+
name,
83+
dnsSuffix,
84+
dualStackDnsSuffix,
85+
supportsFIPS,
86+
supportsDualStack,
87+
null,
88+
)
89+
7390
public fun mergeWith(other: PartitionConfig): PartitionConfig =
7491
PartitionConfig(
7592
other.name ?: name,

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ configureNexus()
145145
val lintPaths = listOf(
146146
"**/*.{kt,kts}",
147147
"!**/generated-src/**",
148+
"!**/generated/ksp/**",
149+
"!**/kspCaches/**",
148150
"!**/smithyprojections/**",
149151
)
150152

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
package aws.sdk.kotlin.codegen.customization
6+
7+
import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait
8+
import software.amazon.smithy.kotlin.codegen.KotlinSettings
9+
import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration
10+
import software.amazon.smithy.kotlin.codegen.model.hasTrait
11+
import software.amazon.smithy.kotlin.codegen.rendering.protocol.MutateHeadersMiddleware
12+
import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolGenerator
13+
import software.amazon.smithy.kotlin.codegen.rendering.protocol.ProtocolMiddleware
14+
import software.amazon.smithy.model.Model
15+
16+
/**
17+
* Send an extra `x-amzn-query-mode` header with a value of `true` for services which have the [AwsQueryCompatibleTrait] applied.
18+
*/
19+
class AwsQueryModeCustomization : KotlinIntegration {
20+
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean =
21+
model
22+
.getShape(settings.service)
23+
.get()
24+
.hasTrait<AwsQueryCompatibleTrait>()
25+
26+
override fun customizeMiddleware(ctx: ProtocolGenerator.GenerationContext, resolved: List<ProtocolMiddleware>): List<ProtocolMiddleware> =
27+
resolved + MutateHeadersMiddleware(extraHeaders = mapOf("x-amzn-query-mode" to "true"))
28+
}

codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/SigV4AsymmetricTraitCustomization.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SigV4AsymmetricTraitCustomization : KotlinIntegration {
2626
override val order: Byte = -60
2727

2828
// services which support SigV4A but don't model it
29-
private val unmodeledSigV4aServices = listOf("s3", "eventbridge")
29+
private val unmodeledSigV4aServices = listOf("s3", "eventbridge", "sesv2")
3030

3131
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean =
3232
unmodeledSigV4aServices.contains(settings.sdkId.lowercase()) && !model.isTraitApplied(SigV4ATrait::class.java)

0 commit comments

Comments
 (0)