Skip to content

Commit d07b8c5

Browse files
committed
Merge branch 'develop' of https://github.com/hjgraca/powertools-lambda-dotnet into fix(metrics)-dimessions-with-missing-array
2 parents 6d63fac + b7d3774 commit d07b8c5

File tree

99 files changed

+2673
-477
lines changed

Some content is hidden

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

99 files changed

+2673
-477
lines changed

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
commit-message:
8+
prefix: chore
9+
include: scope
10+
11+
- package-ecosystem: docker
12+
directory: /docs
13+
commit-message:
14+
prefix: chore
15+
include: scope
16+
schedule:
17+
interval: daily

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ name: Build .NET
22

33
on:
44
push:
5+
paths:
6+
- "libraries/**"
57
branches: [develop, main]
68
pull_request:
9+
paths:
10+
- "libraries/**"
711
branches: [develop, main]
812

913
defaults:
@@ -18,9 +22,9 @@ jobs:
1822
runs-on: ubuntu-latest
1923

2024
steps:
21-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2226
- name: Setup .NET 6.0 & 8.0
23-
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # 4.0.0
27+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
2428
with:
2529
dotnet-version: |
2630
6.0.405
@@ -32,7 +36,7 @@ jobs:
3236
- name: Test & Code Coverage
3337
run: dotnet test --filter "Category!=E2E" --collect:"XPlat Code Coverage" --results-directory ./codecov --verbosity normal
3438
- name: Codecov
35-
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # 4.5.0
39+
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # 5.3.1
3640
with:
3741
token: ${{ secrets.CODECOV_TOKEN }}
3842
flags: unittests

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: "CodeQL"
22

33
on:
44
push:
5+
paths:
6+
- "libraries/**"
57
branches: [ "develop", main ]
68
pull_request:
7-
# The branches below must be a subset of the branches above
9+
paths:
10+
- "libraries/**"
811
branches: [ "develop" ]
912
schedule:
1013
- cron: '42 8 * * 0'
@@ -25,18 +28,18 @@ jobs:
2528

2629
steps:
2730
- name: Checkout repository
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2932

3033
# Initializes the CodeQL tools for scanning.
3134
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 #v2
35+
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 #v2
3336
with:
3437
languages: ${{ matrix.language }}
3538

3639
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
3740
# If this step fails, then you should remove it and run the build manually (see below)
3841
- name: Autobuild
39-
uses: github/codeql-action/autobuild@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 #v2
42+
uses: github/codeql-action/autobuild@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 #v2
4043

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

5154
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 #v2
55+
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 #v2

.github/workflows/dispatch_analytics.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ jobs:
3030
environment: analytics
3131
steps:
3232
- name: Configure AWS credentials
33-
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
33+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722
3434
with:
3535
aws-region: eu-central-1
3636
role-to-assume: ${{ secrets.AWS_ANALYTICS_ROLE_ARN }}
37+
mask-aws-account-id: true
3738

3839
- name: Invoke Lambda function
3940
run: |

.github/workflows/docs.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
runs-on: ubuntu-latest
2121
environment: Docs
2222
steps:
23-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
with:
2525
fetch-depth: 0
2626
- name: Set up Python
27-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2828
with:
29-
python-version: "3.8"
29+
python-version: "3.12"
3030
- name: Capture branch and tag
3131
id: branch_name
3232
run: |
@@ -35,10 +35,11 @@ jobs:
3535
- name: Build docs website
3636
run: make build-docs-website
3737
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
38+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
3939
with:
4040
aws-region: us-east-1
4141
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
42+
mask-aws-account-id: true
4243
- name: Deploy Docs
4344
run: |
4445
aws s3 sync \
@@ -52,22 +53,23 @@ jobs:
5253
runs-on: ubuntu-latest
5354
environment: Docs
5455
steps:
55-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
56-
- name: Setup .NET 6.0
57-
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
56+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57+
- name: Setup .NET 8.0
58+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
5859
with:
59-
dotnet-version: 6.0.405
60+
dotnet-version: '8.x'
6061

6162
- name: Build Api Docs
6263
run: |
6364
dotnet tool install -g docfx
6465
docfx apidocs/docfx.json
6566
6667
- name: Configure AWS credentials
67-
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
68+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
6869
with:
6970
aws-region: us-east-1
7071
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
72+
mask-aws-account-id: true
7173
- name: Deploy Docs
7274
run: |
7375
aws s3 sync \

.github/workflows/e2e-tests.yml

Lines changed: 35 additions & 25 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

@@ -13,8 +13,13 @@ name: E2E Tests
1313
on:
1414
workflow_dispatch:
1515
push:
16+
paths:
17+
- "libraries/**"
1618
branches:
1719
- develop
20+
21+
concurrency:
22+
group: e2e
1823

1924
permissions:
2025
id-token: write
@@ -25,17 +30,17 @@ jobs:
2530
runs-on: ubuntu-latest
2631
steps:
2732
- name: Checkout code
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2934

3035
- name: Configure AWS credentials
31-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
36+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
3237
with:
3338
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
3439
aws-region: us-east-1
3540
mask-aws-account-id: true
3641

3742
- name: Set up .NET
38-
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
43+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
3944
with:
4045
dotnet-version: '8.x'
4146

@@ -45,10 +50,10 @@ jobs:
4550
- name: Install AWS Lambda .NET CLI Tools
4651
run: dotnet tool install -g Amazon.Lambda.Tools
4752

48-
- name: Deploy Core Stack
53+
- name: Deploy Stack
4954
run: |
5055
cd libraries/tests/e2e/infra
51-
cdk deploy --require-approval never
56+
cdk deploy --all --require-approval never
5257
5358
deploy-aot-stack:
5459
strategy:
@@ -62,16 +67,17 @@ jobs:
6267
runs-on: ${{ matrix.os }}
6368
steps:
6469
- name: Checkout code
65-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
70+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
6671

6772
- name: Configure AWS credentials
68-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
73+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
6974
with:
7075
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
7176
aws-region: us-east-1
77+
mask-aws-account-id: true
7278

7379
- name: Set up .NET
74-
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
80+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
7581
with:
7682
dotnet-version: '8.x'
7783

@@ -84,35 +90,39 @@ jobs:
8490
- name: Deploy AOT Stack
8591
run: |
8692
cd libraries/tests/e2e/infra-aot
87-
cdk deploy -c architecture=${{ matrix.arch }} --require-approval never
93+
cdk deploy --all -c architecture=${{ matrix.arch }} --require-approval never
8894
8995
run-tests:
96+
strategy:
97+
matrix:
98+
utility: [core, idempotency]
9099
runs-on: ubuntu-latest
91100
needs: [deploy-stack,deploy-aot-stack]
101+
92102
steps:
93103
- name: Checkout code
94-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
104+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
95105

96106
- name: Configure AWS credentials
97-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
107+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
98108
with:
99109
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
100110
aws-region: us-east-1
101111
mask-aws-account-id: true
102112

103113
- name: Set up .NET
104-
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
114+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.0
105115
with:
106116
dotnet-version: '8.x'
107117

108-
- name: Run Core Tests
118+
- name: Run Tests
109119
run: |
110-
cd libraries/tests/e2e/functions/core
120+
cd libraries/tests/e2e/functions/${{ matrix.utility }}
111121
dotnet test --filter Category!=AOT
112122
113-
- name: Run Core AOT Tests
123+
- name: Run AOT Tests
114124
run: |
115-
cd libraries/tests/e2e/functions/core
125+
cd libraries/tests/e2e/functions/${{ matrix.utility }}
116126
dotnet test --filter Category=AOT
117127
118128
destroy-stack:
@@ -121,10 +131,10 @@ jobs:
121131
if: always()
122132
steps:
123133
- name: Checkout code
124-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
134+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
125135

126136
- name: Configure AWS credentials
127-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
137+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
128138
with:
129139
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
130140
aws-region: us-east-1
@@ -136,10 +146,10 @@ jobs:
136146
- name: Install AWS Lambda .NET CLI Tools
137147
run: dotnet tool install -g Amazon.Lambda.Tools
138148

139-
- name: Destroy Core Stack
149+
- name: Destroy Stack
140150
run: |
141151
cd libraries/tests/e2e/infra
142-
cdk destroy --force
152+
cdk destroy --all --force
143153
144154
destroy-aot-stack:
145155
strategy:
@@ -155,10 +165,10 @@ jobs:
155165
if: always()
156166
steps:
157167
- name: Checkout code
158-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
168+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
159169

160170
- name: Configure AWS credentials
161-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
171+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
162172
with:
163173
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
164174
aws-region: us-east-1
@@ -170,8 +180,8 @@ jobs:
170180
- name: Install AWS Lambda .NET CLI Tools
171181
run: dotnet tool install -g Amazon.Lambda.Tools
172182

173-
- name: Destroy arm64 AOT Core Stack
183+
- name: Destroy arm64 AOT Stack
174184
run: |
175185
cd libraries/tests/e2e/infra-aot
176-
cdk destroy -c architecture=${{ matrix.arch }} --force
186+
cdk destroy --all -c architecture=${{ matrix.arch }} --force
177187

.github/workflows/label_pr_on_title.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
- name: "Label PR based on title"
27-
uses: actions/github-script@v6
27+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2828
env:
2929
PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }}
3030
PR_TITLE: ${{ needs.get_pr_details.outputs.prTitle }}

.github/workflows/on_label_added.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
issues: write
2424
pull-requests: write
2525
steps:
26-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
# Maintenance: Persist state per PR as an artifact to avoid spam on label add
2828
- name: "Suggest split large Pull Request"
29-
uses: actions/github-script@v6
29+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3030
env:
3131
PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }}
3232
PR_ACTION: ${{ needs.get_pr_details.outputs.prAction }}

.github/workflows/on_merged_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
runs-on: ubuntu-latest
2121
if: needs.get_pr_details.outputs.prIsMerged == 'true'
2222
steps:
23-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
- name: "Label PR related issue for release"
25-
uses: actions/github-script@v6
25+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2626
env:
2727
PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }}
2828
PR_BODY: ${{ needs.get_pr_details.outputs.prBody }}

.github/workflows/on_opened_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
needs: get_pr_details
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
- name: "Ensure related issue is present"
24-
uses: actions/github-script@v6
24+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2525
env:
2626
PR_BODY: ${{ needs.get_pr_details.outputs.prBody }}
2727
PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }}

0 commit comments

Comments
 (0)