Skip to content

Commit ec874c0

Browse files
authored
Merge pull request #752 from aws-powertools/develop
chore: Sync main with develop for release 1.20
2 parents 6e3eee5 + 6deceb3 commit ec874c0

File tree

81 files changed

+2362
-404
lines changed

Some content is hidden

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

81 files changed

+2362
-404
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
- name: Setup .NET 6.0 & 8.0
27-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # 4.2.0
27+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
2828
with:
2929
dotnet-version: |
3030
6.0.405

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232

3333
# Initializes the CodeQL tools for scanning.
3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 #v2
35+
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 #v2
3636
with:
3737
languages: ${{ matrix.language }}
3838

3939
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4040
# If this step fails, then you should remove it and run the build manually (see below)
4141
- name: Autobuild
42-
uses: github/codeql-action/autobuild@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 #v2
42+
uses: github/codeql-action/autobuild@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 #v2
4343

4444
# ℹ️ Command-line programs to run using the OS shell.
4545
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -52,4 +52,4 @@ jobs:
5252
# ./location_of_script_within_repo/buildscript.sh
5353

5454
- name: Perform CodeQL Analysis
55-
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 #v2
55+
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 #v2

.github/workflows/dispatch_analytics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
environment: analytics
3131
steps:
3232
- name: Configure AWS credentials
33-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
33+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9
3434
with:
3535
aws-region: eu-central-1
3636
role-to-assume: ${{ secrets.AWS_ANALYTICS_ROLE_ARN }}

.github/workflows/docs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626
- name: Set up Python
27-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
27+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2828
with:
2929
python-version: "3.12"
3030
- name: Capture branch and tag
@@ -35,7 +35,7 @@ jobs:
3535
- name: Build docs website
3636
run: make build-docs-website
3737
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
38+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
3939
with:
4040
aws-region: us-east-1
4141
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
@@ -54,18 +54,18 @@ jobs:
5454
environment: Docs
5555
steps:
5656
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57-
- name: Setup .NET 6.0
58-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # 4.2.0
57+
- name: Setup .NET 8.0
58+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
5959
with:
60-
dotnet-version: 6.0.405
60+
dotnet-version: '8.x'
6161

6262
- name: Build Api Docs
6363
run: |
6464
dotnet tool install -g docfx
6565
docfx apidocs/docfx.json
6666
6767
- name: Configure AWS credentials
68-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
68+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
6969
with:
7070
aws-region: us-east-1
7171
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}

.github/workflows/e2e-tests.yml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PROCESS
22
#
3-
# 1. Deploy the core and AOT stacks using the infra deployment workflow.
3+
# 1. Deploy the E2E stacks using the infra deployment workflow for non-aot and aot.
44
# 2. Run the E2E tests after the infrastructure is deployed.
55
# 3. Destroy the CDK stacks after the tests are completed.
66

@@ -33,14 +33,14 @@ jobs:
3333
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3434

3535
- name: Configure AWS credentials
36-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
36+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
3737
with:
3838
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
3939
aws-region: us-east-1
4040
mask-aws-account-id: true
4141

4242
- name: Set up .NET
43-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # 4.2.0
43+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
4444
with:
4545
dotnet-version: '8.x'
4646

@@ -50,10 +50,10 @@ jobs:
5050
- name: Install AWS Lambda .NET CLI Tools
5151
run: dotnet tool install -g Amazon.Lambda.Tools
5252

53-
- name: Deploy Core Stack
53+
- name: Deploy Stack
5454
run: |
5555
cd libraries/tests/e2e/infra
56-
cdk deploy --require-approval never
56+
cdk deploy --all --require-approval never
5757
5858
deploy-aot-stack:
5959
strategy:
@@ -70,14 +70,14 @@ jobs:
7070
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
7171

7272
- name: Configure AWS credentials
73-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
73+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
7474
with:
7575
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
7676
aws-region: us-east-1
7777
mask-aws-account-id: true
7878

7979
- name: Set up .NET
80-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # 4.2.0
80+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
8181
with:
8282
dotnet-version: '8.x'
8383

@@ -90,35 +90,39 @@ jobs:
9090
- name: Deploy AOT Stack
9191
run: |
9292
cd libraries/tests/e2e/infra-aot
93-
cdk deploy -c architecture=${{ matrix.arch }} --require-approval never
93+
cdk deploy --all -c architecture=${{ matrix.arch }} --require-approval never
9494
9595
run-tests:
96+
strategy:
97+
matrix:
98+
utility: [core, idempotency]
9699
runs-on: ubuntu-latest
97100
needs: [deploy-stack,deploy-aot-stack]
101+
98102
steps:
99103
- name: Checkout code
100104
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
101105

102106
- name: Configure AWS credentials
103-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
107+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
104108
with:
105109
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
106110
aws-region: us-east-1
107111
mask-aws-account-id: true
108112

109113
- name: Set up .NET
110-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # 4.2.0
114+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
111115
with:
112116
dotnet-version: '8.x'
113117

114-
- name: Run Core Tests
118+
- name: Run Tests
115119
run: |
116-
cd libraries/tests/e2e/functions/core
120+
cd libraries/tests/e2e/functions/${{ matrix.utility }}
117121
dotnet test --filter Category!=AOT
118122
119-
- name: Run Core AOT Tests
123+
- name: Run AOT Tests
120124
run: |
121-
cd libraries/tests/e2e/functions/core
125+
cd libraries/tests/e2e/functions/${{ matrix.utility }}
122126
dotnet test --filter Category=AOT
123127
124128
destroy-stack:
@@ -130,7 +134,7 @@ jobs:
130134
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
131135

132136
- name: Configure AWS credentials
133-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
137+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
134138
with:
135139
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
136140
aws-region: us-east-1
@@ -142,10 +146,10 @@ jobs:
142146
- name: Install AWS Lambda .NET CLI Tools
143147
run: dotnet tool install -g Amazon.Lambda.Tools
144148

145-
- name: Destroy Core Stack
149+
- name: Destroy Stack
146150
run: |
147151
cd libraries/tests/e2e/infra
148-
cdk destroy --force
152+
cdk destroy --all --force
149153
150154
destroy-aot-stack:
151155
strategy:
@@ -164,7 +168,7 @@ jobs:
164168
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
165169

166170
- name: Configure AWS credentials
167-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
171+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
168172
with:
169173
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
170174
aws-region: us-east-1
@@ -176,8 +180,8 @@ jobs:
176180
- name: Install AWS Lambda .NET CLI Tools
177181
run: dotnet tool install -g Amazon.Lambda.Tools
178182

179-
- name: Destroy arm64 AOT Core Stack
183+
- name: Destroy arm64 AOT Stack
180184
run: |
181185
cd libraries/tests/e2e/infra-aot
182-
cdk destroy -c architecture=${{ matrix.arch }} --force
186+
cdk destroy --all -c architecture=${{ matrix.arch }} --force
183187

.github/workflows/ossf_scorecard.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
schedule:
7+
- cron: "0 9 * * *"
8+
push:
9+
branches: [main]
10+
workflow_dispatch:
11+
12+
permissions: read-all
13+
14+
jobs:
15+
analysis:
16+
name: Scorecard analysis
17+
runs-on: ubuntu-latest
18+
# environment: scorecard
19+
permissions:
20+
security-events: write # update code-scanning dashboard
21+
id-token: write # confirm org+repo identity before publish results
22+
23+
steps:
24+
- name: "Checkout code"
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- name: "Run analysis"
30+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
31+
with:
32+
results_file: results.sarif
33+
results_format: sarif
34+
publish_results: true # publish to OSSF Scorecard REST API
35+
# repo_token: ${{ secrets.SCORECARD_TOKEN }} # read-only fine-grained token to read branch protection settings
36+
37+
- name: "Upload results"
38+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
39+
with:
40+
name: SARIF file
41+
path: results.sarif
42+
retention-days: 5
43+
44+
# Upload the results to GitHub's code scanning dashboard.
45+
- name: "Upload to code-scanning"
46+
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
47+
with:
48+
sarif_file: results.sarif

.github/workflows/reusable_publish_docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install poetry
4242
run: pipx install poetry
4343
- name: Set up Python
44-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
44+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4545
with:
4646
python-version: "3.12"
4747
cache: "poetry"
@@ -67,7 +67,7 @@ jobs:
6767
poetry run mike set-default --push latest
6868
6969
- name: Configure AWS credentials
70-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
70+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
7171
with:
7272
aws-region: us-east-1
7373
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
@@ -95,7 +95,7 @@ jobs:
9595
brew install -f docfx --skip-cask-deps --ignore-dependencies
9696
docfx apidocs/docfx.json
9797
- name: Configure AWS credentials
98-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
98+
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
9999
with:
100100
aws-region: us-east-1
101101
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}

.github/workflows/secure_workflows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
- name: Ensure 3rd party workflows have SHA pinned
19-
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@c3a2b64f69b7a1542a68f44d9edbd9ec3fc1455e # v3.0.20
19+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@6eb1abde32fed00453b0d03497f4ba4fecba146d # v3.0.21
2020
with:
2121
# Trusted GitHub Actions and/or organizations
2222
allowlist: |

docs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# v9.1.18
2-
FROM squidfunk/mkdocs-material@sha256:41942f7a2f5163aacd0e866e076d95db4f26550b97d76c1594c04250cbb580e9
2+
FROM squidfunk/mkdocs-material@sha256:c62453b1ba229982c6325a71165c1a3007c11bd3dd470e7a1446c5783bd145b4
33
RUN pip install mkdocs-git-revision-date-plugin

0 commit comments

Comments
 (0)