diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 6df574e58d0..81d9606ef17 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -54,18 +54,30 @@ 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 matrix: tests: - - name: Upgrade + - name: Upgrade 2.0 suite: smoke - nodes: 6 + nodes: 1 os: ubuntu20.04-8cores-32GB network: SIMULATED - command: -run ^TestAutomationNodeUpgrade$ ./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/registry_2_1 ./smoke + - name: Upgrade 2.2 + suite: smoke + nodes: 5 + os: ubuntu20.04-8cores-32GB + network: SIMULATED + command: -run ^TestAutomationNodeUpgrade/registry_2_2 ./smoke runs-on: ${{ matrix.tests.os }} name: Automation ${{ matrix.tests.name }} Test steps: @@ -184,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 diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index ed528d2490c..87952216d2c 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -121,32 +121,46 @@ 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: 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 + - name: upgrade 2.0 + suite: smoke + nodes: 1 + os: ubuntu20.04-8cores-32GB + pyroscope_env: ci-automation-on-demand-upgrade + network: SIMULATED + command: -run ^TestAutomationNodeUpgrade/registry_2_0 ./smoke + - name: upgrade 2.1 suite: smoke - nodes: 6 + 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$ ./smoke + command: -run ^TestAutomationNodeUpgrade/registry_2_2 ./smoke runs-on: ${{ matrix.tests.os }} name: Automation On Demand ${{ matrix.tests.name }} Test steps: 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) 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