Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a4734c7
fix: create JMESPATH flattenIfPossible functions for Lists (#1169)
0marperez Dec 16, 2024
7911a94
chore: release 1.3.30
aws-sdk-kotlin-ci Dec 16, 2024
7085c8a
chore: bump snapshot version to 1.3.31-SNAPSHOT
aws-sdk-kotlin-ci Dec 16, 2024
4575023
misc: enhance support for replayable instances of `InputStream` (#1197)
lauzadis Dec 18, 2024
b0a4bac
chore: release 1.3.31
aws-sdk-kotlin-ci Dec 18, 2024
80f4538
chore: bump snapshot version to 1.3.32-SNAPSHOT
aws-sdk-kotlin-ci Dec 18, 2024
e9d16a9
fix: CBOR protocol test assertions / blob serialization (#1198)
lauzadis Dec 18, 2024
48849a1
fix: correctly serialize subset of shape's members when configured (#…
lauzadis Jan 6, 2025
ded3a4b
chore: release 1.3.32
aws-sdk-kotlin-ci Jan 6, 2025
d97e8ba
chore: bump snapshot version to 1.3.33-SNAPSHOT
aws-sdk-kotlin-ci Jan 6, 2025
78f17f3
chore: add *-main to branch workflows (#1209)
ianbotsf Jan 8, 2025
d06ee0a
chore: add .kotlin/ to .gitignore (#1208)
ianbotsf Jan 8, 2025
d2e7c91
chore: smithy version bump (#1213)
0marperez Jan 10, 2025
5a2df8f
chore: release 1.3.33
aws-sdk-kotlin-ci Jan 10, 2025
003633b
chore: bump snapshot version to 1.3.34-SNAPSHOT
aws-sdk-kotlin-ci Jan 10, 2025
5f5ec8f
feat: add `AuthTokenGenerator` (#1212)
lauzadis Jan 10, 2025
3fe1b5e
chore: release 1.3.34
aws-sdk-kotlin-ci Jan 10, 2025
0bba308
chore: bump snapshot version to 1.3.35-SNAPSHOT
aws-sdk-kotlin-ci Jan 10, 2025
52e4439
misc: merge v1.4 into main (#1218)
0marperez Jan 15, 2025
e0c25d6
feat: support default checksums (#1191)
0marperez Jan 15, 2025
14e0958
chore: release 1.4.0
aws-sdk-kotlin-ci Jan 15, 2025
ed95d7b
chore: bump snapshot version to 1.4.1-SNAPSHOT
aws-sdk-kotlin-ci Jan 15, 2025
a4ace35
fix: add 0.9.x aws-crt-kotlin transform (#1220)
lauzadis Jan 16, 2025
15e5f0c
fix: Ensure `Host` header is included when signing auth tokens (#1222)
lauzadis Jan 16, 2025
447ac10
chore: release 1.4.1
aws-sdk-kotlin-ci Jan 16, 2025
0f8db44
chore: bump snapshot version to 1.4.2-SNAPSHOT
aws-sdk-kotlin-ci Jan 16, 2025
8b33693
fix: address various failing protocol tests (#1223)
lauzadis Jan 23, 2025
03badf9
misc: re-enable `kotlinWarningsAsErrors=true` (#1224)
lauzadis Jan 23, 2025
9f44cdb
fix: ignore hop-by-hop headers when signing requests (#1227)
ianbotsf Jan 28, 2025
97ac447
chore: release 1.4.2
aws-sdk-kotlin-ci Jan 28, 2025
b7e50e3
chore: bump snapshot version to 1.4.3-SNAPSHOT
aws-sdk-kotlin-ci Jan 28, 2025
e6357f9
misc: add telemetry configuration to DefaultAwsSigner (#1226)
xinsong-cui Jan 30, 2025
9d6857b
misc: gradle mirror (#1204)
0marperez Feb 4, 2025
5323882
fix: correctly check equality for CaseInsensitiveMap (#1235)
ianbotsf Feb 6, 2025
1af0e82
misc: gradle version bump (#1236)
0marperez Feb 7, 2025
120768c
fix: correct hash code calculation for case-insensitive map entries (…
ianbotsf Feb 8, 2025
d7e3603
misc: bump build plugin version (#1239)
lauzadis Feb 12, 2025
c1bcb04
fix: favor endpointUrl over endpoint discovery when provided (#1240)
ianbotsf Feb 13, 2025
4223bfa
chore: release 1.4.3
aws-sdk-kotlin-ci Feb 13, 2025
cea7b1f
chore: bump snapshot version to 1.4.4-SNAPSHOT
aws-sdk-kotlin-ci Feb 13, 2025
ad4d2a3
misc: test union member name same as union (#1241)
0marperez Feb 14, 2025
a0be9e4
fix: unions with member names matching auto-imported Kotlin symbols (…
0marperez Feb 14, 2025
00500f2
fix: bump maximum event stream message length to 24MB (#1243)
lauzadis Feb 18, 2025
7329212
chore: release 1.4.4
aws-sdk-kotlin-ci Feb 18, 2025
612c39b
chore: bump snapshot version to 1.4.5-SNAPSHOT
aws-sdk-kotlin-ci Feb 18, 2025
283ca31
misc: Remove Elastic Inference SDK ID test (#1247)
0marperez Feb 24, 2025
82b9ffe
feat: Kotlin implementation of SigV4a signing (#1246)
lauzadis Feb 24, 2025
0df4e42
chore: release 1.4.5
aws-sdk-kotlin-ci Feb 24, 2025
7430722
chore: bump snapshot version to 1.4.6-SNAPSHOT
aws-sdk-kotlin-ci Feb 24, 2025
80d395b
fix: account ID based endpoints (#1245)
0marperez Feb 25, 2025
5dbc684
chore: release 1.4.6
aws-sdk-kotlin-ci Feb 25, 2025
dc6b646
chore: bump snapshot version to 1.4.7-SNAPSHOT
aws-sdk-kotlin-ci Feb 25, 2025
09838a7
fix: replace `Span.makeCurrent()` with `Span.asContextElement()` (#1237)
lauzadis Feb 25, 2025
d06ccf3
chore: release 1.4.7
aws-sdk-kotlin-ci Feb 25, 2025
03a8e62
chore: bump snapshot version to 1.4.8-SNAPSHOT
aws-sdk-kotlin-ci Feb 25, 2025
aae827c
fix: idempotency tokens being code-generated for nested structures (#…
0marperez Feb 27, 2025
c498b42
chore: release 1.4.8
aws-sdk-kotlin-ci Feb 27, 2025
462967b
chore: bump snapshot version to 1.4.9-SNAPSHOT
aws-sdk-kotlin-ci Feb 27, 2025
72155f7
fix: correctly codegen paginators for types which require fully-quali…
ianbotsf Feb 27, 2025
0e4a7cb
chore: bump Ktor dependency (#1250)
ianbotsf Feb 27, 2025
aa02ac4
chore: release 1.4.9
aws-sdk-kotlin-ci Feb 27, 2025
8178808
chore: bump snapshot version to 1.4.10-SNAPSHOT
aws-sdk-kotlin-ci Feb 27, 2025
4b0df67
misc: remove `@InternalApi` from `SdkClientOption` extension function…
lauzadis Mar 3, 2025
6f94c6a
fix: correctly handle sequential calls to `SingleFlightGroup` (#1251)
ianbotsf Mar 3, 2025
667161b
chore: release 1.4.10
aws-sdk-kotlin-ci Mar 6, 2025
f1d5f6b
chore: bump snapshot version to 1.4.11-SNAPSHOT
aws-sdk-kotlin-ci Mar 6, 2025
bf9a200
feat: main to feature branches merge (#1254)
0marperez Mar 12, 2025
6e10c01
feat: emit accountId metrics (#1255)
xinsong-cui Mar 14, 2025
1caac30
chore: release 1.4.11
aws-sdk-kotlin-ci Mar 14, 2025
0a29a00
chore: bump snapshot version to 1.4.12-SNAPSHOT
aws-sdk-kotlin-ci Mar 14, 2025
9673ed5
Merge branch 'main' of github.com:smithy-lang/smithy-kotlin into kn-m…
lauzadis Mar 17, 2025
b26eeff
Fix micrometer-version
lauzadis Mar 17, 2025
6cbc90c
Run on macOS 15
lauzadis Mar 18, 2025
2661658
Revert to macos14 / 13
lauzadis Mar 18, 2025
419e566
Disable KotlinNativeSimulatorTest tasks
lauzadis Mar 18, 2025
b15c05e
Don't run `configureIosSimulatorTasks`
lauzadis Mar 18, 2025
c519e31
ktlint
lauzadis Mar 18, 2025
6ec9b76
Disable SigV4a tests on Native
lauzadis Mar 18, 2025
56d3b8c
Disable simulator tests in `subprojects`
lauzadis Mar 18, 2025
08e18a1
ktlint
lauzadis Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .brazil.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"com.squareup.okhttp3:okhttp:5.*": "OkHttp3-5.x",
"com.squareup.okio:okio-jvm:3.*": "OkioJvm-3.x",
"io.opentelemetry:opentelemetry-api:1.*": "Maven-io-opentelemetry_opentelemetry-api-1.x",
"io.opentelemetry:opentelemetry-extension-kotlin:1.*": "Maven-io-opentelemetry_opentelemetry-extension-kotlin-1.x",
"org.slf4j:slf4j-api:2.*": "Maven-org-slf4j_slf4j-api-2.x",
"aws.sdk.kotlin.crt:aws-crt-kotlin:0.9.*": "AwsCrtKotlin-0.9.x",
"aws.sdk.kotlin.crt:aws-crt-kotlin:0.8.*": "AwsCrtKotlin-0.8.x",
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Merge main
on:
schedule:
- cron: "0 7 * * 1-5" # At 07:00 UTC (00:00 PST, 03:00 EST), Monday through Friday
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Merge main
uses: awslabs/aws-kotlin-repo-tools/.github/actions/merge-main@main
with:
exempt-branches: # Add any if required
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Changelog

## [1.4.11] - 03/14/2025

## [1.4.10] - 03/06/2025

### Fixes
* Correctly handle sequential calls to `SingleFlightGroup`

## [1.4.9] - 02/27/2025

### Fixes
* Correctly generate paginators for item type names which collide with other used types (e.g., an item type `com.foo.Flow` which conflicts with `kotlinx.coroutines.flow.Flow`)

## [1.4.8] - 02/27/2025

### Fixes
* Idempotency tokens are no longer code-generated for nested structures. See: https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-idempotencytoken-trait

## [1.4.7] - 02/25/2025

### Fixes
* [#1211](https://github.com/smithy-lang/smithy-kotlin/issues/1211) Fix OpenTelemetry span concurrency by using Span.asContextElement() instead of Span.makeCurrent()

## [1.4.6] - 02/25/2025

## [1.4.5] - 02/24/2025

### Features
* Add SigV4a support to the default AWS signer

## [1.4.4] - 02/18/2025

### Miscellaneous
* Increase maximum event stream message length to 24MB

## [1.4.3] - 02/13/2025

### Fixes
* Fix errors in equality checks for `CaseInsensitiveMap` which affect `Headers` and `ValuesMap` implementations
* fix: correct hash code calculation for case-insensitive map entries
* [#1413](https://github.com/awslabs/aws-sdk-kotlin/issues/1413) Favor `endpointUrl` over endpoint discovery when provided

### Miscellaneous
* Add telemetry provider configuration to `DefaultAwsSigner`

## [1.4.2] - 01/28/2025

### Fixes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package software.amazon.smithy.kotlin.codegen.aws.protocols

import software.amazon.smithy.kotlin.codegen.test.*
import kotlin.test.Test

class AwsQueryTest {
@Test
fun testNonNestedIdempotencyToken() {
val ctx = model.newTestContext("Example")

val generator = AwsQuery()
generator.generateProtocolClient(ctx.generationCtx)

ctx.generationCtx.delegator.finalize()
ctx.generationCtx.delegator.flushWriters()

val expected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.bar?.let { field(BAR_DESCRIPTOR, it) } ?: field(BAR_DESCRIPTOR, context.idempotencyTokenProvider.generateToken())
}
""".trimIndent()

val actual = ctx
.manifest
.expectFileString("/src/main/kotlin/com/test/serde/GetBarUnNestedOperationSerializer.kt")
.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", " }")
.trimIndent()

actual.shouldContainOnlyOnceWithDiff(expected)
}

@Test
fun testNestedIdempotencyToken() {
val ctx = model.newTestContext("Example")

val generator = AwsQuery()
generator.generateProtocolClient(ctx.generationCtx)

ctx.generationCtx.delegator.finalize()
ctx.generationCtx.delegator.flushWriters()

val expected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.baz?.let { field(BAZ_DESCRIPTOR, it) }
}
""".trimIndent()

val actual = ctx
.manifest
.expectFileString("/src/main/kotlin/com/test/serde/NestDocumentSerializer.kt")
.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", " }")
.trimIndent()

actual.shouldContainOnlyOnceWithDiff(expected)

val unexpected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.baz?.let { field(BAZ_DESCRIPTOR, it) } ?: field(BAR_DESCRIPTOR, context.idempotencyTokenProvider.generateToken())
}
""".trimIndent()

actual.shouldNotContainOnlyOnceWithDiff(unexpected)
}

private val model = """
${"$"}version: "2"

namespace com.test

use aws.protocols#awsQuery
use aws.api#service

@awsQuery
@service(sdkId: "Example")
@xmlNamespace(uri: "http://foo.com")
service Example {
version: "1.0.0",
operations: [GetBarUnNested, GetBarNested]
}

@http(method: "POST", uri: "/get-bar-un-nested")
operation GetBarUnNested {
input: BarUnNested
}

structure BarUnNested {
@idempotencyToken
bar: String
}

@http(method: "POST", uri: "/get-bar-nested")
operation GetBarNested {
input: BarNested
}

structure BarNested {
bar: Nest
}

structure Nest {
@idempotencyToken
baz: String
}
""".toSmithyModel()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
package software.amazon.smithy.kotlin.codegen.aws.protocols

import software.amazon.smithy.kotlin.codegen.test.*
import kotlin.test.Test

class RestJson1Test {
@Test
fun testNonNestedIdempotencyToken() {
val ctx = model.newTestContext("Example")

val generator = RestJson1()
generator.generateProtocolClient(ctx.generationCtx)

ctx.generationCtx.delegator.finalize()
ctx.generationCtx.delegator.flushWriters()

val expected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.bar?.let { field(BAR_DESCRIPTOR, it) } ?: field(BAR_DESCRIPTOR, context.idempotencyTokenProvider.generateToken())
}
""".trimIndent()

val actual = ctx
.manifest
.expectFileString("/src/main/kotlin/com/test/serde/GetBarUnNestedOperationSerializer.kt")
.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", " }")
.trimIndent()

actual.shouldContainOnlyOnceWithDiff(expected)
}

@Test
fun testNestedIdempotencyToken() {
val ctx = model.newTestContext("Example")

val generator = RestJson1()
generator.generateProtocolClient(ctx.generationCtx)

ctx.generationCtx.delegator.finalize()
ctx.generationCtx.delegator.flushWriters()

val expected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.baz?.let { field(BAZ_DESCRIPTOR, it) }
}
""".trimIndent()

val actual = ctx
.manifest
.expectFileString("/src/main/kotlin/com/test/serde/NestDocumentSerializer.kt")
.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", " }")
.trimIndent()

actual.shouldContainOnlyOnceWithDiff(expected)

val unexpected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.baz?.let { field(BAZ_DESCRIPTOR, it) } ?: field(BAR_DESCRIPTOR, context.idempotencyTokenProvider.generateToken())
}
""".trimIndent()

actual.shouldNotContainOnlyOnceWithDiff(unexpected)
}

private val model = """
${"$"}version: "2"

namespace com.test

use aws.protocols#restJson1
use aws.api#service

@restJson1
@service(sdkId: "Example")
service Example {
version: "1.0.0",
operations: [GetBarUnNested, GetBarNested]
}

@http(method: "POST", uri: "/get-bar-un-nested")
operation GetBarUnNested {
input: BarUnNested
}

structure BarUnNested {
@idempotencyToken
bar: String
}

@http(method: "POST", uri: "/get-bar-nested")
operation GetBarNested {
input: BarNested
}

structure BarNested {
bar: Nest
}

structure Nest {
@idempotencyToken
baz: String
}
""".toSmithyModel()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
package software.amazon.smithy.kotlin.codegen.aws.protocols

import software.amazon.smithy.kotlin.codegen.test.*
import kotlin.test.Test

class RestXmlTest {
@Test
fun testNonNestedIdempotencyToken() {
val ctx = model.newTestContext("Example")

val generator = RestXml()
generator.generateProtocolClient(ctx.generationCtx)

ctx.generationCtx.delegator.finalize()
ctx.generationCtx.delegator.flushWriters()

val expected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.bar?.let { field(BAR_DESCRIPTOR, it) } ?: field(BAR_DESCRIPTOR, context.idempotencyTokenProvider.generateToken())
}
""".trimIndent()

val actual = ctx
.manifest
.expectFileString("/src/main/kotlin/com/test/serde/GetBarUnNestedOperationSerializer.kt")
.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", " }")
.trimIndent()

actual.shouldContainOnlyOnceWithDiff(expected)
}

@Test
fun testNestedIdempotencyToken() {
val ctx = model.newTestContext("Example")

val generator = RestXml()
generator.generateProtocolClient(ctx.generationCtx)

ctx.generationCtx.delegator.finalize()
ctx.generationCtx.delegator.flushWriters()

val expected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.baz?.let { field(BAZ_DESCRIPTOR, it) }
}
""".trimIndent()

val actual = ctx
.manifest
.expectFileString("/src/main/kotlin/com/test/serde/NestDocumentSerializer.kt")
.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", " }")
.trimIndent()

actual.shouldContainOnlyOnceWithDiff(expected)

val unexpected = """
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.baz?.let { field(BAZ_DESCRIPTOR, it) } ?: field(BAR_DESCRIPTOR, context.idempotencyTokenProvider.generateToken())
}
""".trimIndent()

actual.shouldNotContainOnlyOnceWithDiff(unexpected)
}

private val model = """
${"$"}version: "2"

namespace com.test

use aws.protocols#restXml
use aws.api#service

@restXml
@service(sdkId: "Example")
service Example {
version: "1.0.0",
operations: [GetBarUnNested, GetBarNested]
}

@http(method: "POST", uri: "/get-bar-un-nested")
operation GetBarUnNested {
input: BarUnNested
}

structure BarUnNested {
@idempotencyToken
bar: String
}

@http(method: "POST", uri: "/get-bar-nested")
operation GetBarNested {
input: BarNested
}

structure BarNested {
bar: Nest
}

structure Nest {
@idempotencyToken
baz: String
}
""".toSmithyModel()
}
Loading
Loading