Skip to content

Commit 33e9068

Browse files
Tofelyashnevatia
authored andcommitted
[DX-4048] use dynamic ChIP Ingress/Router host port allocation (#22315)
* use dynamic ChIP Ingress/Router host port allocation * lint fix * fix actionlints * tagged CTF
1 parent 130148e commit 33e9068

14 files changed

Lines changed: 172 additions & 107 deletions

File tree

.github/workflows/cre-regression-system-tests.yaml

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
chainlink_image_repository_path:
7-
description: "ECR repository name used to compose image with chainlink_image_tag (for example: chainlink-integration-tests or chainlink or chainlink/chainlink)."
7+
description: "ECR repository name used to compose image with chainlink_image_tag
8+
(for example: chainlink-integration-tests or chainlink or
9+
chainlink/chainlink)."
810
required: true
911
type: string
1012
chainlink_image_tag:
@@ -18,16 +20,20 @@ on:
1820
- "sdlc"
1921
- "public"
2022
default: "sdlc"
21-
description: "Whether to use the SDLC or public ECR registry for the Chainlink image."
23+
description: "Whether to use the SDLC or public ECR registry for the Chainlink
24+
image."
2225
chainlink_version:
2326
required: false
2427
type: string
25-
description: "The version of Chainlink repository to use for the tests. If empty, defaults to github.sha."
28+
description: "The version of Chainlink repository to use for the tests. If
29+
empty, defaults to github.sha."
2630
default: ""
2731
workflow_call:
2832
inputs:
2933
chainlink_image_repository_path:
30-
description: "ECR repository name used to compose image with chainlink_image_tag (for example: chainlink-integration-tests or chainlink or chainlink/chainlink)."
34+
description: "ECR repository name used to compose image with chainlink_image_tag
35+
(for example: chainlink-integration-tests or chainlink or
36+
chainlink/chainlink)."
3137
required: true
3238
type: string
3339
chainlink_image_tag:
@@ -37,17 +43,19 @@ on:
3743
ecr:
3844
type: string
3945
required: true
40-
default: "sdlc"
41-
description: "Whether to use the SDLC (sdlc) or public ECR registry (public) for the Chainlink image."
46+
description: "Whether to use the SDLC (sdlc) or public ECR registry (public) for
47+
the Chainlink image."
4248
chainlink_version:
4349
required: false
4450
type: string
45-
description: "The version of Chainlink repository to use for the tests. If empty, defaults to github.sha."
51+
description: "The version of Chainlink repository to use for the tests. If
52+
empty, defaults to github.sha."
4653
default: ""
4754

4855
jobs:
4956
define-test-matrix:
50-
runs-on: runs-on=${{ github.run_id }}/cpu=8/ram=32/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
57+
runs-on: runs-on=${{ github.run_id
58+
}}/cpu=8/ram=32/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
5159
outputs:
5260
matrix: ${{ steps.define-matrix.outputs.matrix }}
5361
permissions:
@@ -102,10 +110,12 @@ jobs:
102110
fail-fast: false
103111
matrix:
104112
tests: ${{fromJson(needs.define-test-matrix.outputs.matrix)}}
105-
needs: [define-test-matrix]
113+
needs: [ define-test-matrix ]
106114
# we need a `test_id` and `run_attempt` here to stop runner stealing
107115
# see: https://runs-on.com/guides/troubleshoot/#runner-stealing-and-matrix-jobs
108-
runs-on: runs-on=${{ github.run_id }}-${{ matrix.tests.test_id }}-${{ github.run_attempt }}/cpu=16/ram=64/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
116+
runs-on: runs-on=${{ github.run_id }}-${{ matrix.tests.test_id }}-${{
117+
github.run_attempt
118+
}}/cpu=16/ram=64/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
109119
environment:
110120
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
111121
name: integration
@@ -115,10 +125,16 @@ jobs:
115125
ENABLE_AUTO_QUARANTINE: "true"
116126
# override Chip Ingress and Chip Config images with remote images. We have added this env var here, instead of the "Start local CRE" step, because
117127
# Beholder stack will be started only for the Beholder tests
118-
CHIP_INGRESS_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9806ebee2f
119-
CHIP_CONFIG_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced0188f29b969
120-
CTF_CHIP_ROUTER_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
121-
BILLING_PLATFORM_SERVICE_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/billing-platform-service:v1.45.0
128+
CTF_CHIP_INGRESS_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
129+
secrets.QA_AWS_REGION
130+
}}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9806ebee2f
131+
CTF_CHIP_CONFIG_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
132+
secrets.QA_AWS_REGION
133+
}}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced0188f29b969
134+
CTF_CHIP_ROUTER_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{
135+
secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
136+
BILLING_PLATFORM_SERVICE_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
137+
secrets.QA_AWS_REGION }}.amazonaws.com/billing-platform-service:v1.45.0
122138

123139
steps:
124140
- name: Enable S3 Cache for Self-Hosted Runners
@@ -153,7 +169,8 @@ jobs:
153169
id: login-ecr
154170
uses: aws-actions/amazon-ecr-login@183a1442edf41672e66566b7fc560e297a290896 # v2.1.1
155171
with:
156-
registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER, secrets.AWS_ACCOUNT_ID_PROD) }}
172+
registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER,
173+
secrets.AWS_ACCOUNT_ID_PROD) }}
157174
env:
158175
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
159176

@@ -192,7 +209,8 @@ jobs:
192209
shell: bash
193210
id: start-local-cre
194211
env:
195-
CTF_JD_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/job-distributor:0.22.1"
212+
CTF_JD_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
213+
secrets.QA_AWS_REGION }}.amazonaws.com/job-distributor:0.22.1"
196214
CTF_CHAINLINK_IMAGE: "${{ steps.resolve-chainlink-image.outputs.resolved_image }}"
197215
CTF_CONFIGS: configs/workflow-gateway-capabilities-don.toml
198216
CRE_VERSION: ${{ matrix.tests.cre_version }}
@@ -234,17 +252,20 @@ jobs:
234252
--junitfile=/tmp/junit-report-regression.xml \
235253
--format=github-actions \
236254
-- \
237-
-v -run "^(${TEST_NAME})$" -timeout ${TEST_TIMEOUT} -count=1 -parallel=${PARALLEL_COUNT} \
255+
-v -run "^(${TEST_NAME})$" -timeout "${TEST_TIMEOUT}" -count=1 -parallel="${PARALLEL_COUNT}" \
238256
github.com/smartcontractkit/chainlink/system-tests/tests/regression/cre
239257
240-
echo "⚠️⚠️⚠️ Add 'skip-e2e-regression' label to skip this step if necessary ⚠️⚠️⚠️"
241258
exit_code=$?
242-
if [ $exit_code -eq 0 ]; then
259+
if [ "$exit_code" -eq 0 ]; then
243260
echo "tests_result=✅ Tests passed" >> $GITHUB_OUTPUT
244261
fi
245-
exit $exit_code
246262
247-
- name: Analyze and upload test results (${{ steps.run-regression-tests.outputs.tests_result }})
263+
echo "⚠️⚠️⚠️ Add 'skip-e2e-regression' label to skip this step if necessary ⚠️⚠️⚠️"
264+
265+
exit "$exit_code"
266+
267+
- name: Analyze and upload test results (${{
268+
steps.run-regression-tests.outputs.tests_result }})
248269
if: ${{ !cancelled() }}
249270
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
250271
with:

.github/workflows/cre-soak-memory-leak.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,30 @@ jobs:
2828
environment:
2929
name: integration
3030
deployment: false
31-
runs-on: runs-on=${{ github.run_id }}/cpu=32/ram=128/family=m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
31+
runs-on: runs-on=${{ github.run_id
32+
}}/cpu=32/ram=128/family=m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
3233
timeout-minutes: 270 # 4h30m — test timeout is 4h20m
3334
permissions:
3435
contents: read
3536
id-token: write
3637
env:
3738
CTF_CONFIGS: configs/workflow-gateway-capabilities-don.toml
3839
CRE_SOAK_DURATION: "2h"
39-
CTF_JD_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/job-distributor:0.22.1"
40-
CTF_CHAINLINK_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/${{ inputs.ecr_name || 'chainlink' }}:${{ inputs.chainlink_image_tag }}"
41-
CHIP_INGRESS_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9806ebee2f"
42-
CHIP_CONFIG_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced0188f29b969"
43-
CTF_CHIP_ROUTER_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
40+
CTF_JD_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
41+
secrets.QA_AWS_REGION }}.amazonaws.com/job-distributor:0.22.1"
42+
CTF_CHAINLINK_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{
43+
secrets.QA_AWS_REGION }}.amazonaws.com/${{ inputs.ecr_name ||
44+
'chainlink' }}:${{ inputs.chainlink_image_tag }}"
45+
CTF_CHIP_INGRESS_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
46+
secrets.QA_AWS_REGION
47+
}}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9806e\
48+
bee2f"
49+
CTF_CHIP_CONFIG_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
50+
secrets.QA_AWS_REGION
51+
}}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced0188f29\
52+
b969"
53+
CTF_CHIP_ROUTER_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{
54+
secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
4455

4556
steps:
4657
- name: Enable S3 Cache for Self-Hosted Runners
@@ -74,7 +85,8 @@ jobs:
7485
id: login-ecr
7586
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
7687
with:
77-
registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER, secrets.AWS_ACCOUNT_ID_PROD) }}
88+
registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER,
89+
secrets.AWS_ACCOUNT_ID_PROD) }}
7890
env:
7991
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
8092
- name: Start observability stack
@@ -101,8 +113,6 @@ jobs:
101113
id: run-soak
102114
shell: bash
103115
working-directory: system-tests/tests
104-
env:
105-
GITHUB_TOKEN: ${{ steps.github-token.outputs.access-token || '' }}
106116
run: |
107117
gotestsum \
108118
--jsonfile=/tmp/gotest.log \
@@ -134,7 +144,7 @@ jobs:
134144
name: Notify about test Failure
135145
#if: failure()
136146
if: false # TODO: Silence for now
137-
needs: [soak]
147+
needs: [ soak ]
138148
environment:
139149
name: integration
140150
deployment: false

.github/workflows/cre-system-tests.yaml

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
chainlink_image_repository_path:
7-
description: "ECR repository name used to compose image with chainlink_image_tag (for example: chainlink-integration-tests or chainlink or chainlink/chainlink)."
7+
description: "ECR repository name used to compose image with chainlink_image_tag
8+
(for example: chainlink-integration-tests or chainlink or
9+
chainlink/chainlink)."
810
required: true
911
type: string
1012
chainlink_image_tag:
@@ -18,16 +20,20 @@ on:
1820
- "sdlc"
1921
- "public"
2022
default: "sdlc"
21-
description: "Whether to use the SDLC or public ECR registry for the Chainlink image."
23+
description: "Whether to use the SDLC or public ECR registry for the Chainlink
24+
image."
2225
chainlink_version:
2326
required: false
2427
type: string
25-
description: "The version of Chainlink repository to use for the tests. If empty, defaults to github.sha."
28+
description: "The version of Chainlink repository to use for the tests. If
29+
empty, defaults to github.sha."
2630
default: ""
2731
workflow_call:
2832
inputs:
2933
chainlink_image_repository_path:
30-
description: "ECR repository name used to compose image with chainlink_image_tag (for example: chainlink-integration-tests or chainlink or chainlink/chainlink)."
34+
description: "ECR repository name used to compose image with chainlink_image_tag
35+
(for example: chainlink-integration-tests or chainlink or
36+
chainlink/chainlink)."
3137
required: true
3238
type: string
3339
chainlink_image_tag:
@@ -37,17 +43,19 @@ on:
3743
ecr:
3844
type: string
3945
required: true
40-
default: "sdlc"
41-
description: "Whether to use the SDLC (sdlc) or public ECR registry (public) for the Chainlink image."
46+
description: "Whether to use the SDLC (sdlc) or public ECR registry (public) for
47+
the Chainlink image."
4248
chainlink_version:
4349
required: false
4450
type: string
45-
description: "The version of Chainlink repository to use for the tests. If empty, defaults to github.sha."
51+
description: "The version of Chainlink repository to use for the tests. If
52+
empty, defaults to github.sha."
4653
default: ""
4754

4855
jobs:
4956
define-test-matrix:
50-
runs-on: runs-on=${{ github.run_id }}/cpu=8/ram=32/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
57+
runs-on: runs-on=${{ github.run_id
58+
}}/cpu=8/ram=32/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
5159
outputs:
5260
matrix: ${{ steps.define-matrix.outputs.matrix }}
5361
permissions:
@@ -156,10 +164,12 @@ jobs:
156164
fail-fast: false
157165
matrix:
158166
tests: ${{fromJson(needs.define-test-matrix.outputs.matrix)}}
159-
needs: [define-test-matrix]
167+
needs: [ define-test-matrix ]
160168
# we need a `test_id` and `run_attempt` here to stop runner stealing
161169
# see: https://runs-on.com/guides/troubleshoot/#runner-stealing-and-matrix-jobs
162-
runs-on: runs-on=${{ github.run_id }}-${{ matrix.tests.test_id }}-${{ github.run_attempt }}/cpu=16/ram=64/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
170+
runs-on: runs-on=${{ github.run_id }}-${{ matrix.tests.test_id }}-${{
171+
github.run_attempt
172+
}}/cpu=16/ram=64/family=m6i+m5.*/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
163173
environment:
164174
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
165175
name: integration
@@ -169,9 +179,14 @@ jobs:
169179
ENABLE_AUTO_QUARANTINE: "true"
170180
# override Chip Ingress and Chip Config images with remote images. We have added this env var here, instead of the "Start local CRE" step, because
171181
# Beholder stack will be started only for the Beholder tests
172-
CHIP_INGRESS_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9806ebee2f
173-
CHIP_CONFIG_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced0188f29b969
174-
BILLING_PLATFORM_SERVICE_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/billing-platform-service:v1.57.1
182+
CTF_CHIP_INGRESS_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
183+
secrets.QA_AWS_REGION
184+
}}.amazonaws.com/atlas-chip-ingress:da84cb72d3a160e02896247d46ab4b9806ebee2f
185+
CTF_CHIP_CONFIG_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
186+
secrets.QA_AWS_REGION
187+
}}.amazonaws.com/atlas-chip-config:7b4e9ee68fd1c737dd3480b5a3ced0188f29b969
188+
BILLING_PLATFORM_SERVICE_IMAGE: ${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
189+
secrets.QA_AWS_REGION }}.amazonaws.com/billing-platform-service:v1.57.1
175190

176191
steps:
177192
- name: Enable S3 Cache for Self-Hosted Runners
@@ -205,7 +220,8 @@ jobs:
205220
id: login-ecr
206221
uses: aws-actions/amazon-ecr-login@183a1442edf41672e66566b7fc560e297a290896 # v2.1.1
207222
with:
208-
registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER, secrets.AWS_ACCOUNT_ID_PROD) }}
223+
registries: ${{ format('{0},{1}', secrets.QA_AWS_ACCOUNT_NUMBER,
224+
secrets.AWS_ACCOUNT_ID_PROD) }}
209225
env:
210226
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
211227

@@ -250,9 +266,11 @@ jobs:
250266
shell: bash
251267
id: start-local-cre
252268
env:
253-
CTF_JD_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/job-distributor:0.22.1"
269+
CTF_JD_IMAGE: "${{ secrets.AWS_ACCOUNT_ID_PROD }}.dkr.ecr.${{
270+
secrets.QA_AWS_REGION }}.amazonaws.com/job-distributor:0.22.1"
254271
CTF_CHAINLINK_IMAGE: "${{ steps.resolve-chainlink-image.outputs.resolved_image }}"
255-
CTF_CHIP_ROUTER_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
272+
CTF_CHIP_ROUTER_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{
273+
secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
256274
CTF_CONFIGS: ${{ matrix.tests.configs }}
257275
CRE_VERSION: ${{ matrix.tests.cre_version }}
258276
TEST_NAME: ${{ matrix.tests.test_name }}
@@ -353,7 +371,8 @@ jobs:
353371
echo "tests_result=✅ Tests passed" >> $GITHUB_OUTPUT
354372
fi
355373
356-
- name: Analyze and upload test results (${{ steps.run-tests.outputs.tests_result }})
374+
- name: Analyze and upload test results (${{ steps.run-tests.outputs.tests_result
375+
}})
357376
if: ${{ !cancelled() }}
358377
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
359378
with:

0 commit comments

Comments
 (0)