diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index 9656dc7fe4a..9e2609474b3 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -678,7 +678,7 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu-latest workflows: - - Run PR E2E Tests + - Run PR E2E Tests 2 - Run Nightly E2E Tests test_cmd: cd integration-tests/ && go test smoke/vrf_test.go -timeout 30m -count=1 -test.parallel=2 -json pyroscope_env: ci-smoke-vrf-evm-simulated @@ -688,7 +688,7 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu-latest workflows: - - Run PR E2E Tests + - Run PR E2E Tests 2 - Run Nightly E2E Tests test_cmd: cd integration-tests/ && go test smoke/vrfv2_test.go -timeout 30m -count=1 -test.parallel=6 -json pyroscope_env: ci-smoke-vrf2-evm-simulated @@ -698,7 +698,7 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu-latest workflows: - - Run PR E2E Tests + - Run PR E2E Tests 2 - Run Nightly E2E Tests test_cmd: cd integration-tests/ && go test smoke/vrfv2plus_test.go -timeout 30m -count=1 -test.parallel=9 -json pyroscope_env: ci-smoke-vrf2plus-evm-simulated @@ -826,7 +826,7 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu-latest workflows: - - Run PR E2E Tests + - Run PR E2E Tests 2 - Run Nightly E2E Tests test_cmd: cd integration-tests/ && go test smoke/reorg_above_finality_test.go -timeout 30m -count=1 -json pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated @@ -836,13 +836,14 @@ runner-test-matrix: test_env_type: docker runs_on: ubuntu-latest workflows: - - Run PR E2E Tests + - Run PR E2E Tests 2 - Run Nightly E2E Tests test_cmd: cd integration-tests/migration && go test upgrade_version_test.go -timeout 30m -count=1 -test.parallel=2 -json test_inputs: chainlink_image: public.ecr.aws/chainlink/chainlink chainlink_version: '{{ env.LATEST_CHAINLINK_RELEASE_VERSION }}' chainlink_upgrade_image: '{{ env.QA_CHAINLINK_IMAGE }}' - chainlink_upgrade_version: develop + # Chainlink upgrade version, github.sha by default + chainlink_upgrade_version: # END: Other tests diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 36855b5f458..13b786783a8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -530,6 +530,7 @@ jobs: uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml with: chainlink_version: ${{ inputs.evm-ref || github.sha }} + chainlink_upgrade_version: ${{ github.sha }} test_workflow: Run PR E2E Tests 2 # slack_notification_after_tests: true # slack_notification_after_tests_channel_id: "#team-test-tooling-internal" @@ -928,118 +929,118 @@ jobs: # cache_restore_only: "false" ### Migration tests - node-migration-tests: - name: Version Migration Tests - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - runs-on: ubuntu-latest - needs: [build-chainlink, changes] - # Only run migration tests on new tags - if: startsWith(github.ref, 'refs/tags/') - env: - SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2 - CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - CHAINLINK_IMAGE: public.ecr.aws/chainlink/chainlink - UPGRADE_VERSION: ${{ inputs.evm-ref || github.sha }} - UPGRADE_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - TEST_LOG_LEVEL: debug - TEST_SUITE: migration - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-migration-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Version Migration Tests - test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/chainlink - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Get Latest Version - id: get_latest_version - run: | - untrimmed_ver=$(curl --header "Authorization: token ${{ secrets.GITHUB_TOKEN }}" --request GET https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .name) - latest_version="${untrimmed_ver:1}" - # Check if latest_version is empty - if [ -z "$latest_version" ]; then - echo "Error: The latest_version is empty. The migration tests need a verison to run." - exit 1 - fi - echo "latest_version=${latest_version}" >> "$GITHUB_OUTPUT" - - name: Name Versions - run: | - echo "Running migration tests from version '${{ steps.get_latest_version.outputs.latest_version }}' to: '${{ inputs.evm-ref || github.sha }}'" - - name: Prepare Base64 TOML override - uses: ./.github/actions/setup-create-base64-upgrade-config - with: - selectedNetworks: ${{ env.SELECTED_NETWORKS }} - chainlinkVersion: ${{ steps.get_latest_version.outputs.latest_version }} - upgradeVersion: ${{ env.UPGRADE_VERSION }} - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Migration Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 - with: - test_command_to_run: cd ./integration-tests && go test -timeout 20m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs - test_download_vendor_packages_command: cd ./integration-tests && go mod download - test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} - cl_repo: ${{ env.CHAINLINK_IMAGE }} - cl_image_tag: ${{ steps.get_latest_version.outputs.latest_version }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - artifacts_name: node-migration-test-artifacts - artifacts_location: | - ./integration-tests/migration/logs - ./integration-tests/migration/db_dumps - ./integration-tests/migration/seth_artifacts - /tmp/gotest.log - publish_check_name: Node Migration Test Results - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: "" - go_coverage_src_dir: /var/tmp/go-coverage - go_coverage_dest_dir: ${{ github.workspace }}/.covdata - should_tidy: "false" - DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} - DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ env.UPGRADE_IMAGE }} - DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + # node-migration-tests: + # name: Version Migration Tests + # environment: integration + # permissions: + # checks: write + # pull-requests: write + # id-token: write + # contents: read + # runs-on: ubuntu-latest + # needs: [build-chainlink, changes] + # # Only run migration tests on new tags + # if: startsWith(github.ref, 'refs/tags/') + # env: + # SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2 + # CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} + # CHAINLINK_ENV_USER: ${{ github.actor }} + # CHAINLINK_IMAGE: public.ecr.aws/chainlink/chainlink + # UPGRADE_VERSION: ${{ inputs.evm-ref || github.sha }} + # UPGRADE_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + # TEST_LOG_LEVEL: debug + # TEST_SUITE: migration + # steps: + # - name: Collect Metrics + # id: collect-gha-metrics + # uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + # with: + # id: ${{ env.COLLECTION_ID }}-migration-tests + # org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + # basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + # hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + # this-job-name: Version Migration Tests + # test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' + # continue-on-error: true + # - name: Checkout the repo + # uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + # with: + # repository: smartcontractkit/chainlink + # ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + # - name: Get Latest Version + # id: get_latest_version + # run: | + # untrimmed_ver=$(curl --header "Authorization: token ${{ secrets.GITHUB_TOKEN }}" --request GET https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .name) + # latest_version="${untrimmed_ver:1}" + # # Check if latest_version is empty + # if [ -z "$latest_version" ]; then + # echo "Error: The latest_version is empty. The migration tests need a verison to run." + # exit 1 + # fi + # echo "latest_version=${latest_version}" >> "$GITHUB_OUTPUT" + # - name: Name Versions + # run: | + # echo "Running migration tests from version '${{ steps.get_latest_version.outputs.latest_version }}' to: '${{ inputs.evm-ref || github.sha }}'" + # - name: Prepare Base64 TOML override + # uses: ./.github/actions/setup-create-base64-upgrade-config + # with: + # selectedNetworks: ${{ env.SELECTED_NETWORKS }} + # chainlinkVersion: ${{ steps.get_latest_version.outputs.latest_version }} + # upgradeVersion: ${{ env.UPGRADE_VERSION }} + # runId: ${{ github.run_id }} + # testLogCollect: ${{ vars.TEST_LOG_COLLECT }} + # logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + # - name: Run Migration Tests + # uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 + # with: + # test_command_to_run: cd ./integration-tests && go test -timeout 20m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs + # test_download_vendor_packages_command: cd ./integration-tests && go mod download + # test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} + # cl_repo: ${{ env.CHAINLINK_IMAGE }} + # cl_image_tag: ${{ steps.get_latest_version.outputs.latest_version }} + # aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + # artifacts_name: node-migration-test-artifacts + # artifacts_location: | + # ./integration-tests/migration/logs + # ./integration-tests/migration/db_dumps + # ./integration-tests/migration/seth_artifacts + # /tmp/gotest.log + # publish_check_name: Node Migration Test Results + # token: ${{ secrets.GITHUB_TOKEN }} + # go_mod_path: ./integration-tests/go.mod + # cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} + # cache_restore_only: "true" + # QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + # QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + # QA_KUBECONFIG: "" + # go_coverage_src_dir: /var/tmp/go-coverage + # go_coverage_dest_dir: ${{ github.workspace }}/.covdata + # should_tidy: "false" + # DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + # DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ env.UPGRADE_IMAGE }} + # DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + # DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + # DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + # DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + # DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + # DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - - name: Upload Coverage Data - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - timeout-minutes: 2 - continue-on-error: true - with: - name: cl-node-coverage-data-migration-tests - path: .covdata - retention-days: 1 - - name: Notify Slack - if: failure() && github.event_name != 'workflow_dispatch' - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - env: - SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} - with: - channel-id: "#team-test-tooling-internal" - slack-message: ":x: :mild-panic-intensifies: Node Migration Tests Failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\n${{ format('Notifying ', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE) }}" + # - name: Upload Coverage Data + # uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + # timeout-minutes: 2 + # continue-on-error: true + # with: + # name: cl-node-coverage-data-migration-tests + # path: .covdata + # retention-days: 1 + # - name: Notify Slack + # if: failure() && github.event_name != 'workflow_dispatch' + # uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 + # env: + # SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + # with: + # channel-id: "#team-test-tooling-internal" + # slack-message: ":x: :mild-panic-intensifies: Node Migration Tests Failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}\n${{ format('Notifying ', secrets.GUARDIAN_SLACK_NOTIFICATION_HANDLE) }}" ## Solana Section get_solana_sha: diff --git a/.github/workflows/run-e2e-tests-reusable-workflow.yml b/.github/workflows/run-e2e-tests-reusable-workflow.yml index 38a4d714b06..393b0b544b1 100644 --- a/.github/workflows/run-e2e-tests-reusable-workflow.yml +++ b/.github/workflows/run-e2e-tests-reusable-workflow.yml @@ -8,6 +8,10 @@ on: description: 'Enter Chainlink version to use for the tests. Example: "v2.10.0" or sha' required: false type: string + chainlink_upgrade_version: + description: 'Enter Chainlink version to upgrade to for upgrade tests. Example: "v2.10.0" or sha' + required: false + type: string test_ids: description: 'Run tests by test ids separated by commas. Example: "run_all_in_ocr_tests_go,run_TestOCRv2Request_in_ocr2_test_go". Check all test IDs in .github/e2e-tests.yml' required: false @@ -425,7 +429,7 @@ jobs: # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 # test_config_override_base64: ${{ inputs.test_config_override_base64 }} test_config_chainlink_version: ${{ matrix.tests.test_inputs.chainlink_version || inputs.chainlink_version || github.sha }} - test_config_chainlink_upgrade_version: ${{ matrix.tests.test_inputs.chainlink_upgrade_version }} + test_config_chainlink_upgrade_version: ${{ matrix.tests.test_inputs.chainlink_upgrade_version || inputs.chainlink_upgrade_version || github.sha }} test_config_chainlink_postgres_version: ${{ matrix.tests.test_inputs.chainlink_postgres_version }} test_config_selected_networks: ${{ matrix.tests.test_inputs.selected_networks || env.SELECTED_NETWORKS}} test_config_logging_run_id: ${{ github.run_id }}