From 78cfaefe2caf18fd75a9f88309b25dc6b5d518c4 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:14:45 +0400 Subject: [PATCH 01/10] fix automation nightly tests --- .github/workflows/automation-nightly-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 6df574e58d0..fe6ad39f740 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -54,7 +54,7 @@ jobs: env: CHAINLINK_COMMIT_SHA: ${{ github.sha }} CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_LOG_LEVEL: debug + TEST_LOG_LEVEL: info SELECTED_NETWORKS: "SIMULATED" strategy: fail-fast: false @@ -62,7 +62,7 @@ jobs: tests: - name: Upgrade suite: smoke - nodes: 6 + nodes: 11 os: ubuntu20.04-8cores-32GB network: SIMULATED command: -run ^TestAutomationNodeUpgrade$ ./smoke From 905ebcadc5817fb240dd782e8d06070232f51c34 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:17:12 +0400 Subject: [PATCH 02/10] fix automation on-demand tests --- .github/workflows/automation-ondemand-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index ed528d2490c..d12c58fd7b4 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -128,21 +128,21 @@ jobs: tests: - name: chaos suite: chaos - nodes: 5 + nodes: 15 os: ubuntu-latest pyroscope_env: ci-automation-on-demand-chaos network: SIMULATED command: -run ^TestAutomationChaos$ ./chaos - name: reorg suite: reorg - nodes: 1 + nodes: 5 os: ubuntu-latest pyroscope_env: ci-automation-on-demand-reorg network: SIMULATED_NONDEV command: -run ^TestAutomationReorg$ ./reorg - name: upgrade suite: smoke - nodes: 6 + nodes: 11 os: ubuntu20.04-8cores-32GB pyroscope_env: ci-automation-on-demand-upgrade network: SIMULATED From a88afb9298c477409b017ac36e26ef50d39241f5 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:18:48 +0400 Subject: [PATCH 03/10] fix automation on-demand tests --- .github/workflows/automation-ondemand-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index d12c58fd7b4..955b9884fa4 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -121,7 +121,7 @@ jobs: env: CHAINLINK_COMMIT_SHA: ${{ github.sha }} CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_LOG_LEVEL: debug + TEST_LOG_LEVEL: info strategy: fail-fast: false matrix: From 0fe0a2586afaac252bd24feb2ac501a5d8968b90 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:30:42 +0400 Subject: [PATCH 04/10] fix automation nightly upgrade tests --- integration-tests/smoke/automation_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index c51b90c1f57..29bd61b9257 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -182,7 +182,7 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool, automationTestConfig t expect := 5 // Upgrade the nodes one at a time and check that the upkeeps are still being performed for i := 0; i < 5; i++ { - err = actions.UpgradeChainlinkNodeVersionsLocal(*cfg.GetChainlinkImageConfig().Image, *cfg.GetChainlinkImageConfig().Version, a.DockerEnv.ClCluster.Nodes[i]) + err = actions.UpgradeChainlinkNodeVersionsLocal(*cfg.GetChainlinkUpgradeImageConfig().Image, *cfg.GetChainlinkUpgradeImageConfig().Version, a.DockerEnv.ClCluster.Nodes[i]) require.NoError(t, err, "Error when upgrading node %d", i) time.Sleep(time.Second * 10) expect = expect + 5 From 68def440fa1aae6ea713ce57b783e5a0ad2cc95e Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:56:10 +0400 Subject: [PATCH 05/10] fix automation nightly upgrade tests --- .github/workflows/automation-nightly-tests.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index fe6ad39f740..7736184e66f 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -60,12 +60,24 @@ jobs: fail-fast: false matrix: tests: - - name: Upgrade + - name: Upgrade 2.0 suite: smoke - nodes: 11 + nodes: 1 os: ubuntu20.04-8cores-32GB network: SIMULATED - command: -run ^TestAutomationNodeUpgrade$ ./smoke + command: -run ^TestAutomationNodeUpgrade/registry2_0 ./smoke + - name: Upgrade 2.1 + suite: smoke + nodes: 5 + os: ubuntu20.04-8cores-32GB + network: SIMULATED + command: -run ^TestAutomationNodeUpgrade/registry2_1 ./smoke + - name: Upgrade 2.2 + suite: smoke + nodes: 5 + os: ubuntu20.04-8cores-32GB + network: SIMULATED + command: -run ^TestAutomationNodeUpgrade/registry2_2 ./smoke runs-on: ${{ matrix.tests.os }} name: Automation ${{ matrix.tests.name }} Test steps: From 69cfeb860b33efb27cd3e92c865c1dc6937874e5 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:54:22 +0400 Subject: [PATCH 06/10] fix automation nightly upgrade tests --- .github/workflows/automation-nightly-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 7736184e66f..196e9d73214 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -65,19 +65,19 @@ jobs: nodes: 1 os: ubuntu20.04-8cores-32GB network: SIMULATED - command: -run ^TestAutomationNodeUpgrade/registry2_0 ./smoke + command: -run ^TestAutomationNodeUpgrade/registry_2_0 ./smoke - name: Upgrade 2.1 suite: smoke nodes: 5 os: ubuntu20.04-8cores-32GB network: SIMULATED - command: -run ^TestAutomationNodeUpgrade/registry2_1 ./smoke + command: -run ^TestAutomationNodeUpgrade/registry_2_1 ./smoke - name: Upgrade 2.2 suite: smoke nodes: 5 os: ubuntu20.04-8cores-32GB network: SIMULATED - command: -run ^TestAutomationNodeUpgrade/registry2_2 ./smoke + command: -run ^TestAutomationNodeUpgrade/registry_2_2 ./smoke runs-on: ${{ matrix.tests.os }} name: Automation ${{ matrix.tests.name }} Test steps: From cb9e7b308ae0f705694af4fa7bae0a30c76c2648 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:06:53 +0400 Subject: [PATCH 07/10] fix chaos, reorg tests --- integration-tests/chaos/automation_chaos_test.go | 14 ++++++++++---- integration-tests/reorg/automation_reorg_test.go | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index 1d1fda451b3..f427b75f5a2 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -277,17 +277,23 @@ func TestAutomationChaos(t *testing.T) { actions.CreateOCRKeeperJobs(t, chainlinkNodes, registry.Address(), network.ChainID, 0, registryVersion) nodesWithoutBootstrap := chainlinkNodes[1:] + defaultOCRRegistryConfig.RegistryVersion = registryVersion ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 30*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) require.NoError(t, err, "Error building OCR config vars") err = registry.SetConfig(defaultOCRRegistryConfig, ocrConfig) require.NoError(t, err, "Registry config should be be set successfully") require.NoError(t, chainClient.WaitForEvents(), "Waiting for config to be set") - consumers_conditional, upkeepIDs_conditional := actions.DeployConsumers(t, registry, registrar, linkToken, contractDeployer, chainClient, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, false, false) - consumers_logtrigger, upkeepIDs_logtrigger := actions.DeployConsumers(t, registry, registrar, linkToken, contractDeployer, chainClient, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, true, false) + consumersConditional, upkeepidsConditional := actions.DeployConsumers(t, registry, registrar, linkToken, contractDeployer, chainClient, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, false, false) + consumersLogtrigger, upkeepidsLogtrigger := actions.DeployConsumers(t, registry, registrar, linkToken, contractDeployer, chainClient, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, true, false) - consumers := append(consumers_conditional, consumers_logtrigger...) - upkeepIDs := append(upkeepIDs_conditional, upkeepIDs_logtrigger...) + consumers := append(consumersConditional, consumersLogtrigger...) + upkeepIDs := append(upkeepidsConditional, upkeepidsLogtrigger...) + + for _, c := range consumersLogtrigger { + err = c.Start() + require.NoError(t, err, "Error starting consumer") + } l.Info().Msg("Waiting for all upkeeps to be performed") diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index e889a1c6123..643101dfb92 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -214,6 +214,7 @@ func TestAutomationReorg(t *testing.T) { actions.CreateOCRKeeperJobs(t, chainlinkNodes, registry.Address(), network.ChainID, 0, registryVersion) nodesWithoutBootstrap := chainlinkNodes[1:] + defaultOCRRegistryConfig.RegistryVersion = registryVersion ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 5*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) require.NoError(t, err, "OCR2 config should be built successfully") err = registry.SetConfig(defaultOCRRegistryConfig, ocrConfig) From 66b48125cc7b1b5751531642b19ac56b36dbca44 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:09:57 +0400 Subject: [PATCH 08/10] fix ondemand action --- .../workflows/automation-ondemand-tests.yml | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index 955b9884fa4..87952216d2c 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -140,13 +140,27 @@ jobs: pyroscope_env: ci-automation-on-demand-reorg network: SIMULATED_NONDEV command: -run ^TestAutomationReorg$ ./reorg - - name: upgrade + - name: upgrade 2.0 suite: smoke - nodes: 11 + nodes: 1 os: ubuntu20.04-8cores-32GB pyroscope_env: ci-automation-on-demand-upgrade network: SIMULATED - command: -run ^TestAutomationNodeUpgrade$ ./smoke + command: -run ^TestAutomationNodeUpgrade/registry_2_0 ./smoke + - name: upgrade 2.1 + suite: smoke + nodes: 1 + os: ubuntu20.04-8cores-32GB + pyroscope_env: ci-automation-on-demand-upgrade + network: SIMULATED + command: -run ^TestAutomationNodeUpgrade/registry_2_1 ./smoke + - name: upgrade 2.2 + suite: smoke + nodes: 1 + os: ubuntu20.04-8cores-32GB + pyroscope_env: ci-automation-on-demand-upgrade + network: SIMULATED + command: -run ^TestAutomationNodeUpgrade/registry_2_2 ./smoke runs-on: ${{ matrix.tests.os }} name: Automation On Demand ${{ matrix.tests.name }} Test steps: From 6019444ef62656be366a0f9c495c7be3560e50a4 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:24:50 +0400 Subject: [PATCH 09/10] fix nightly action --- .github/workflows/automation-nightly-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 196e9d73214..3696afb9438 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -196,7 +196,7 @@ jobs: strategy: fail-fast: false matrix: - name: [ Upgrade ] + name: [ Upgrade 2.0, Upgrade 2.1, Upgrade 2.2 steps: - name: Get Results id: test-results From daec56d27cac7aede3ded113e3499ec04d48b414 Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:26:10 +0400 Subject: [PATCH 10/10] fix nightly action --- .github/workflows/automation-nightly-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 3696afb9438..81d9606ef17 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -196,7 +196,7 @@ jobs: strategy: fail-fast: false matrix: - name: [ Upgrade 2.0, Upgrade 2.1, Upgrade 2.2 + name: [ Upgrade 2.0, Upgrade 2.1, Upgrade 2.2 ] steps: - name: Get Results id: test-results