Skip to content

Commit ddb53bf

Browse files
authored
chore: merge main into v1.5-main (#1568)
1 parent 78cd84a commit ddb53bf

File tree

217 files changed

+93273
-41293
lines changed

Some content is hidden

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

217 files changed

+93273
-41293
lines changed

.github/workflows/codebuild-ci.yml

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ jobs:
8585
with:
8686
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
8787
aws-region: us-west-2
88+
- name: Configure Gradle
89+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
8890
- name: Run Service Check Batch and Calculate Artifact Size Metrics
8991
id: svc-check-batch
9092
run: |
@@ -140,56 +142,9 @@ jobs:
140142
./gradlew collectDelegatedArtifactSizeMetrics -PpullRequest=$PULL_REQUEST
141143
- name: Analyze Artifact Size Metrics
142144
run: ./gradlew analyzeArtifactSizeMetrics
143-
- name: Show Results
144-
uses: actions/github-script@v7
145-
with:
146-
script: |
147-
const getComments =
148-
`query {
149-
repository(owner:"${context.repo.owner}", name:"${context.repo.repo}"){
150-
pullRequest(number: ${context.issue.number ?? process.env.SDK_PR}) {
151-
id
152-
comments(last:100) {
153-
nodes {
154-
id
155-
body
156-
author {
157-
login
158-
}
159-
isMinimized
160-
}
161-
}
162-
}
163-
}
164-
}`
165-
166-
const response = await github.graphql(getComments)
167-
const comments = response.repository.pullRequest.comments.nodes
168-
169-
const mutations = comments
170-
.filter(comment => comment.author.login == 'github-actions' && !comment.isMinimized && comment.body.startsWith('Affected Artifacts'))
171-
.map(comment =>
172-
github.graphql(
173-
`mutation {
174-
minimizeComment(input:{subjectId:"${comment.id}", classifier:OUTDATED}){
175-
clientMutationId
176-
}
177-
}`
178-
)
179-
)
180-
await Promise.all(mutations)
181145

182-
const fs = require('node:fs')
183-
const comment = fs.readFileSync('build/reports/metrics/artifact-analysis.md', 'utf8')
184-
185-
const writeComment =
186-
`mutation {
187-
addComment(input:{body:"""${comment}""", subjectId:"${response.repository.pullRequest.id}"}){
188-
clientMutationId
189-
}
190-
}`
191-
192-
await github.graphql(writeComment)
146+
- name: Show Results
147+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/show-results@main
193148

194149
- name: Evaluate Result
195150
if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }}
@@ -212,6 +167,8 @@ jobs:
212167
with:
213168
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
214169
aws-region: us-west-2
170+
- name: Configure Gradle
171+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
215172
- name: Calculate Artifact Size Metrics
216173
id: svc-check-batch
217174
run: |

.github/workflows/continuous-integration.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
path: 'aws-sdk-kotlin'
3434
- name: Setup Build
3535
uses: ./aws-sdk-kotlin/.github/actions/setup-build
36+
- name: Configure Gradle
37+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
38+
with:
39+
working-directory: ./aws-sdk-kotlin
3640
- name: Test
3741
working-directory: ./aws-sdk-kotlin
3842
shell: bash
@@ -42,7 +46,7 @@ jobs:
4246
./gradlew -Ptest.java.version=${{ matrix.java-version }} jvmTest --stacktrace
4347
- name: Save Test Reports
4448
if: failure()
45-
uses: actions/upload-artifact@v3
49+
uses: actions/upload-artifact@v4
4650
with:
4751
name: test-reports
4852
path: '**/build/reports'
@@ -60,6 +64,10 @@ jobs:
6064
path: 'aws-sdk-kotlin'
6165
- name: Setup Build
6266
uses: ./aws-sdk-kotlin/.github/actions/setup-build
67+
- name: Configure Gradle - smithy-kotlin
68+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
69+
with:
70+
working-directory: ./smithy-kotlin
6371
- name: Build smithy-kotlin
6472
working-directory: ./smithy-kotlin
6573
shell: bash
@@ -68,6 +76,10 @@ jobs:
6876
pwd
6977
./gradlew --parallel assemble
7078
./gradlew publishToMavenLocal
79+
- name: Configure Gradle aws-sdk-kotlin
80+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
81+
with:
82+
working-directory: ./aws-sdk-kotlin
7183
- name: Test
7284
working-directory: ./aws-sdk-kotlin
7385
shell: bash
@@ -80,7 +92,7 @@ jobs:
8092
./gradlew testAllProtocols
8193
- name: Save Test Reports
8294
if: failure()
83-
uses: actions/upload-artifact@v3
95+
uses: actions/upload-artifact@v4
8496
with:
8597
name: test-reports
8698
path: '**/build/reports'

.github/workflows/kat-transform.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
3939
aws-region: us-west-2
4040

41+
- name: Configure Gradle
42+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
43+
with:
44+
working-directory: ./aws-sdk-kotlin
45+
4146
- name: Setup kat
4247
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main
4348

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout sources
2323
uses: actions/checkout@v4
24+
- name: Configure Gradle
25+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
2426
- name: Lint ${{ env.PACKAGE_NAME }}
2527
run: |
2628
./gradlew ktlint

.github/workflows/merge-main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Merge main
2+
on:
3+
push:
4+
branches: [ main ]
5+
workflow_dispatch:
6+
7+
jobs:
8+
merge:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Merge main
12+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/merge-main@main
13+
with:
14+
exempt-branches: # Add any if required

.github/workflows/sync-mirror.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Sync Mirror
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
git-sync:
10+
# Only sync when pushing to source repo
11+
if: github.repository == 'awslabs/aws-sdk-kotlin'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: git-sync
15+
uses: wei/git-sync@v3
16+
with:
17+
source_repo: "https://aws-sdk-kotlin-ci:${{ secrets.CI_USER_PAT }}@github.com/awslabs/aws-sdk-kotlin.git"
18+
source_branch: "main"
19+
destination_repo: "https://aws-sdk-kotlin-ci:${{ secrets.CI_USER_PAT }}@github.com/awslabs/private-aws-sdk-kotlin-staging.git"
20+
destination_branch: "main"

.github/workflows/update-release-branch.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
schedule:
1717
- cron: "0 7 * * 1-5" # At 07:00 UTC (00:00 PST, 03:00 EST), Monday through Friday
1818

19+
permissions:
20+
id-token: write
21+
contents: read
22+
1923
concurrency:
2024
group: release-manual-${{ github.ref }}
2125
cancel-in-progress: true
@@ -27,6 +31,16 @@ jobs:
2731
update-release:
2832
runs-on: ubuntu-latest
2933
steps:
34+
- name: Set start timestamp
35+
id: start
36+
run: printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT"
37+
- name: Configure AWS Credentials
38+
uses: aws-actions/configure-aws-credentials@v4
39+
with:
40+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
41+
aws-region: us-west-2
42+
- name: Setup kat
43+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main
3044
- uses: actions/checkout@v4
3145
with:
3246
ref: 'main'
@@ -43,6 +57,8 @@ jobs:
4357
distribution: 'corretto'
4458
java-version: 17
4559
cache: 'gradle'
60+
- name: Configure Gradle
61+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
4662
- name: Check merge base
4763
shell: bash
4864
run: |
@@ -89,6 +105,10 @@ jobs:
89105
shell: bash
90106
run: |
91107
echo "merging main @ $main_sha into release @ $release_sha";
108+
109+
# Getting rid of the Gradle URL config changes caused by "Configure Gradle"
110+
git stash -- gradle/wrapper/gradle-wrapper.properties
111+
92112
git switch release;
93113
input_message=${{ inputs.commit_message }}
94114
message=${input_message:-"Merging main into release"}
@@ -101,3 +121,23 @@ jobs:
101121
echo "pushing changes to release branch";
102122
git push origin release;
103123
fi
124+
- name: Calculate duration
125+
id: end
126+
run: |
127+
printf -v now '%(%s)T'
128+
duration=$(( now - ${{ steps.start.outputs.timestamp }} ))
129+
echo "duration=$duration" >> "$GITHUB_OUTPUT"
130+
- name: Emit metrics
131+
if: always() # run this step even if previous steps failed or the job is canceled
132+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/emit-metrics@main
133+
with:
134+
namespace: CI Metrics
135+
dimensions: |
136+
Product=aws-sdk-kotlin
137+
Trigger=${{ github.event_name == 'schedule' && 'schedule' || 'manual' }}
138+
metrics: |
139+
ReleaseMergeAttempted:1:Count
140+
ReleaseMergeSucceeded:${{ job.status == 'success' && '1' || '0' }}:Count
141+
ReleaseMergeCanceled:${{ job.status == 'cancelled' && '1' || '0' }}:Count
142+
ReleaseMergeFailed:${{ job.status == 'failure' && '1' || '0' }}:Count
143+
ReleaseMergeDuration:${{ steps.end.outputs.duration }}:Seconds

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ local.properties
1616
# ignore generated files
1717
services/*/generated-src
1818
services/*/build.gradle.kts
19+
services/*/API.md
1920
.kotest/
2021
.kotlin/
2122
*.klib

0 commit comments

Comments
 (0)