Skip to content

Commit b73dfa0

Browse files
authored
Model product DON from RANE SOT (#21509)
* upgrade ctf * trigger * rane flow * parallel jobs * adjust CI * fix flag * fix * refs * refs * try compatible * compatible * add product * summary * summary * summary * trigger * comment sot until enabled * remove trigger * fix
1 parent 1ffde0d commit b73dfa0

5 files changed

Lines changed: 94 additions & 20 deletions

File tree

.github/workflows/devenv-compat.yml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ on:
77
description: "Strip image suffix from tag so it matches the registry tag"
88
required: false
99
type: string
10+
product:
11+
description: "Product name to query in RANE SOT (jq '.nodes[].jobs[].product')"
12+
required: false
13+
type: string
14+
no-git-rollback:
15+
description: "Skip git rollback during compatibility testing"
16+
required: false
17+
type: boolean
18+
default: false
19+
refs:
20+
description: "Git refs to test, should be used only for tool testing purposes. In all other cases refs are detected automatically either from Git or RANE SOT"
21+
required: false
22+
type: string
1023
buildcmd:
1124
description: "Build command to run"
1225
required: true
@@ -19,11 +32,16 @@ on:
1932
description: "Test command to run"
2033
required: true
2134
type: string
22-
nodes:
23-
description: "Number of nodes for the test"
35+
upgrade-nodes:
36+
description: "Number of nodes to upgrade when testing"
2437
required: false
2538
default: "3"
2639
type: string
40+
don-nodes:
41+
description: "Number of available DON nodes after envcmd"
42+
required: false
43+
default: "5"
44+
type: string
2745
node-name-template:
2846
description: "Template for the node name"
2947
required: false
@@ -49,10 +67,6 @@ on:
4967
default: "info"
5068
type: string
5169

52-
concurrency:
53-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}
54-
cancel-in-progress: true
55-
5670
jobs:
5771
compatibility:
5872
permissions:
@@ -63,10 +77,14 @@ jobs:
6377
environment: "integration"
6478
env:
6579
STRIP_IMAGE_SUFFIX: ${{ inputs.strip-image-suffix }}
80+
PRODUCT: ${{ inputs.product }}
81+
NO_GIT_ROLLBACK: ${{ inputs.no-git-rollback && '--no-git-rollback' || '' }} # Convert boolean to flag string
82+
REFS: ${{ inputs.refs }}
6683
BUILD_CMD: ${{ inputs.buildcmd }}
6784
ENV_CMD: ${{ inputs.envcmd }}
6885
TEST_CMD: ${{ inputs.testcmd }}
69-
NODES: ${{ inputs.nodes }}
86+
UPGRADE_NODES: ${{ inputs.upgrade-nodes }}
87+
DON_NODES: ${{ inputs.don-nodes }}
7088
NODE_NAME_TEMPLATE: ${{ inputs.node-name-template }}
7189
VERSIONS_BACK: ${{ inputs.versions-back }}
7290
WORKING_DIR: ${{ inputs.working-directory }}
@@ -142,21 +160,44 @@ jobs:
142160
FAKE_SERVER_IMAGE: ${{ secrets.FAKE_SERVER_IMAGE }}
143161
REGISTRY: ${{ secrets.REGISTRY_SDLC }}/chainlink
144162
STRIP_IMAGE_SUFFIX: ${{ env.STRIP_IMAGE_SUFFIX }}
163+
PRODUCT: ${{ env.PRODUCT }}
164+
NO_GIT_ROLLBACK: ${{ env.NO_GIT_ROLLBACK }}
145165
BUILD_CMD: ${{ env.BUILD_CMD }}
146166
ENV_CMD: ${{ env.ENV_CMD }}
147167
TEST_CMD: ${{ env.TEST_CMD }}
148168
NODES: ${{ env.NODES }}
149169
VERSIONS_BACK: ${{ env.VERSIONS_BACK }}
150170
run: |
171+
REFS_ARGS=""
172+
if [ -n "${{ env.REFS }}" ]; then
173+
REFS_ARGS="--refs ${{ env.REFS }}"
174+
fi
151175
./bin/ctf compat backward \
152176
--registry "${REGISTRY}" \
153177
--buildcmd "${BUILD_CMD}" \
154178
--envcmd "${ENV_CMD}" \
155179
--testcmd "${TEST_CMD}" \
156-
--nodes "${NODES}" \
180+
--product "${PRODUCT}" \
181+
${REFS_ARGS} \
182+
--upgrade-nodes "${UPGRADE_NODES}" \
183+
--don_nodes "${DON_NODES}" \
157184
--node-name-template "${NODE_NAME_TEMPLATE}" \
158185
--strip-image-suffix "${STRIP_IMAGE_SUFFIX}" \
159-
--versions-back "${VERSIONS_BACK}"
186+
--versions-back "${VERSIONS_BACK}" \
187+
${{ env.NO_GIT_ROLLBACK }}
188+
189+
- name: Attach CI Summary
190+
working-directory: ${{ env.WORKING_DIR }}
191+
if: always()
192+
run: |
193+
if [ -f "ci_summary.txt" ]; then
194+
echo "" >> $GITHUB_STEP_SUMMARY
195+
echo "**CI Summary:**" >> $GITHUB_STEP_SUMMARY
196+
echo '```' >> $GITHUB_STEP_SUMMARY
197+
cat ci_summary.txt >> $GITHUB_STEP_SUMMARY
198+
else
199+
echo "ci_summary.txt not found" >> $GITHUB_STEP_SUMMARY
200+
fi
160201
161202
- name: Upload Logs
162203
if: always()

.github/workflows/devenv-nightly-compat.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,52 @@ permissions:
1313
jobs:
1414
# CREcluster compatibility and upgrade test
1515
# TODO
16-
16+
17+
# Data Feeds v1 upgrade test
18+
# this verifies that all the versions existing in RANE SOT for Data Feeds v1 can be upgraded to the latest version
19+
# TODO: disabled for now until we have connectivity
20+
# df1-upgrade:
21+
# uses: ./.github/workflows/devenv-compat.yml
22+
# with:
23+
# buildcmd: "just cli"
24+
# envcmd: "cl u env.toml,products/ocr2/basic.toml"
25+
# testcmd: "cl test ocr2 TestSmoke/rounds"
26+
# don-nodes: "5"
27+
# # this is just an example, right now Git tags != ECR tags != RANE's version field
28+
# # that's why we need it for testing purposes
29+
# product: "data-feeds"
30+
# refs: "2.38.0-rc.0,2.38.0-beta.0"
31+
# no-git-rollback: true
32+
# working-directory: "devenv"
33+
# logs-directory: "./devenv/tests/ocr2/logs"
34+
# ctf-log-level: "info"
35+
# strip-image-suffix: "v"
36+
# secrets: inherit
37+
1738
# Data Feeds v1 cluster compatibility and upgrade test
39+
# this verifies that the cluster can be upgraded from last - N version to last version
40+
# use it as an example project
1841
df1-compat:
1942
uses: ./.github/workflows/devenv-compat.yml
2043
with:
44+
# bash command to build your environment, omit if you are using 'devenv'
2145
buildcmd: "just cli"
46+
# bash command to spin up your environment and product orchestration
2247
envcmd: "cl u env.toml,products/ocr2/basic.toml"
48+
# bash command to run the test verifying your product
2349
testcmd: "cl test ocr2 TestSmoke/rounds"
24-
nodes: "3"
50+
# number of CL nodes to upgrade with new version
51+
upgrade-nodes: "3"
52+
# cl node Docker cocntainer name template, omit if you are using 'devenv'
2553
node-name-template: "don-node%d"
54+
# previous versions to test (sorted by tags, SemVer)
2655
versions-back: "2"
56+
# directory with your developer environment to run buildcmd and envcmd
2757
working-directory: "devenv"
58+
# directory for executing your tests, to run testcmd
2859
logs-directory: "./devenv/tests/ocr2/logs"
60+
# CTF log level
2961
ctf-log-level: "info"
62+
# this is needed to remove 'v' from Git tags to match SDLC ECR tags
3063
strip-image-suffix: "v"
31-
secrets: inherit
64+
secrets: inherit

devenv/env.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@
2020
[[nodesets.node_specs]]
2121

2222
[nodesets.node_specs.node]
23-
image = "public.ecr.aws/chainlink/chainlink:2.30.0"
23+
image = "public.ecr.aws/chainlink/chainlink:2.38.1-beta.0"
2424

2525
[[nodesets.node_specs]]
2626

2727
[nodesets.node_specs.node]
28-
image = "public.ecr.aws/chainlink/chainlink:2.30.0"
28+
image = "public.ecr.aws/chainlink/chainlink:2.38.1-beta.0"
2929

3030
[[nodesets.node_specs]]
3131

3232
[nodesets.node_specs.node]
33-
image = "public.ecr.aws/chainlink/chainlink:2.30.0"
33+
image = "public.ecr.aws/chainlink/chainlink:2.38.1-beta.0"
3434

3535
[[nodesets.node_specs]]
3636

3737
[nodesets.node_specs.node]
38-
image = "public.ecr.aws/chainlink/chainlink:2.30.0"
38+
image = "public.ecr.aws/chainlink/chainlink:2.38.1-beta.0"
3939

4040
[[nodesets.node_specs]]
4141

4242
[nodesets.node_specs.node]
43-
image = "public.ecr.aws/chainlink/chainlink:2.30.0"
43+
image = "public.ecr.aws/chainlink/chainlink:2.38.1-beta.0"

devenv/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260309171438-f10976da0b9b
2626
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a
2727
github.com/smartcontractkit/chainlink-protos/job-distributor v0.12.0
28-
github.com/smartcontractkit/chainlink-testing-framework/framework v0.15.3
28+
github.com/smartcontractkit/chainlink-testing-framework/framework v0.15.6
2929
github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake v0.14.9
3030
github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5
3131
github.com/smartcontractkit/chainlink-testing-framework/wasp v1.51.2

devenv/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)