Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/api-compat-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: API compatibility verification
on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches: [ main, '*-main' ]
branches:
- main
- '*-main'

jobs:
api-compat-verification:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/artifact-size-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Artifact Size Metrics
on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches: [ main, '*-main' ]
branches:
- main
- '*-main'
release:
types: [published]

Expand Down Expand Up @@ -53,9 +55,9 @@ jobs:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Generate Artifact Size Metrics
run: ./gradlew -Paws.kotlin.native=false artifactSizeMetrics
run: ./gradlew artifactSizeMetrics
- name: Analyze Artifact Size Metrics
run: ./gradlew -Paws.kotlin.native=false analyzeArtifactSizeMetrics
run: ./gradlew analyzeArtifactSizeMetrics
- name: Show Results
uses: actions/github-script@v7
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/changelog-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Changelog verification
on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches: [ main, '*-main' ]
branches:
- main
- '*-main'

jobs:
changelog-verification:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: CI

on:
push:
branches: [ main ]
branches:
- main
- '*-main'
pull_request:
workflow_dispatch:

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Dependabot Dependency Submission

on:
push:
branches: [ main ]
branches:
- main
- '*-main'

permissions:
contents: write
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/kat-transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Kat Transform
on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches: [ main ]
branches:
- main
- '*-main'

# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed
concurrency:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
branches:
- '**'
- '!main'
- '!*-main'
pull_request:
branches: [ main ]
branches:
- main
- '*-main'
workflow_dispatch:

env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ out/
# Compiled class file
*.class
*.klib
.kotlin/

# Log file
*.log
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.3.32] - 01/06/2025

### Fixes
* Fix serialization of CBOR blobs

## [1.3.31] - 12/18/2024

### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ abstract class AbstractQueryFormUrlSerializerGenerator(
return shape.documentSerializer(ctx.settings, symbol, members) { writer ->
writer.openBlock("internal fun #identifier.name:L(serializer: #T, input: #T) {", RuntimeTypes.Serde.Serializer, symbol)
.call {
renderSerializerBody(ctx, shape, shape.members().toList(), writer)
renderSerializerBody(ctx, shape, members.toList(), writer)
}
.closeBlock("}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package software.amazon.smithy.kotlin.codegen.aws.protocols

import io.kotest.matchers.string.shouldNotContain
import software.amazon.smithy.kotlin.codegen.test.*
import kotlin.test.Test

Expand Down Expand Up @@ -145,4 +146,20 @@ class RpcV2CborTest {
val serializeBody = serializer.lines(" override suspend fun serialize(context: ExecutionContext, input: PutFooStreamingRequest): HttpRequestBuilder {", "}")
serializeBody.shouldContainOnlyOnceWithDiff("""builder.headers.setMissing("Content-Type", "application/vnd.amazon.eventstream")""")
}

@Test
fun testEventStreamInitialRequestDoesNotSerializeStreamMember() {
val ctx = model.newTestContext("CborExample")

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

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

val documentSerializer = ctx.manifest.expectFileString("/src/main/kotlin/com/test/serde/PutFooStreamingRequestDocumentSerializer.kt")

val serializeBody = documentSerializer.lines(" serializer.serializeStruct(OBJ_DESCRIPTOR) {", "}")
serializeBody.shouldNotContain("input.messages") // `messages` is the stream member and should not be serialized in the initial request
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CborSerializerGenerator(
val symbol = ctx.symbolProvider.toSymbol(shape)
return shape.documentSerializer(ctx.settings, symbol, members) { writer ->
writer.withBlock("internal fun #identifier.name:L(serializer: #T, input: #T) {", "}", RuntimeTypes.Serde.Serializer, symbol) {
call { renderSerializerBody(ctx, shape, shape.members().toList(), writer) }
call { renderSerializerBody(ctx, shape, members.toList(), writer) }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kotlinx.atomicfu.enableNativeIrTransformation=false
org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=1G

# SDK
sdkVersion=1.3.32-SNAPSHOT
sdkVersion=1.3.33-SNAPSHOT

# codegen
codegenVersion=0.33.32-SNAPSHOT
codegenVersion=0.33.33-SNAPSHOT
Loading