Skip to content

Commit 3444a32

Browse files
committed
Merge branch 'main' into v1.5-main-merge
2 parents ddb53bf + d78dd1c commit 3444a32

File tree

255 files changed

+97428
-29749
lines changed

Some content is hidden

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

255 files changed

+97428
-29749
lines changed

.brazil-1.x.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"dependencies": {
3+
"org.jetbrains.kotlin:kotlin-gradle-plugin:2.*": "KotlinGradlePlugin-2.x",
4+
"org.jetbrains.kotlin:kotlin-stdlib-common:2.*.*": "KotlinStdlibCommon-2.x",
5+
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.*.*": "KotlinStdlibJdk8-2.x",
6+
"org.jetbrains.kotlin:kotlin-stdlib:2.*.*": "KotlinStdlib-2.x",
7+
"org.jetbrains.kotlinx:atomicfu:0.*.*": "Atomicfu-0.x",
8+
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*": "KotlinxCoroutinesCoreJvm-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"
12+
},
13+
"packageHandlingRules": {
14+
"versioning": {
15+
"defaultVersionLayout": "{MAJOR}.x"
16+
},
17+
"ignore": [
18+
"aws.sdk.kotlin:bom",
19+
"aws.sdk.kotlin:testing",
20+
"aws.sdk.kotlin:version-catalog"
21+
],
22+
"resolvesConflictDependencies": {
23+
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.*" : ["KotlinxCoroutinesCoreJvm-1.x"],
24+
"org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.*": ["KotlinxCoroutinesJdk8-1.x"],
25+
"aws.smithy.kotlin:aws-event-stream:1.*": ["KotlinxCoroutinesCoreJvm-1.x"]
26+
}
27+
}
28+
}

.github/scripts/run-codebuild-batch-job.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ START_RESULT=$(
9494
aws codebuild start-build-batch \
9595
--project-name ${PROJECT_NAME} \
9696
--source-version $SOURCE_VERSION \
97-
--environment-variables-override file:///tmp/gh_env_vars.json
97+
--environment-variables-override file:///tmp/gh_env_vars.json \
98+
--source-location-override "https://github.com/awslabs/$GITHUB_REPOSITORY_NO_ORG.git"
9899
)
99100

100101
if [ "$?" != "0" ]; then
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Changelog verification
22

3+
permissions:
4+
id-token: write
5+
36
on:
47
pull_request:
58
types: [ opened, synchronize, reopened, labeled, unlabeled ]
@@ -11,16 +14,11 @@ jobs:
1114
changelog-verification:
1215
runs-on: ubuntu-latest
1316
steps:
14-
- uses: actions/checkout@v4
15-
- name: Check for changelog entry
16-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
17-
run: |
18-
git fetch origin ${{ github.base_ref }} --depth 1 && \
19-
git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/[0-9a-f-]+\.json"
20-
- name: Error message
21-
if: ${{ failure() }}
22-
run: |
23-
echo "::error ::No new/updated changelog entry found in /.changes directory. Please either:"
24-
echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
25-
echo "::error ::* Add the 'no-changelog' label to this PR (in rare cases not warranting a changelog entry)"
26-
exit 1
17+
- name: Configure AWS Credentials
18+
uses: aws-actions/configure-aws-credentials@v4
19+
with:
20+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
21+
aws-region: us-west-2
22+
23+
- name: Verify changelog
24+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/changelog-verification@main

.github/workflows/merge-main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ jobs:
1111
- name: Merge main
1212
uses: awslabs/aws-kotlin-repo-tools/.github/actions/merge-main@main
1313
with:
14-
exempt-branches: # Add any if required
14+
ci-user-pat: ${{ secrets.CI_USER_PAT }}
15+
exempt-branches: # Add any if required
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release readiness (snapshot dependency)
2+
description: >
3+
Makes sure that we aren't relying on SNAPSHOT/dev versions of smithy-kotlin before merging
4+
otherwise we could forget because the rest of CI is masking it.
5+
6+
on:
7+
pull_request:
8+
types: [ opened, synchronize, reopened, labeled, unlabeled ]
9+
branches: [ main ]
10+
11+
jobs:
12+
release-readiness:
13+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ready-for-release') }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout SDK
17+
uses: actions/checkout@v4
18+
with:
19+
path: 'aws-sdk-kotlin'
20+
21+
- name: Configure Gradle
22+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
23+
with:
24+
working-directory: ./aws-sdk-kotlin
25+
26+
- name: Build SDK
27+
working-directory: ./aws-sdk-kotlin
28+
run: ./gradlew test jvmTest
29+
30+
- name: Build SDK client
31+
working-directory: ./aws-sdk-kotlin
32+
run: |
33+
./gradlew -Paws.kotlin.native=false -Paws.services=s3 bootstrap
34+
./gradlew -Paws.kotlin.native=false build
35+
36+
- name: Checkout smithy-kotlin
37+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/checkout-head@main
38+
with:
39+
path: 'smithy-kotlin'
40+
repository: 'smithy-lang/smithy-kotlin'
41+
42+
- name: Check for smithy-kotlin unreleased changes
43+
run: |
44+
echo "aws-sdk-kotlin branch: $GITHUB_HEAD_REF"
45+
46+
cd smithy-kotlin
47+
SMITHY_KOTLIN_BRANCH=$(git branch --show-current)
48+
echo "smithy-kotlin branch: $SMITHY_KOTLIN_BRANCH"
49+
50+
if [ "$GITHUB_HEAD_REF" == "$SMITHY_KOTLIN_BRANCH" ]; then
51+
cd ../aws-sdk-kotlin
52+
git fetch origin
53+
54+
DIFF=$(git diff origin/main -- gradle/libs.versions.toml | grep '^[-+][^-+]'; exit 0)
55+
SMITHY_KOTLIN_VERSION_BUMP=$(echo "$DIFF" | grep "smithy-kotlin-runtime-version =\|smithy-kotlin-codegen-version ="; exit 0)
56+
57+
if [ -z "$SMITHY_KOTLIN_VERSION_BUMP" ]; then
58+
echo "::error::Matching smithy-kotlin and aws-sdk-kotlin branches but no smithy-kotlin version bump"
59+
exit 1
60+
else
61+
echo "Matching smithy-kotlin and aws-sdk-kotlin branches with smithy-kotlin version bump detected"
62+
fi
63+
fi
64+
65+
- name: Emit error message
66+
if: ${{ failure() }}
67+
run: |
68+
echo "::error::Did you forget to release smithy-kotlin and bump the dependency version?"
69+
exit 1
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# After every GitHub release, verify that the Maven artifacts are available, then kick off
2+
# a canary deployment with the latest version of the SDK.
3+
name: Update Canary
4+
on:
5+
release:
6+
types: [ published ]
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
update-canary:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Configure AWS Credentials
17+
uses: aws-actions/configure-aws-credentials@v4
18+
with:
19+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
20+
aws-region: us-west-2
21+
22+
23+
- name: Verify artifact is available on Maven
24+
shell: bash
25+
# Maven can take up to 2 hours after the release has succeeded to publish our artifacts
26+
# FIXME Track execution duration over time and see if this can be shortened
27+
timeout-minutes: 120
28+
run: |
29+
TAG="${{ github.event.release.tag_name }}"
30+
VERSION="${TAG#v}"
31+
MAVEN_URL="https://repo.maven.apache.org/maven2/aws/sdk/kotlin/s3/${VERSION}/"
32+
33+
echo "Checking for an artifact at $MAVEN_URL"
34+
35+
while true; do
36+
STATUS=$(curl -i -s -o /dev/null -w "%{http_code}" "$MAVEN_URL")
37+
echo "Status: $STATUS"
38+
39+
if [[ "$STATUS" == "200" ]]; then
40+
echo "Artifact is available at $MAVEN_URL"
41+
exit 0
42+
fi
43+
44+
sleep 30
45+
done
46+
47+
- name: Update canary
48+
shell: bash
49+
timeout-minutes: 15
50+
run: |
51+
set -euo pipefail
52+
53+
TAG="${{ github.event.release.tag_name }}"
54+
EXECUTION_NAME="update-canary-${TAG}"
55+
STATE_MACHINE_ARN="arn:aws:states:us-west-2:${{ secrets.CI_USER }}:stateMachine:DeployLatestSdkVersion"
56+
57+
echo "Starting step function: $EXECUTION_NAME"
58+
EXECUTION_ARN=$(aws stepfunctions start-execution \
59+
--state-machine-arn "$STATE_MACHINE_ARN" \
60+
--name "$EXECUTION_NAME" \
61+
--input '{}' \
62+
--query 'executionArn' \
63+
--output text)
64+
65+
echo "Waiting for step function to complete..."
66+
67+
while true; do
68+
STATUS=$(aws stepfunctions describe-execution --execution-arn "$EXECUTION_ARN" --query 'status' --output text)
69+
echo "Status: $STATUS"
70+
71+
if [[ "$STATUS" == "SUCCEEDED" ]]; then
72+
echo "Step Function completed successfully"
73+
exit 0
74+
elif [[ "$STATUS" == "FAILED" || "$STATUS" == "TIMED_OUT" || "$STATUS" == "ABORTED" ]]; then
75+
echo "Step Function failed with status: $STATUS"
76+
exit 1
77+
fi
78+
79+
sleep 10
80+
done

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ local.properties
1717
services/*/generated-src
1818
services/*/build.gradle.kts
1919
services/*/API.md
20+
services/*/OVERVIEW.md
2021
.kotest/
2122
.kotlin/
2223
*.klib

0 commit comments

Comments
 (0)