Skip to content

Commit ec20627

Browse files
Merge branch 'develop' into data_classes_simplify_nested_data
2 parents 9f6aac1 + c12fd21 commit ec20627

File tree

124 files changed

+4026
-917
lines changed

Some content is hidden

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

124 files changed

+4026
-917
lines changed

.github/workflows/layer_govcloud.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ jobs:
104104
environment: GovCloud ${{ inputs.environment }} (East)
105105
steps:
106106
- name: Download Zip
107-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
107+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
108108
with:
109109
name: ${{ matrix.layer }}_${{ matrix.arch }}.zip
110110
- name: Download Metadata
111-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
111+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
112112
with:
113113
name: ${{ matrix.layer }}_${{ matrix.arch }}.json
114114
- name: Verify Layer Signature
@@ -173,11 +173,11 @@ jobs:
173173
name: GovCloud ${{ inputs.environment }} (West)
174174
steps:
175175
- name: Download Zip
176-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
176+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
177177
with:
178178
name: ${{ matrix.layer }}_${{ matrix.arch }}.zip
179179
- name: Download Metadata
180-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
180+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
181181
with:
182182
name: ${{ matrix.layer }}_${{ matrix.arch }}.json
183183
- name: Verify Layer Signature

.github/workflows/layer_govcloud_python313.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ jobs:
9696
environment: GovCloud ${{ inputs.environment }} (East)
9797
steps:
9898
- name: Download Zip
99-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
99+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
100100
with:
101101
name: ${{ matrix.layer }}_${{ matrix.arch }}.zip
102102
- name: Download Metadata
103-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
103+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
104104
with:
105105
name: ${{ matrix.layer }}_${{ matrix.arch }}.json
106106
- name: Verify Layer Signature
@@ -161,11 +161,11 @@ jobs:
161161
name: GovCloud ${{ inputs.environment }} (West)
162162
steps:
163163
- name: Download Zip
164-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
164+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
165165
with:
166166
name: ${{ matrix.layer }}_${{ matrix.arch }}.zip
167167
- name: Download Metadata
168-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
168+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
169169
with:
170170
name: ${{ matrix.layer }}_${{ matrix.arch }}.json
171171
- name: Verify Layer Signature

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
artifact_name: ${{ needs.seal.outputs.artifact_name }}
256256

257257
- name: Download provenance
258-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
258+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
259259
with:
260260
name: ${{needs.provenance.outputs.provenance-name}}
261261

.github/workflows/publish_v2_layer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- name: Install poetry
102102
run: pipx install git+https://github.com/python-poetry/poetry@bd500dd3bdfaec3de6894144c9cedb3a9358be84 # v2.0.1
103103
- name: Setup Node.js
104-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
104+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
105105
with:
106106
node-version: "16.12"
107107
- name: Setup python
@@ -117,14 +117,14 @@ jobs:
117117
pip install --require-hashes -r requirements.txt
118118
119119
- name: Set up QEMU
120-
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v2.0.0
120+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v2.0.0
121121
with:
122122
platforms: arm64
123123
# NOTE: we need QEMU to build Layer against a different architecture (e.g., ARM)
124124

125125
- name: Set up Docker Buildx
126126
id: builder
127-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
127+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
128128
with:
129129
install: true
130130
driver: docker
@@ -258,7 +258,7 @@ jobs:
258258
artifact_name: ${{ inputs.source_code_artifact_name }}
259259

260260
- name: Download CDK layer artifacts
261-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
261+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
262262
with:
263263
path: cdk-layer-stack
264264
pattern: cdk-layer-stack-* # merge all Layer artifacts created per region earlier (reusable_deploy_v2_layer_stack.yml; step "Save Layer ARN artifact")

.github/workflows/publish_v3_layer.yml

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ on:
4949
default: false
5050
type: boolean
5151
required: false
52+
skip_lambda_layer:
53+
description: "Skip publishing Lambda Layers as it can publish duplicated versions of the same layer. Useful for semi-failed releases"
54+
type: boolean
55+
required: false
56+
5257
workflow_call:
5358
inputs:
5459
latest_published_version:
@@ -72,6 +77,11 @@ on:
7277
description: "Sealed source code integrity hash"
7378
type: string
7479
required: true
80+
skip_lambda_layer:
81+
description: "Skip publishing Lambda Layers as it can publish duplicated versions of the same layer. Useful for semi-failed releases"
82+
default: false
83+
type: boolean
84+
required: false
7585

7686
permissions:
7787
contents: read
@@ -113,7 +123,7 @@ jobs:
113123
pipx install git+https://github.com/python-poetry/poetry@bd500dd3bdfaec3de6894144c9cedb3a9358be84 # v2.0.1
114124
pipx inject poetry git+https://github.com/python-poetry/poetry-plugin-export@8c83d26603ca94f2e203bfded7b6d7f530960e06 # v1.8.0
115125
- name: Setup Node.js
116-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
126+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
117127
with:
118128
node-version: "18.20.4"
119129
- name: Setup python
@@ -129,14 +139,14 @@ jobs:
129139
pip install --require-hashes -r requirements.txt
130140
131141
- name: Set up QEMU
132-
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v2.0.0
142+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v2.0.0
133143
with:
134144
platforms: arm64
135145
# NOTE: we need QEMU to build Layer against a different architecture (e.g., ARM)
136146

137147
- name: Set up Docker Buildx
138148
id: builder
139-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
149+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
140150
with:
141151
install: true
142152
driver: docker
@@ -180,6 +190,7 @@ jobs:
180190
source_code_integrity_hash: ${{ inputs.source_code_integrity_hash }}
181191

182192
prod:
193+
if: ${{ !inputs.skip_lambda_layer }}
183194
needs: beta
184195
# lower privilege propagated from parent workflow (release-v3.yml)
185196
permissions:
@@ -195,41 +206,39 @@ jobs:
195206
source_code_artifact_name: ${{ inputs.source_code_artifact_name }}
196207
source_code_integrity_hash: ${{ inputs.source_code_integrity_hash }}
197208

198-
# UNCOMMENT sar-beta JOB
199-
#sar-beta:
200-
# needs: beta # canaries run on Layer Beta env
201-
# permissions:
209+
sar-beta:
210+
needs: beta # canaries run on Layer Beta env
211+
permissions:
202212
# lower privilege propagated from parent workflow (release.yml)
203-
# id-token: write
204-
# contents: read
205-
# pull-requests: none
206-
# pages: none
207-
# uses: ./.github/workflows/reusable_deploy_v3_sar.yml
208-
# secrets: inherit
209-
# with:
210-
# stage: "BETA"
211-
# environment: "layer-beta"
212-
# package-version: ${{ inputs.latest_published_version }}
213-
# source_code_artifact_name: ${{ inputs.source_code_artifact_name }}
214-
# source_code_integrity_hash: ${{ inputs.source_code_integrity_hash }}
213+
id-token: write
214+
contents: read
215+
pull-requests: none
216+
pages: none
217+
uses: ./.github/workflows/reusable_deploy_v3_sar.yml
218+
secrets: inherit
219+
with:
220+
stage: "BETA"
221+
environment: "layer-beta"
222+
package-version: ${{ inputs.latest_published_version }}
223+
source_code_artifact_name: ${{ inputs.source_code_artifact_name }}
224+
source_code_integrity_hash: ${{ inputs.source_code_integrity_hash }}
215225

216-
# UNCOMMENT sar-prod JOB
217-
#sar-prod:
218-
# needs: sar-beta
219-
# permissions:
226+
sar-prod:
227+
needs: sar-beta
228+
permissions:
220229
# lower privilege propagated from parent workflow (release.yml)
221-
# id-token: write
222-
# contents: read
223-
# pull-requests: none
224-
# pages: none
225-
# uses: ./.github/workflows/reusable_deploy_v3_sar.yml
226-
# secrets: inherit
227-
# with:
228-
# stage: "PROD"
229-
# environment: "layer-prod"
230-
# package-version: ${{ inputs.latest_published_version }}
231-
# source_code_artifact_name: ${{ inputs.source_code_artifact_name }}
232-
# source_code_integrity_hash: ${{ inputs.source_code_integrity_hash }}
230+
id-token: write
231+
contents: read
232+
pull-requests: none
233+
pages: none
234+
uses: ./.github/workflows/reusable_deploy_v3_sar.yml
235+
secrets: inherit
236+
with:
237+
stage: "PROD"
238+
environment: "layer-prod"
239+
package-version: ${{ inputs.latest_published_version }}
240+
source_code_artifact_name: ${{ inputs.source_code_artifact_name }}
241+
source_code_integrity_hash: ${{ inputs.source_code_integrity_hash }}
233242

234243

235244
# Updating the documentation with the latest Layer ARNs is a two-phase process

.github/workflows/quality_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Complexity baseline
7777
run: make complexity-baseline
7878
- name: Upload coverage to Codecov
79-
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # 5.3.1
79+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # 5.4.0
8080
with:
8181
token: ${{ secrets.CODECOV_TOKEN }}
8282
file: ./coverage.xml

.github/workflows/quality_code_cdk_constructor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ jobs:
5151
python-version: ${{ matrix.python-version }}
5252
cache: "poetry"
5353
- name: Set up QEMU
54-
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v2.0.0
54+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v2.0.0
5555
with:
5656
platforms: arm64
5757
# NOTE: we need QEMU to build Layer against a different architecture (e.g., ARM)
5858
- name: Set up Docker Buildx
5959
id: builder
60-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
60+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
6161
with:
6262
install: true
6363
driver: docker

.github/workflows/release-v3.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ on:
4848
default: false
4949
type: boolean
5050
required: false
51+
skip_lambda_layer:
52+
description: "Skip publishing Lambda Layers as it can publish duplicated versions of the same layer. Useful for semi-failed releases"
53+
default: false
54+
type: boolean
55+
required: false
5156
skip_code_quality:
5257
description: "Skip tests, linting, and baseline. Only use if release fail for reasons beyond our control and you need a quick release."
5358
default: false
@@ -350,6 +355,7 @@ jobs:
350355
pre_release: ${{ inputs.pre_release }}
351356
source_code_artifact_name: ${{ needs.seal.outputs.artifact_name }}
352357
source_code_integrity_hash: ${{ needs.seal.outputs.integrity_hash }}
358+
skip_lambda_layer: ${{ inputs.skip_lambda_layer }}
353359

354360
post_release:
355361
needs: [seal, release, publish_layer]

.github/workflows/reusable_deploy_v2_layer_stack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
role-to-assume: ${{ secrets.AWS_LAYERS_ROLE_ARN }}
160160
mask-aws-account-id: true
161161
- name: Setup Node.js
162-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
162+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
163163
with:
164164
node-version: "16.12"
165165
- name: Setup python
@@ -181,7 +181,7 @@ jobs:
181181
- name: install deps
182182
run: poetry install
183183
- name: Download artifact
184-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
184+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
185185
with:
186186
name: ${{ inputs.artefact-name }}
187187
path: layer

.github/workflows/reusable_deploy_v2_sar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ jobs:
113113
mask-aws-account-id: true
114114

115115
- name: Setup Node.js
116-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
116+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
117117
with:
118118
node-version: ${{ env.NODE_VERSION }}
119119
- name: Download artifact
120-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
120+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
121121
with:
122122
name: ${{ inputs.artefact-name }}
123123
- name: Unzip artefact

.github/workflows/reusable_deploy_v3_layer_stack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
role-to-assume: ${{ secrets.AWS_LAYERS_ROLE_ARN }}
168168
mask-aws-account-id: true
169169
- name: Setup Node.js
170-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
170+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
171171
with:
172172
node-version: "18.20.4"
173173
- name: Setup python
@@ -189,7 +189,7 @@ jobs:
189189
- name: install deps
190190
run: poetry install
191191
- name: Download artifact
192-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
192+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
193193
with:
194194
name: cdk-layer-artifact-py${{ matrix.python-version }}
195195
path: layer_v3

.github/workflows/reusable_deploy_v3_sar.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ jobs:
106106
aws-session-token: ${{ env.AWS_SESSION_TOKEN }}
107107
role-duration-seconds: 1200
108108
aws-region: ${{ env.AWS_REGION }}
109-
role-to-assume: ${{ secrets.AWS_SAR_V2_ROLE_ARN }}
109+
role-to-assume: ${{ secrets.AWS_SAR_V3_ROLE_ARN }}
110110
mask-aws-account-id: true
111111
- name: Setup Node.js
112-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
112+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
113113
with:
114114
node-version: ${{ env.NODE_VERSION }}
115115
- name: Download artifact
116-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
116+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
117117
with:
118118
name: cdk-layer-artifact-py${{ matrix.python-version }}
119119
- name: Unzip artefact
@@ -127,25 +127,22 @@ jobs:
127127
if [[ "${{ inputs.stage }}" == "BETA" ]]; then
128128
SAR_NAME="test-${SAR_NAME}"
129129
fi
130-
ARCH_NAME=$(echo ${{ matrix.architecture }} | tr -d '_')
130+
ARCH_NAME=$(echo ${{ matrix.architecture }} | tr '_' '-')
131131
SAR_NAME="${SAR_NAME}-python${{env.PYTHON_VERSION}}-${ARCH_NAME}"
132132
echo SAR_NAME="${SAR_NAME}" >> "$GITHUB_ENV"
133-
- name: Normalize semantic version
134-
id: semantic-version # v2.0.0a0 -> v2.0.0-a0
135-
env:
136-
VERSION: ${{ inputs.package-version }}
137-
run: |
138-
# VERSION="${VERSION/a/-a}"
139-
VERSION="3.0.0"
140-
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
141133
- name: Prepare SAR App
142-
env:
143-
VERSION: ${{ steps.semantic-version.outputs.VERSION }}
144134
run: |
145135
# From the generated LayerStack cdk.out artifact, find the layer asset path for the correct architecture.
146136
# We'll use this as the source directory of our SAR. This way we are re-using the same layer asset for our SAR.
147137
PYTHON_VERSION=$(echo ${{ matrix.python-version }} | tr -d '.')
148-
asset=$(jq -jc '.Resources[] | select(.Properties.CompatibleArchitectures == ["${{ matrix.architecture }}"]) | .Metadata."aws:asset:path"' "cdk.out/LayerV3Stack-python${PYTHON_VERSION}.template.json")
138+
asset_cdk=$(jq -jc '.Resources[] | select(.Properties.CompatibleArchitectures == ["${{ matrix.architecture }}"]) | .Metadata."aws:asset:path"' "cdk.out/LayerV3Stack-python${PYTHON_VERSION}.template.json")
139+
140+
echo "Normalizing the asset variable"
141+
asset=$(echo $asset_cdk | sed -E 's/^(asset\.[^.]+).*\1/\1/')
142+
143+
VERSION=$(echo ${{ inputs.package-version }} | sed 's/^v//')
144+
echo $asset
145+
echo $VERSION
149146
150147
# fill in the SAR SAM template
151148
sed \
@@ -165,6 +162,7 @@ jobs:
165162
166163
# Package the SAR to our SAR S3 bucket, and publish it
167164
sam package --template-file template.yml --output-template-file packaged.yml --s3-bucket ${{ secrets.AWS_SAR_S3_BUCKET_V3 }}
165+
cat packaged.yml
168166
sam publish --template packaged.yml --region "$AWS_REGION"
169167
- name: Deploy BETA canary
170168
if: ${{ inputs.stage == 'BETA' }}

.github/workflows/run-e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
architecture: "x64"
6363
cache: "poetry"
6464
- name: Setup Node.js
65-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
65+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
6666
with:
6767
node-version: "20.10.0"
6868
- name: Install CDK CLI

0 commit comments

Comments
 (0)