Skip to content

Commit 4b9fdd3

Browse files
[CRE] mixed-env nightly full-matrix sweep + special-topology variants
Nightly full sweep that runs the entire CRE matrix under mixed-env, built on top of the dedicated cre-mixed-env-tests.yaml workflow. - cre-mixed-env-tests.yaml: add a full_matrix input. Off (per-PR default) it runs the base EVM set; on (nightly) it also runs the special-topology tests under their mixed-env variant. Matrix entries now carry per-test topology + config, and the render step / ctf-configs / TOPOLOGY_NAME use them. - cre-mixed-env-nightly.yaml: scheduled workflow calling cre-mixed-env-tests.yaml with full_matrix: true, comparing today's develop nightly against a previous one. - Special-topology mixed-env templates (2-2 split, verified via `topology show`): solana, aptos, stellar, sharded (preserves shard0 custom_ports), cache-test (preserves ModuleCache override), multi-gateway (preserves org override + both gateway DONs). - render-mixed-env.sh generalized to render any mixed-env-*-don.toml.tmpl. - gitignore covers rendered configs/mixed-env-*.toml; docs updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d68fd40 commit 4b9fdd3

11 files changed

Lines changed: 982 additions & 24 deletions
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CRE Mixed-Env Nightly Sweep
2+
3+
# Runs the full CRE system-test matrix under the mixed-env topology (2 nodes on
4+
# today's develop nightly image, 2 on yesterday's) to catch non-determinism /
5+
# cross-version incompatibilities introduced into develop between nightlies —
6+
# across the whole suite (EVM + Solana/Aptos/Stellar), not just the per-PR subset.
7+
#
8+
# It calls cre-system-tests.yaml directly with mixed_env_all: true, so no image
9+
# build is needed: both images are the cached nightly develop builds.
10+
11+
on:
12+
schedule:
13+
# After the nightly image build (docker-build.yml runs at 03:00 UTC).
14+
- cron: "0 5 * * *"
15+
workflow_dispatch:
16+
inputs:
17+
baseline_date:
18+
description: "Baseline nightly date (YYYYMMDD). Defaults to yesterday."
19+
required: false
20+
type: string
21+
default: ""
22+
23+
permissions:
24+
contents: read
25+
id-token: write
26+
27+
jobs:
28+
set-dates:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
today: ${{ steps.d.outputs.today }}
32+
baseline: ${{ steps.d.outputs.baseline }}
33+
steps:
34+
- id: d
35+
shell: bash
36+
run: |
37+
today="$(date -u +'%Y%m%d')"
38+
baseline="${{ inputs.baseline_date }}"
39+
if [[ -z "${baseline}" ]]; then
40+
baseline="$(date -u -d 'yesterday' +'%Y%m%d')"
41+
fi
42+
echo "today=${today}" | tee -a "$GITHUB_OUTPUT"
43+
echo "baseline=${baseline}" | tee -a "$GITHUB_OUTPUT"
44+
45+
mixed-env-sweep:
46+
needs: set-dates
47+
permissions:
48+
contents: read
49+
id-token: write
50+
uses: ./.github/workflows/cre-mixed-env-tests.yaml
51+
secrets: inherit
52+
with:
53+
ecr: "sdlc"
54+
chainlink_image_repository_path: "chainlink"
55+
# "PR" side = today's develop nightly.
56+
chainlink_image_tag: "nightly-${{ needs.set-dates.outputs.today }}"
57+
# Baseline side = a previous develop nightly, so the 2-2 split compares two
58+
# develop builds and surfaces non-determinism introduced since then.
59+
mixed_env_baseline_image: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink:nightly-${{ needs.set-dates.outputs.baseline }}"
60+
full_matrix: true

.github/workflows/cre-mixed-env-tests.yaml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ on:
3838
description:
3939
"Full baseline (develop) chainlink image ref. If empty, defaults to the
4040
develop nightly image."
41+
full_matrix:
42+
required: false
43+
type: boolean
44+
default: false
45+
description:
46+
"Full sweep: also include chain-specific and other special-topology
47+
tests (nightly). Per-PR runs leave this false."
4148
workflow_call:
4249
inputs:
4350
chainlink_image_repository_path:
@@ -65,6 +72,13 @@ on:
6572
description:
6673
"Full baseline (develop) chainlink image ref. If empty, defaults to the
6774
develop nightly image."
75+
full_matrix:
76+
required: false
77+
type: boolean
78+
default: false
79+
description:
80+
"Full sweep: also include chain-specific and other special-topology
81+
tests (nightly). Per-PR runs leave this false."
6882

6983
jobs:
7084
define-test-matrix:
@@ -78,27 +92,42 @@ jobs:
7892
id: define-matrix
7993
shell: bash
8094
run: |
81-
# Tests worth running under mixed-env: the OCR3/DON2DON-heavy ones.
82-
TESTS='[
83-
"Test_CRE_V2_Suite_Bucket_A",
84-
"Test_CRE_V2_Suite_Bucket_B",
85-
"Test_CRE_V2_EVM_Read_HeavyCalls",
86-
"Test_CRE_V2_EVM_Read_StateQueries",
87-
"Test_CRE_V2_EVM_Read_TxArtifacts"
95+
# Per-PR set: the OCR3/DON2DON-heavy EVM tests, on the base mixed-env topology.
96+
ENTRIES='[
97+
{"test_name":"Test_CRE_V2_Suite_Bucket_A","topology":"mixed-env","configs":"configs/mixed-env-don.toml"},
98+
{"test_name":"Test_CRE_V2_Suite_Bucket_B","topology":"mixed-env","configs":"configs/mixed-env-don.toml"},
99+
{"test_name":"Test_CRE_V2_EVM_Read_HeavyCalls","topology":"mixed-env","configs":"configs/mixed-env-don.toml"},
100+
{"test_name":"Test_CRE_V2_EVM_Read_StateQueries","topology":"mixed-env","configs":"configs/mixed-env-don.toml"},
101+
{"test_name":"Test_CRE_V2_EVM_Read_TxArtifacts","topology":"mixed-env","configs":"configs/mixed-env-don.toml"}
88102
]'
103+
104+
# Nightly full sweep: add the special-topology tests under their mixed-env variant.
105+
if [[ "${{ inputs.full_matrix }}" == "true" ]]; then
106+
FULL='[
107+
{"test_name":"Test_CRE_V2_Aptos_Suite","topology":"mixed-env-aptos","configs":"configs/mixed-env-aptos-don.toml"},
108+
{"test_name":"Test_CRE_V2_Stellar_Suite","topology":"mixed-env-stellar","configs":"configs/mixed-env-stellar-don.toml"},
109+
{"test_name":"Test_CRE_V2_Solana_Write","topology":"mixed-env-solana","configs":"configs/mixed-env-solana-don.toml"},
110+
{"test_name":"Test_CRE_V2_Solana_LogTrigger","topology":"mixed-env-solana","configs":"configs/mixed-env-solana-don.toml"},
111+
{"test_name":"Test_CRE_V2_Solana_Read_Accounts","topology":"mixed-env-solana","configs":"configs/mixed-env-solana-don.toml"},
112+
{"test_name":"Test_CRE_V2_Sharding","topology":"mixed-env-sharded","configs":"configs/mixed-env-sharded-don.toml"},
113+
{"test_name":"Test_CRE_V2_Module_Cache","topology":"mixed-env-cache-test","configs":"configs/mixed-env-cache-test-don.toml"},
114+
{"test_name":"Test_CRE_V2_HTTP_Action_Multi_Gateway","topology":"mixed-env-multi-gateway","configs":"configs/mixed-env-multi-gateway-don.toml"}
115+
]'
116+
ENTRIES=$(jq -c -n --argjson a "$ENTRIES" --argjson b "$FULL" '$a + $b')
117+
fi
118+
89119
matrix=$(jq -c -n \
90-
--argjson tests "$TESTS" \
120+
--argjson entries "$ENTRIES" \
91121
--argjson run_id "${{ github.run_id }}" \
92122
--arg run_attempt "${{ github.run_attempt }}" '
93-
$tests | to_entries | map({
94-
test_name: .value,
123+
$entries | to_entries | map(.value + {
95124
test_id: .key,
96125
runs_on: "runs-on=\($run_id)-\(.key)-\($run_attempt)/cpu=16/ram=64/family=m7i+m8i/spot=co/image=ubuntu24-full-x64/extras=s3-cache+tmpfs"
97126
})')
98127
echo "matrix=$matrix" | tee -a "${GITHUB_OUTPUT}"
99128
100129
run-mixed-env-tests:
101-
name: ${{ matrix.tests.test_name }} (mixed-env)
130+
name: ${{ matrix.tests.test_name }} (${{ matrix.tests.topology }})
102131
permissions:
103132
contents: read
104133
id-token: write
@@ -207,7 +236,8 @@ jobs:
207236
export CRE_PR_IMAGE CRE_BASELINE_IMAGE
208237
echo "PR image: ${CRE_PR_IMAGE}"
209238
echo "Baseline image: ${CRE_BASELINE_IMAGE}"
210-
bash configs/render-mixed-env.sh
239+
echo "Config: ${{ matrix.tests.configs }}"
240+
bash configs/render-mixed-env.sh "${{ matrix.tests.configs }}"
211241
212242
- name: Start local CRE
213243
id: start-local-cre
@@ -221,7 +251,7 @@ jobs:
221251
chainlink-image: ""
222252
chip-router-image: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{
223253
secrets.QA_AWS_REGION }}.amazonaws.com/local-cre-chip-router:v1.0.1"
224-
ctf-configs: configs/mixed-env-don.toml
254+
ctf-configs: ${{ matrix.tests.configs }}
225255
retry-count: "3"
226256
retry-delay-seconds: "15"
227257
cleanup-on-error: "false"
@@ -246,7 +276,7 @@ jobs:
246276
TEST_NAME: ${{ matrix.tests.test_name }}
247277
TEST_TIMEOUT: 7m
248278
RUN_QUARANTINED_TESTS: "true"
249-
TOPOLOGY_NAME: mixed-env
279+
TOPOLOGY_NAME: ${{ matrix.tests.topology }}
250280
GITHUB_TOKEN: ${{ steps.github-token.outputs.access-token || '' }}
251281
PARALLEL_COUNT: "10"
252282
CRE_TEST_PARALLEL_ENABLED: "true"

core/scripts/cre/environment/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ cre_v*
1515
configs/*-cache.toml
1616
cache/
1717

18-
# rendered mixed-env topology (generated from configs/mixed-env-don.toml.tmpl)
19-
configs/mixed-env-don.toml
18+
# rendered mixed-env topologies (generated from configs/mixed-env-*.toml.tmpl); .tmpl are tracked
19+
configs/mixed-env-*.toml
2020

2121
logs/
2222

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Mixed-env Aptos topology (template) — derived from workflow-gateway-don-aptos.toml.
2+
#
3+
# Same as workflow-gateway-don-aptos, except the workflow DON runs 2 nodes on the PR
4+
# image and 2 on the develop image, to surface non-determinism between the two code
5+
# versions (see docs/mixed-env.md). Render with configs/render-mixed-env.sh:
6+
#
7+
# CRE_PR_IMAGE=<pr> CRE_BASELINE_IMAGE=<develop> \
8+
# ./configs/render-mixed-env.sh configs/mixed-env-aptos-don.toml
9+
#
10+
# Keep in sync with workflow-gateway-don-aptos.toml if that base topology changes.
11+
# Do NOT set CTF_CHAINLINK_IMAGE with this topology (it would force one image on all nodes).
12+
13+
[chip_router]
14+
image = "local-cre-chip-router:v1.0.1"
15+
16+
[[blockchains]]
17+
type = "anvil"
18+
chain_id = "1337"
19+
container_name = "anvil-1337"
20+
docker_cmd_params = ["-b", "0.5", "--mixed-mining"]
21+
22+
[[blockchains]]
23+
type = "aptos"
24+
chain_id = "4"
25+
26+
[jd]
27+
csa_encryption_key = "d1093c0060d50a3c89c189b2e485da5a3ce57f3dcb38ab7e2c0d5f0bb2314a44"
28+
image = "job-distributor:0.28.0"
29+
30+
[infra]
31+
type = "docker"
32+
33+
[[nodesets]]
34+
nodes = 4
35+
name = "workflow"
36+
don_family = "test-don-family"
37+
don_types = ["workflow"]
38+
override_mode = "each"
39+
http_port_range_start = 10100
40+
41+
supported_evm_chains = [1337]
42+
env_vars = { CL_CRE_SETTINGS_DEFAULT = '{"PerWorkflow":{"CapabilityCallTimeout":"5m0s","ChainAllowed":{"Default":"false","Values":{"1337":"true","4457093679053095497":"true"}},"ExecutionTimestampsEnabled":"true","FeatureAptosWriteReportBlockTimestampActivePeriod":"[2020-01-01 00:00:00 +0000 UTC,2030-01-01 00:00:00 +0000 UTC]"}}' }
43+
capabilities = ["cron", "consensus", "aptos-4", "don-time"]
44+
registry_based_launch_allowlist = ["cron-trigger@1.0.0"]
45+
46+
[nodesets.db]
47+
image = "postgres:12.0"
48+
port = 13000
49+
50+
[[nodesets.node_specs]] # node 0 - PR
51+
roles = ["plugin"]
52+
[nodesets.node_specs.node]
53+
image = "${CRE_PR_IMAGE}"
54+
pull_image = true
55+
user_config_overrides = ""
56+
[[nodesets.node_specs]] # node 1 - PR
57+
roles = ["plugin"]
58+
[nodesets.node_specs.node]
59+
image = "${CRE_PR_IMAGE}"
60+
pull_image = true
61+
user_config_overrides = ""
62+
[[nodesets.node_specs]] # node 2 - develop
63+
roles = ["plugin"]
64+
[nodesets.node_specs.node]
65+
image = "${CRE_BASELINE_IMAGE}"
66+
pull_image = true
67+
user_config_overrides = ""
68+
[[nodesets.node_specs]] # node 3 - develop
69+
roles = ["plugin"]
70+
[nodesets.node_specs.node]
71+
image = "${CRE_BASELINE_IMAGE}"
72+
pull_image = true
73+
user_config_overrides = ""
74+
75+
[[nodesets]]
76+
nodes = 1
77+
name = "bootstrap-gateway"
78+
don_family = "test-don-family"
79+
don_types = ["bootstrap", "gateway"]
80+
override_mode = "each"
81+
http_port_range_start = 10300
82+
83+
supported_evm_chains = [1337]
84+
85+
[nodesets.db]
86+
image = "postgres:12.0"
87+
port = 13200
88+
89+
[[nodesets.node_specs]]
90+
roles = ["bootstrap", "gateway"]
91+
[nodesets.node_specs.node]
92+
image = "${CRE_BASELINE_IMAGE}"
93+
pull_image = true
94+
custom_ports = ["5002:5002", "15002:15002"]
95+
user_config_overrides = ""

0 commit comments

Comments
 (0)