From 35b0f004802784253dfbed9a56ea5764149e13e7 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Tue, 22 Oct 2024 23:53:52 +0530 Subject: [PATCH 1/4] Resolve conflicts --- .github/workflows/ccip-chaos-tests.yml | 255 -------------------- .github/workflows/ccip-load-tests.yml | 322 ++----------------------- 2 files changed, 14 insertions(+), 563 deletions(-) diff --git a/.github/workflows/ccip-chaos-tests.yml b/.github/workflows/ccip-chaos-tests.yml index 7c8e718128..6e36e14ef0 100644 --- a/.github/workflows/ccip-chaos-tests.yml +++ b/.github/workflows/ccip-chaos-tests.yml @@ -3,268 +3,14 @@ on: workflow_run: workflows: [ CCIP Load Test ] types: [ completed ] -<<<<<<< HEAD branches: [ ccip-develop ] workflow_dispatch: - - -======= - branches: [ develop ] - workflow_dispatch: - ->>>>>>> v2.17.0 # Only run 1 of this workflow at a time per PR concurrency: group: chaos-ccip-tests-chainlink-${{ github.ref }} cancel-in-progress: true -<<<<<<< HEAD -env: - CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-ccip-tests:${{ github.sha }} - MOD_CACHE_VERSION: 1 - -jobs: - build-chainlink: - environment: integration - permissions: - id-token: write - contents: read - name: Build Chainlink Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Check if image exists - id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - repository: chainlink - tag: ${{ github.sha }} - AWS_REGION: ${{ secrets.QA_AWS_REGION }} - AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Build Image - if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - env: - GH_TOKEN: ${{ github.token }} - with: - cl_repo: smartcontractkit/chainlink-ccip - cl_ref: ${{ github.sha }} - push_tag: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink:${{ github.sha }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests-build-chainlink-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Chainlink Image - continue-on-error: true - - build-test-image: - environment: integration - permissions: - id-token: write - contents: read - name: Build Test Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Test Image - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Build Test Image - uses: ./.github/actions/build-test-image - with: - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - - ccip-chaos-tests: - environment: integration - permissions: - issues: read - checks: write - pull-requests: write - id-token: write - contents: read - name: CCIP Chaos Tests - runs-on: ubuntu-latest - needs: [ build-chainlink, build-test-image ] - env: - TEST_SUITE: chaos - TEST_ARGS: -test.timeout 30m - CHAINLINK_COMMIT_SHA: ${{ github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_TRIGGERED_BY: ccip-cron-chaos-eth - TEST_LOG_LEVEL: debug - DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable - GH_TOKEN: ${{ github.token }} - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: CCIP Chaos 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 - - name: Prepare Base64 TOML override for CCIP secrets - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - chainlinkVersion: ${{ github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Chaos Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d38226be720c5ccc1ff4d3cee40608ebf264cd59 # v2.3.26 - env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - with: - test_command_to_run: cd ./integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 -run 'TestChaosCCIP' ./chaos 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci - test_download_vendor_packages_command: make gomod - artifacts_location: ./integration-tests/chaos/logs - publish_check_name: CCIP Chaos Test Results - publish_report_paths: ./tests-chaos-report.xml - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - CGO_ENABLED: "1" - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - cache_key_id: ccip-load-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - DEFAULT_LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: ${{ secrets.LOKI_URL }} - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - DEFAULT_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - DEFAULT_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - - ## Notify in slack if the job fails - - 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: "#ccip-testing" - slack-message: ":x: :mild-panic-intensifies: CCIP chaos tests failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}" - ## Run Cleanup if the job succeeds - - name: cleanup - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/cleanup@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - - ccip-chaos-with-load-tests: - environment: integration - permissions: - issues: read - checks: write - pull-requests: write - id-token: write - contents: read - name: CCIP Load With Chaos Tests - if: false # Disabled until CCIP-2555 is resolved - runs-on: ubuntu-latest - needs: [ build-chainlink, build-test-image ] - env: - TEST_SUITE: load - TEST_ARGS: -test.timeout 1h - CHAINLINK_COMMIT_SHA: ${{ github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_TRIGGERED_BY: ccip-cron-chaos-and-load-eth - TEST_LOG_LEVEL: debug - DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable - GH_TOKEN: ${{ github.token }} - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-chaos-tests-with-load-test - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: CCIP load with chaos test - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Prepare Base64 TOML override for CCIP secrests - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - chainlinkVersion: ${{ github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Load With Chaos Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d38226be720c5ccc1ff4d3cee40608ebf264cd59 # v2.3.26 - env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - with: - test_command_to_run: cd ./integration-tests/ccip-tests && go test -timeout 2h -count=1 -json -test.parallel 4 -run '^TestLoadCCIPStableWithPodChaosDiffCommitAndExec' ./load 2>&1 | tee /tmp/gotest.log | gotestfmt - test_download_vendor_packages_command: make gomod - artifacts_location: ./integration-tests/load/logs - publish_check_name: CCIP Chaos With Load Test Results - publish_report_paths: ./tests-chaos-with-load-report.xml - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - CGO_ENABLED: "1" - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - cache_key_id: ccip-load-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - DEFAULT_LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }} - DEFAULT_LOKI_ENDPOINT: ${{ secrets.LOKI_URL }} - DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - DEFAULT_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - DEFAULT_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} - DEFAULT_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" - ## Notify in slack if the job fails - - 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: "#ccip-testing" - slack-message: ":x: :mild-panic-intensifies: CCIP chaos with load tests failed: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}" - ## Run Cleanup if the job succeeds - - name: cleanup - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/cleanup@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - triggered_by: ${{ env.TEST_TRIGGERED_BY }} -======= jobs: run-e2e-tests-workflow: name: Run E2E Tests @@ -297,4 +43,3 @@ jobs: AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} ->>>>>>> v2.17.0 diff --git a/.github/workflows/ccip-load-tests.yml b/.github/workflows/ccip-load-tests.yml index 25e0acc005..fdf6d01071 100644 --- a/.github/workflows/ccip-load-tests.yml +++ b/.github/workflows/ccip-load-tests.yml @@ -1,28 +1,12 @@ name: CCIP Load Test on: push: -<<<<<<< HEAD branches: - ccip-develop -======= - paths: - - '**/*ccip*' - - '**/*ccip*/**' - branches: - - develop ->>>>>>> v2.17.0 tags: - '*' workflow_dispatch: inputs: -<<<<<<< HEAD - base64_test_input: # base64 encoded toml for test input - description: 'Base64 encoded toml test input' - required: false - test_secrets_override_key: - description: 'Key to run tests with custom test secrets' - required: false -======= test_config_override_path: description: Path to a test config file used to override the default test config required: false @@ -34,7 +18,6 @@ on: chainlink_version: description: Chainlink image version to use. Commit sha if not provided required: false ->>>>>>> v2.17.0 type: string # Only run 1 of this workflow at a time per PR @@ -42,296 +25,6 @@ concurrency: group: load-ccip-tests-chainlink-${{ github.ref }} cancel-in-progress: true -<<<<<<< HEAD -env: - CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - CHAINLINK_VERSION: ${{ github.sha}} - INPUT_CHAINLINK_TEST_VERSION: ${{ github.sha}} - ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-ccip-tests:${{ github.sha }} - INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com - AWS_ECR_REPO_PUBLIC_REGISTRY: public.ecr.aws - MOD_CACHE_VERSION: 1 - E2E_TEST_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - E2E_TEST_LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }} - E2E_TEST_LOKI_ENDPOINT: ${{ secrets.LOKI_URL }} - E2E_TEST_LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} - E2E_TEST_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} - # Default private key test secret loaded from Github Secret as only security team has access to it. - # this key secrets.QA_SHARED_803C_KEY has a story behind it. To know more, see CCIP-2875 and SECHD-16575 tickets. - E2E_TEST_ETHEREUM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_ARBITRUM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_BASE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_WEMIX_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_AVALANCHE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_ZKSYNC_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_MODE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_METIS_ANDROMEDA_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_OPTIMISM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_KROMA_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_GNOSIS_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_POLYGON_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - E2E_TEST_BSC_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} - -jobs: - build-chainlink: - environment: integration - permissions: - id-token: write - contents: read - name: Build Chainlink Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Check if image exists - id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - with: - repository: chainlink - tag: ${{ env.CHAINLINK_VERSION }} - AWS_REGION: ${{ secrets.QA_AWS_REGION }} - AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Build Image - if: steps.check-image.outputs.exists == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17 - env: - GH_TOKEN: ${{ github.token }} - with: - cl_repo: smartcontractkit/chainlink-ccip - cl_ref: ${{ env.CHAINLINK_VERSION }} - push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ env.CHAINLINK_VERSION }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-load-test-build-chainlink-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Chainlink Image - continue-on-error: true - - build-test-image: - environment: integration - permissions: - id-token: write - contents: read - name: Build Test Image - runs-on: ubuntu20.04-16cores-64GB - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-load-test-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Test Image - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Build Test Image - uses: ./.github/actions/build-test-image - with: - tag: ${{ env.INPUT_CHAINLINK_TEST_VERSION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - - ccip-load-test: - environment: integration - needs: [ build-chainlink, build-test-image ] - if: ${{ always() && !contains(needs.*.result, 'failure') }} - permissions: - issues: read - checks: write - pull-requests: write - id-token: write - contents: read - env: - CHAINLINK_ENV_USER: ${{ github.actor }} - SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} - SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }} - TEST_LOG_LEVEL: info - REF_NAME: ${{ github.head_ref || github.ref_name }} - strategy: - fail-fast: false - matrix: - type: - - name: stable-load - run: ^TestLoadCCIPStableRPS$ - os: ubuntu-latest - - name: load-with-arm-curse-uncurse - run: ^TestLoadCCIPStableRPSAfterARMCurseAndUncurse$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/load-with-arm-curse-uncurse.toml - os: ubuntu-latest - runs-on: ${{ matrix.type.os }} - name: CCIP ${{ matrix.type.name }} - steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 - with: - id: ccip-load-test-${{ matrix.type.name }} - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: CCIP ${{ matrix.type.name }} - 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: - ref: ${{ env.REF_NAME }} - - name: Sets env vars - id: set_override_config - shell: bash - run: | - # if the matrix.type.config_path is set, use it as the override config - if [ -n "${{ matrix.type.config_path }}" ]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ${{ matrix.type.config_path }}) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT - fi - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH) - echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE - echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT - fi - - name: step summary - shell: bash - run: | - echo "### chainlink image used for this test run :link:" >>$GITHUB_STEP_SUMMARY - echo "\`${{ env.CHAINLINK_VERSION }}\`" >> $GITHUB_STEP_SUMMARY - echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY - echo "\`${{ env.INPUT_CHAINLINK_TEST_VERSION }}\`" >> $GITHUB_STEP_SUMMARY - - name: Prepare Base64 TOML override for CCIP secrets - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - chainlinkVersion: ${{ github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32 - env: - TEST_SUITE: load - TEST_ARGS: -test.timeout 900h - DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable - RR_MEM: 8Gi - RR_CPU: 4 - TEST_TRIGGERED_BY: ccip-load-test-ci-${{ matrix.type.name }} - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }} - E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests" - with: - test_command_to_run: cd ./integration-tests/ccip-tests && go test -v -timeout 70m -count=1 -json -run ${{ matrix.type.run }} ./load 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci - test_download_vendor_packages_command: cd ./integration-tests && go mod download - # Load default test secrets - test_secrets_defaults_base64: ${{ secrets.CCIP_DEFAULT_TEST_SECRETS }} - # Override default test secrets with custom test secrets if provided - test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} - token: ${{ secrets.GITHUB_TOKEN }} - go_mod_path: ./integration-tests/go.mod - QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} - QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} - triggered_by: ${{ env.TEST_TRIGGERED_BY }} - publish_check_name: ${{ matrix.type.name }} - artifacts_location: ./integration-tests/load/logs/payload_ccip.json - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - cache_key_id: ccip-load-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "true" - should_cleanup: "true" - - # Reporting Jobs - start-slack-thread: - name: Start Slack Thread - if: ${{ failure() && needs.ccip-load-test.result != 'skipped' && needs.ccip-load-test.result != 'cancelled' }} - environment: integration - outputs: - thread_ts: ${{ steps.slack.outputs.thread_ts }} - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - runs-on: ubuntu-latest - needs: [ccip-load-test] - steps: - - name: Debug Result - run: echo ${{ join(needs.*.result, ',') }} - - name: Main Slack Notification - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - id: slack - with: - channel-id: "#ccip-testing" - payload: | - { - "attachments": [ - { - "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}", - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "CCIP load tests results ${{ contains(join(needs.*.result, ','), 'failure') && ':x:' || ':white_check_mark:'}}", - "emoji": true - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "<${{ github.server_url }}/${{ github.repository }}/${{contains(github.ref_name, 'release') && 'releases/tag' || 'tree'}}/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>" - } - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} - - post-test-results-to-slack: - name: Post Test Results - if: ${{ failure() && needs.start-slack-thread.result != 'skipped' && needs.start-slack-thread.result != 'cancelled' }} - environment: integration - permissions: - checks: write - pull-requests: write - id-token: write - contents: read - runs-on: ubuntu-latest - needs: start-slack-thread - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Post Test Results - uses: ./.github/actions/notify-slack-jobs-result - with: - github_token: ${{ github.token }} - github_repository: ${{ github.repository }} - workflow_run_id: ${{ github.run_id }} - github_job_name_regex: ^CCIP (.*)$ - message_title: CCIP Jobs - slack_channel_id: "#ccip-testing" - slack_bot_token: ${{ secrets.QA_SLACK_API_KEY }} - slack_thread_ts: ${{ needs.start-slack-thread.outputs.thread_ts }} - - # End Reporting Jobs -======= jobs: run-e2e-tests-workflow: name: Run E2E Tests @@ -366,4 +59,17 @@ jobs: TEST_SECRETS_OVERRIDE_BASE64: ${{ secrets[inputs.test_secrets_override_key] }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} ->>>>>>> v2.17.0 + E2E_TEST_ETHEREUM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_ARBITRUM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_BASE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_WEMIX_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_AVALANCHE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_ZKSYNC_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_MODE_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_METIS_ANDROMEDA_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_OPTIMISM_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_KROMA_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_GNOSIS_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_POLYGON_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + E2E_TEST_BSC_MAINNET_WALLET_KEY: ${{ secrets.QA_SHARED_803C_KEY }} + From 77132545694c21df93df9961d4560e0bb97a97ee Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 23 Oct 2024 00:43:44 +0530 Subject: [PATCH 2/4] resolve more conflicts --- .github/workflows/integration-tests.yml | 629 ------------------ .../ccip-tests/actions/ccip_helpers.go | 86 +-- .../ccip-tests/testconfig/ccip.go | 61 -- .../ccip-tests/testconfig/global.go | 22 +- .../ccip-tests/testsetups/ccip.go | 16 - .../ccip-tests/testsetups/test_env.go | 55 +- 6 files changed, 3 insertions(+), 866 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 37b0898e75..66201feafa 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -228,288 +228,14 @@ jobs: AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} dep_evm_sha: ${{ inputs.evm-ref }} -<<<<<<< HEAD - build-test-image: - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || contains(join(github.event.pull_request.labels.*.name, ' '), 'build-test-image') - environment: integration - permissions: - id-token: write - contents: read - name: Build Test Image - runs-on: ubuntu22.04-16cores-64GB - needs: [changes] - steps: - - name: Collect Metrics - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-build-test-image - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Build Test Image - continue-on-error: true - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - with: - repository: smartcontractkit/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Build Go Test Command - id: build-go-test-command - run: | - # if the matrix.product.run is set, use it for a different command - if [ "${{ matrix.product.run }}" != "" ]; then - echo "run_command=${{ matrix.product.run }} ./smoke/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT" - else - echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" - fi - - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 - id: setup-gap - with: - # aws inputs - aws-region: ${{ secrets.AWS_REGION }} - aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} - api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} - # other inputs - duplicate-authorization-header: "true" - - eth-smoke-tests-matrix: - if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} - environment: integration -======= run-core-e2e-tests-for-pr: name: Run Core E2E Tests For PR ->>>>>>> v2.17.0 permissions: actions: read checks: write pull-requests: write id-token: write contents: read -<<<<<<< HEAD - needs: [build-chainlink, changes, build-lint-integration-tests] - env: - SELECTED_NETWORKS: SIMULATED - CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} - CHAINLINK_ENV_USER: ${{ github.actor }} - TEST_LOG_LEVEL: debug - strategy: - fail-fast: false - matrix: - product: -# LM Smoke Test is disabled since project is paused -# - name: ccip-lm-smoke -# nodes: 1 -# os: ubuntu-latest -# file: lm -# dir: ccip-tests/smoke -# run: -run ^TestLmBasic$ - - name: ccip-smoke - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - - name: ccip-smoke-1.4-pools - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/contract-version1.4.toml - - name: ccip-smoke-usdc - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/usdc_mock_deployment.toml - - name: ccip-smoke-db-compatibility - nodes: 1 - os: ubuntu-latest - file: ccip - dir: ccip-tests/smoke - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/db-compatibility.toml - - name: ccip-smoke-rate-limit - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPRateLimit$ - - name: ccip-smoke-rate-limit - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPTokenPoolRateLimits$ - - name: ccip-smoke-multicall - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPMulticall$ - - name: ccip-smoke-manual-exec - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPManuallyExecuteAfterExecutionFailingDueToInsufficientGas$ - - name: ccip-smoke-on-ramp-limits - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPOnRampLimits$ - - name: ccip-smoke-off-ramp-capacity - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPOffRampCapacityLimit$ - - name: ccip-smoke-off-ramp-agg-rate-limit - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPOffRampAggRateLimit$ - - name: ccip-smoke-leader-lane - nodes: 15 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPForBidirectionalLane$ - config_path: ./integration-tests/ccip-tests/testconfig/tomls/leader-lane.toml - - name: ccip-smoke-reorg-bidirectional - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPReorgBelowFinality$ -v - config_path: ./integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - - name: ccip-smoke-reorg-below-finality - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPReorgAboveFinalityAtDestination$ -v - config_path: ./integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - - name: ccip-smoke-reorg-above-finality - nodes: 1 - dir: ccip-tests/smoke - os: ubuntu-latest - file: ccip - run: -run ^TestSmokeCCIPReorgAboveFinalityAtSource$ -v - config_path: ./integration-tests/ccip-tests/testconfig/tomls/ccip-reorg.toml - - name: runlog - id: runlog - nodes: 2 - os: ubuntu-latest - pyroscope_env: "ci-smoke-runlog-evm-simulated" - - name: cron - id: cron - nodes: 2 - os: ubuntu-latest - pyroscope_env: "ci-smoke-cron-evm-simulated" - - name: flux - id: flux - nodes: 1 - os: ubuntu-latest - pyroscope_env: "ci-smoke-flux-evm-simulated" - - name: ocr - id: ocr - nodes: 2 - os: ubuntu-latest - file: ocr - pyroscope_env: ci-smoke-ocr-evm-simulated - - name: reorg_above_finality - id: reorg_above_finality - nodes: 1 - os: ubuntu-latest - file: reorg_above_finality - pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated - - name: ocr2 - id: ocr2 - nodes: 6 - os: ubuntu22.04-16cores-64GB - file: ocr2 - pyroscope_env: ci-smoke-ocr2-evm-simulated - - name: ocr2 - id: ocr2-plugins - nodes: 6 - os: ubuntu22.04-16cores-64GB - pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated - tag_suffix: "-plugins" - - name: vrf - id: vrf - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf-evm-simulated - - name: vrfv2 - id: vrfv2 - nodes: 6 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf2-evm-simulated - - name: vrfv2plus - id: vrfv2plus - nodes: 9 - os: ubuntu-latest - pyroscope_env: ci-smoke-vrf2plus-evm-simulated - - name: forwarder_ocr - id: forwarder_ocr - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - - name: forwarders_ocr2 - id: forwarders_ocr2 - nodes: 2 - os: ubuntu-latest - pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated - runs-on: ${{ matrix.product.os }} - name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} - steps: - # Handy for debugging resource usage - # - name: Collect Workflow Telemetry - # uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 - - name: Collect Metrics - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: ${{ env.COLLECTION_ID }}-matrix-${{ matrix.product.id }} - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }} - 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/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Build Go Test Command - id: build-go-test-command - run: | - # if dir is provided use it, otherwise use the smoke dir - if [ "${{ matrix.product.dir }}" != "" ]; then - dir=${{ matrix.product.dir }} - else - dir=smoke - fi - # if the matrix.product.run is set, use it for a different command - if [ "${{ matrix.product.run }}" != "" ]; then - echo "run_command=${{ matrix.product.run }} ./${dir}/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT" - else - echo "run_command=./${dir}/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" - fi - - name: Check for "enable tracing" label - id: check-label - run: | - label=$(jq -r '.pull_request.labels[]?.name // empty' "$GITHUB_EVENT_PATH") -======= needs: [build-chainlink, changes] if: github.event_name == 'pull_request' && ( needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@aad83f232743646faa35f5ac03ee3829148d37ce @@ -541,7 +267,6 @@ jobs: AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} ->>>>>>> v2.17.0 run-core-e2e-tests-for-merge-queue: name: Run Core E2E Tests For Merge Queue @@ -667,191 +392,9 @@ jobs: AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} -<<<<<<< HEAD - - name: Setup Grafana and OpenTelemetry - id: docker-setup - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - # Create network - docker network create --driver bridge tracing - - # Make trace directory - cd integration-tests/smoke/ - mkdir ./traces - chmod -R 777 ./traces - - # Switch directory - cd ../../.github/tracing - - # Create a Docker volume for traces - # docker volume create otel-traces - - # Start OpenTelemetry Collector - # Note the user must be set to the same user as the runner for the trace data to be accessible - docker run -d --network=tracing --name=otel-collector \ - -v $PWD/otel-collector-ci.yaml:/etc/otel-collector.yaml \ - -v $PWD/../../integration-tests/smoke/traces:/tracing \ - --user "$(id -u):$(id -g)" \ - -p 4317:4317 otel/opentelemetry-collector:0.88.0 --config=/etc/otel-collector.yaml - - - name: Locate Docker Volume - id: locate-volume - if: false - run: | - echo "VOLUME_PATH=$(docker volume inspect --format '{{ .Mountpoint }}' otel-traces)" >> $GITHUB_OUTPUT - - - name: Show Otel-Collector Logs - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - docker logs otel-collector - - name: Set Override Config - id: set_override_config - run: | - # if the matrix.product.config_path is set, use it as the override config - if [ "${{ matrix.product.config_path }}" != "" ]; then - echo "base_64_override=$(base64 -w 0 -i ${{ matrix.product.config_path }})" >> "$GITHUB_OUTPUT" - fi - - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 - id: setup-gap - with: - # aws inputs - aws-region: ${{ secrets.AWS_REGION }} - aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} - api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} - # other inputs - duplicate-authorization-header: "true" - # metrics inputs - metrics-job-name: "grafana" - gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} - gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - - name: Prepare Base64 CCIP TOML secrets - uses: ./.github/actions/setup-create-base64-config-ccip - id: setup_create_base64_config_ccip - with: - runId: ${{ github.run_id }} - pyroscopeServer: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 - pyroscopeEnvironment: ${{ matrix.product.pyroscope_env }} - pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }} - testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - selectedNetworks: SIMULATED_1,SIMULATED_2 - chainlinkVersion: ${{ inputs.evm-ref || github.sha }} - logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - - ## Run this step when changes that require tests to be run are made - - name: Run Tests - if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 - env: - BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} - TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }} - DEBUG_RESTY: false - with: - test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 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_chainlink_version: ${{ inputs.evm-ref || github.sha }} - test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} - test_config_logging_run_id: ${{ github.run_id }} - test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} - test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} - cl_repo: ${{ env.CHAINLINK_IMAGE }} - cl_image_tag: ${{ inputs.evm-ref || github.sha }}${{ matrix.product.tag_suffix }} - aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} - artifacts_name: ${{ matrix.product.name }}${{ matrix.product.tag_suffix }}-test-logs - artifacts_location: | - ./integration-tests/smoke/logs/ - ./integration-tests/ccip-tests/smoke/logs/* - /tmp/gotest.log - publish_check_name: ${{ matrix.product.name }} - 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: "" - should_tidy: "false" - go_coverage_src_dir: /var/tmp/go-coverage - go_coverage_dest_dir: ${{ github.workspace }}/.covdata - DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_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 }} - DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 - DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} - DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} - DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - - - 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-${{ matrix.product.name }}-${{ matrix.product.tag_suffix }} - path: .covdata - retention-days: 1 - - # Run this step when changes that do not need the test to run are made - - name: Run Setup - if: needs.changes.outputs.src == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_download_vendor_packages_command: cd ./integration-tests && go mod download - 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: "" - should_tidy: "false" - - - name: Show Otel-Collector Logs - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - docker logs otel-collector - - - name: Permissions on traces - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - run: | - ls -l ./integration-tests/smoke/traces - - - name: Upload Trace Data - if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - name: trace-data - path: ./integration-tests/smoke/traces/trace-data.json - - - name: Print failed test summary - if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_directories: ./integration-tests/smoke/,./integration-tests/ccip-tests/smoke/ - - ### Used to check the required checks box when the matrix completes - eth-smoke-tests: -======= check-e2e-test-results: ->>>>>>> v2.17.0 if: always() name: ETH Smoke Tests -<<<<<<< HEAD - needs: [eth-smoke-tests-matrix] - steps: - - name: Check smoke test matrix status - if: needs.eth-smoke-tests-matrix.result != 'success' - run: | - echo "${{ needs.eth-smoke-tests-matrix.result }}" - exit 1 - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 -======= runs-on: ubuntu-latest needs: [lint-integration-tests, run-core-e2e-tests-for-pr, run-ccip-e2e-tests-for-pr, run-core-e2e-tests-for-merge-queue, run-ccip-e2e-tests-for-merge-queue] steps: @@ -881,7 +424,6 @@ jobs: uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 env: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} ->>>>>>> v2.17.0 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) }}" @@ -948,18 +490,6 @@ jobs: pattern: cl_node_coverage_data_* merge-multiple: true - name: Show Coverage -<<<<<<< HEAD - run: go run ./integration-tests/scripts/show_coverage.go "${{ github.workspace }}/cl-node-coverage-data/*/merged" - - # Run the setup if the matrix finishes but this time save the cache if we have a cache hit miss - # this will also only run if both of the matrix jobs pass - eth-smoke-go-mod-cache: - environment: integration - needs: [eth-smoke-tests] - runs-on: ubuntu-latest - name: ETH Smoke Tests Go Mod Cache - continue-on-error: true -======= run: go run ./integration-tests/scripts/show_coverage.go "${{ github.workspace }}/cl_node_coverage_data/*/merged" ## Solana Section @@ -971,30 +501,10 @@ jobs: runs-on: ubuntu-latest outputs: sha: ${{ steps.getsha.outputs.sha }} ->>>>>>> v2.17.0 steps: - name: Checkout the repo uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: -<<<<<<< HEAD - repository: smartcontractkit/ccip - ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - - name: Run Setup - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 - with: - test_download_vendor_packages_command: | - cd ./integration-tests - go mod download - # force download of test dependencies - go test -run=NonExistentTest ./smoke/... || echo "ignore expected test failure" - go_mod_path: ./integration-tests/go.mod - cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }} - cache_restore_only: "false" - - ### Migration tests - node-migration-tests: - name: Version Migration Tests -======= repository: smartcontractkit/chainlink ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} - name: Setup Go @@ -1049,38 +559,12 @@ jobs: uses: smartcontractkit/chainlink-solana/.github/actions/projectserum_version@4b971869e26b79c7ce3fb7c98005cc2e3f350915 # stable action on Oct 12 2022 solana-test-image-exists: ->>>>>>> v2.17.0 environment: integration permissions: checks: write pull-requests: write id-token: write contents: read -<<<<<<< HEAD - 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/w0i8p0z9/chainlink-ccip - 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 -======= name: Check If Solana Test Image Exists runs-on: ubuntu-latest needs: [get_solana_sha] @@ -1218,73 +702,11 @@ jobs: basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} this-job-name: Solana Smoke Tests ->>>>>>> v2.17.0 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: -<<<<<<< HEAD - repository: smartcontractkit/ccip - 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 - # CCIP uses the `-release` suffix for their versions - echo "latest_version=${latest_version}-release" >> "$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-logs - artifacts_location: | - ./integration-tests/migration/logs - /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 }} - -======= repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Run Setup @@ -1368,62 +790,11 @@ jobs: E2E_TEST_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} E2E_TEST_SOLANA_SECRET: thisisatestingonlysecret ->>>>>>> v2.17.0 - name: Upload Coverage Data uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 timeout-minutes: 2 continue-on-error: true with: -<<<<<<< HEAD - 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: "C05QQ8Z342V" - slack-message: "CCIP Node Migration Tests Failed :x: \n${{ format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id) }}" - payload: | - { - "attachments": [ - { - "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || '#2E7D32' }}", - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "CCIP Version Migration Test Results ${{ contains(join(needs.*.result, ','), 'failure') && ':x:' || ':white_check_mark:'}}", - "emoji": true - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ contains(join(needs.*.result, ','), 'failure') && 'Some tests failed! Notifying ' || 'All Good!' }}" - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run>" - } - } - ] - } - ] - } -======= name: cl_node_coverage_data_solana_tests path: .covdata retention-days: 1 - ->>>>>>> v2.17.0 diff --git a/integration-tests/ccip-tests/actions/ccip_helpers.go b/integration-tests/ccip-tests/actions/ccip_helpers.go index fa5b473937..49d6ed3fd1 100644 --- a/integration-tests/ccip-tests/actions/ccip_helpers.go +++ b/integration-tests/ccip-tests/actions/ccip_helpers.go @@ -61,10 +61,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" -<<<<<<< HEAD "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipexec" -======= ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers" integrationtesthelpers "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers/integration" @@ -733,7 +730,6 @@ func (ccipModule *CCIPCommon) WriteLaneConfig(conf *laneconfig.LaneConfig) { for k, v := range ccipModule.PriceAggregators { priceAggrs[k.Hex()] = v.ContractAddress.Hex() } -<<<<<<< HEAD conf.CommonContracts.FeeToken = ccipModule.FeeToken.Address() conf.CommonContracts.BridgeTokens = btAddresses conf.CommonContracts.BridgeTokenPools = btpAddresses @@ -744,19 +740,6 @@ func (ccipModule *CCIPCommon) WriteLaneConfig(conf *laneconfig.LaneConfig) { conf.CommonContracts.WrappedNative = ccipModule.WrappedNative.Hex() conf.CommonContracts.Multicall = ccipModule.MulticallContract.Hex() -======= - conf.CommonContracts = laneconfig.CommonContracts{ - FeeToken: ccipModule.FeeToken.Address(), - BridgeTokens: btAddresses, - BridgeTokenPools: btpAddresses, - ARM: ccipModule.RMNContract.Hex(), - Router: ccipModule.Router.Address(), - PriceRegistry: ccipModule.PriceRegistry.Address(), - PriceAggregators: priceAggrs, - WrappedNative: ccipModule.WrappedNative.Hex(), - Multicall: ccipModule.MulticallContract.Hex(), - } ->>>>>>> v2.17.0 if ccipModule.TokenAdminRegistry != nil { conf.CommonContracts.TokenAdminRegistry = ccipModule.TokenAdminRegistry.Address() } @@ -1665,14 +1648,10 @@ func (sourceCCIP *SourceCCIPModule) IsRequestTriggeredWithinTimeframe(timeframe // IsPastRequestTriggeredWithinTimeframe determines the average block time and calculates the block numbers // within the specified timeframe. It then uses FilterCCIPSendRequested to identify the past events. -<<<<<<< HEAD func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe( ctx context.Context, timeframe *commonconfig.Duration, ) (*types.Log, error) { -======= -func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe(ctx context.Context, timeframe *commonconfig.Duration) (*time.Time, error) { ->>>>>>> v2.17.0 if timeframe == nil { return nil, nil } @@ -1699,7 +1678,6 @@ func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe(ctx co return nil, fmt.Errorf("error while filtering CCIP send requested starting block number: %d. Error: %w", filterFromBlock, err) } defer func() { -<<<<<<< HEAD iterErr := iterator.Close() if iterErr != nil { sourceCCIP.Common.Logger.Error().Err(iterErr).Msg("Error closing iterator") @@ -1715,19 +1693,6 @@ func (sourceCCIP *SourceCCIPModule) IsPastRequestTriggeredWithinTimeframe(ctx co } } return latestEvent, nil -======= - _ = iterator.Close() - }() - if iterator.Next() { - hdr, err := sourceCCIP.Common.ChainClient.HeaderByNumber(context.Background(), big.NewInt(int64(iterator.Event.Raw.BlockNumber))) - if err != nil { - return nil, fmt.Errorf("error getting header for block: %d, Error: %w", iterator.Event.Raw.BlockNumber, err) - } - return pointer.ToTime(hdr.Timestamp), nil - } - - return nil, nil ->>>>>>> v2.17.0 } func (sourceCCIP *SourceCCIPModule) AssertEventCCIPSendRequested( @@ -1851,11 +1816,7 @@ func (sourceCCIP *SourceCCIPModule) CCIPMsg( extraArgs, err = testhelpers.GetEVMExtraArgsV2(gasLimit, allowOutOfOrder) } if err != nil { -<<<<<<< HEAD - return router.ClientEVM2AnyMessage{}, fmt.Errorf("failed encoding the options field: %w", err) -======= return router.ClientEVM2AnyMessage{}, fmt.Errorf("failed getting extra args: %w", err) ->>>>>>> v2.17.0 } // form the message for transfer return router.ClientEVM2AnyMessage{ @@ -1868,14 +1829,10 @@ func (sourceCCIP *SourceCCIPModule) CCIPMsg( } // SendRequest sends a CCIP request to the source chain's router contract -<<<<<<< HEAD -func (sourceCCIP *SourceCCIPModule) SendRequest(receiver common.Address, gasLimit *big.Int) (common.Hash, time.Duration, *big.Int, error) { -======= func (sourceCCIP *SourceCCIPModule) SendRequest( receiver common.Address, gasLimit *big.Int, ) (common.Hash, time.Duration, *big.Int, error) { ->>>>>>> v2.17.0 var d time.Duration destChainSelector, err := chainselectors.SelectorFromChainId(sourceCCIP.DestinationChainId) if err != nil { @@ -2900,16 +2857,11 @@ func (lane *CCIPLane) AddToSentReqs(txHash common.Hash, reqStats []*testreporter func (lane *CCIPLane) Multicall(noOfRequests int, multiSendAddr common.Address) error { var ccipMultipleMsg []contracts.CCIPMsgData feeToken := common.HexToAddress(lane.Source.Common.FeeToken.Address()) -<<<<<<< HEAD - genericMsg, err := lane.Source.CCIPMsg(lane.Dest.ReceiverDapp.EthAddress, lane.Source.Common.AllowOutOfOrder, - big.NewInt(DefaultDestinationGasLimit)) -======= genericMsg, err := lane.Source.CCIPMsg( lane.Dest.ReceiverDapp.EthAddress, lane.Source.Common.AllowOutOfOrder, big.NewInt(DefaultDestinationGasLimit), ) ->>>>>>> v2.17.0 if err != nil { return fmt.Errorf("failed to form the ccip message: %w", err) } @@ -3258,11 +3210,7 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio reqStats = append(reqStats, req.RequestStat) } -<<<<<<< HEAD if (opts.phaseExpectedToFail == testreporters.CCIPSendRe || opts.expectAnyPhaseToFail) && opts.timeout != 0 { -======= - if opts.phaseExpectedToFail == testreporters.CCIPSendRe && opts.timeout != 0 { ->>>>>>> v2.17.0 timeout = opts.timeout } msgLogs, ccipSendReqGenAt, err := lane.Source.AssertEventCCIPSendRequested( @@ -3290,13 +3238,10 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio return fmt.Errorf("could not find request stat for seq number %d", seqNumber) } -<<<<<<< HEAD if opts.expectAnyPhaseToFail && opts.timeout != 0 { timeout = opts.timeout } -======= ->>>>>>> v2.17.0 if opts.phaseExpectedToFail == testreporters.Commit && opts.timeout != 0 { timeout = opts.timeout } @@ -3336,12 +3281,10 @@ func (lane *CCIPLane) ValidateRequestByTxHash(txHash common.Hash, opts validatio return phaseErr } } -<<<<<<< HEAD if opts.expectAnyPhaseToFail { return fmt.Errorf("expected at least any one phase to fail but no phase got failed") } -======= ->>>>>>> v2.17.0 + return nil } @@ -3661,15 +3604,9 @@ func (lane *CCIPLane) DeployNewCCIPLane( return fmt.Errorf("failed to create source module: %w", err) } -<<<<<<< HEAD - // If AllowOutOfOrder is set globally in test config, then assumption is to set it for every lane. - //However, if this is set as false, and set as true for specific chain in lane_configs then apply it - //only for a lane where source network is of that chain. -======= // If AllowOutOfOrder is set globally in test config, the assumption is to set it for every lane. // However, if this is set as false, and set as true for specific chain in lane_configs, then apply it // only for a lane where source network is of that chain. ->>>>>>> v2.17.0 if allowOutOfOrder { lane.Source.Common.AllowOutOfOrder = true } @@ -3924,7 +3861,6 @@ func SetOCR2Config( if len(execNodes) > 0 { nodes = execNodes } -<<<<<<< HEAD // Use out of order batching strategy if we expect to be sending out of order messages batchingStrategyID := ccipexec.BestEffortBatchingStrategyID @@ -3932,14 +3868,6 @@ func SetOCR2Config( batchingStrategyID = ccipexec.ZKOverflowBatchingStrategyID } if destCCIP.OffRamp != nil { -======= - if destCCIP.OffRamp != nil { - // Use out of order batching strategy if we expect to be sending out of order messages - batchingStrategyID := uint32(0) - if pointer.GetBool(testConf.AllowOutOfOrder) { - batchingStrategyID = uint32(1) - } ->>>>>>> v2.17.0 execOffchainCfg, err := contracts.NewExecOffchainConfig( 1, BatchGasLimit, @@ -4201,10 +4129,7 @@ func (c *CCIPTestEnv) ConnectToExistingNodes(envConfig *testconfig.Common) error if err != nil { return fmt.Errorf("failed to create chainlink client: %w for node %d config %v", err, i+1, cfg) } -<<<<<<< HEAD clClient.ChainlinkClient.WithRetryCount(3) -======= ->>>>>>> v2.17.0 c.CLNodes = append(c.CLNodes, clClient) c.nodeMutexes = append(c.nodeMutexes, &sync.Mutex{}) } @@ -4218,11 +4143,7 @@ func (c *CCIPTestEnv) ConnectToDeployedNodes() error { for _, chainlinkNode := range c.LocalCluster.ClCluster.Nodes { c.nodeMutexes = append(c.nodeMutexes, &sync.Mutex{}) c.CLNodes = append(c.CLNodes, &client.ChainlinkK8sClient{ -<<<<<<< HEAD ChainlinkClient: chainlinkNode.API.WithRetryCount(3), -======= - ChainlinkClient: chainlinkNode.API, ->>>>>>> v2.17.0 }) } } else { @@ -4236,12 +4157,7 @@ func (c *CCIPTestEnv) ConnectToDeployedNodes() error { return fmt.Errorf("no CL node found") } -<<<<<<< HEAD - for i := range chainlinkK8sNodes { - chainlinkK8sNodes[i].ChainlinkClient.WithRetryCount(3) -======= for range chainlinkK8sNodes { ->>>>>>> v2.17.0 c.nodeMutexes = append(c.nodeMutexes, &sync.Mutex{}) } c.CLNodes = chainlinkK8sNodes diff --git a/integration-tests/ccip-tests/testconfig/ccip.go b/integration-tests/ccip-tests/testconfig/ccip.go index 9add765d09..f0b63c8fae 100644 --- a/integration-tests/ccip-tests/testconfig/ccip.go +++ b/integration-tests/ccip-tests/testconfig/ccip.go @@ -211,7 +211,6 @@ type LoadFrequency struct { } type LoadProfile struct { -<<<<<<< HEAD MsgProfile *MsgProfile `toml:",omitempty"` FrequencyByDestination map[string]*LoadFrequency `toml:",omitempty"` RequestPerUnitTime []int64 `toml:",omitempty"` @@ -224,21 +223,6 @@ type LoadProfile struct { FailOnFirstErrorInLoad *bool `toml:",omitempty"` SendMaxDataInEveryMsgCount *int64 `toml:",omitempty"` TestRunName string `toml:",omitempty"` -======= - MsgProfile *MsgProfile `toml:",omitempty"` - FrequencyByDestination map[string]*LoadFrequency `toml:",omitempty"` - RequestPerUnitTime []int64 `toml:",omitempty"` - TimeUnit *config.Duration `toml:",omitempty"` - StepDuration []*config.Duration `toml:",omitempty"` - TestDuration *config.Duration `toml:",omitempty"` - NetworkChaosDelay *config.Duration `toml:",omitempty"` - WaitBetweenChaosDuringLoad *config.Duration `toml:",omitempty"` - SkipRequestIfAnotherRequestTriggeredWithin *config.Duration `toml:",omitempty"` - OptimizeSpace *bool `toml:",omitempty"` - FailOnFirstErrorInLoad *bool `toml:",omitempty"` - SendMaxDataInEveryMsgCount *int64 `toml:",omitempty"` - TestRunName string `toml:",omitempty"` ->>>>>>> v2.17.0 } func (l *LoadProfile) Validate() error { @@ -257,13 +241,6 @@ func (l *LoadProfile) Validate() error { if l.TestDuration == nil || l.TestDuration.Duration().Minutes() == 0 { return fmt.Errorf("test duration should be set") } -<<<<<<< HEAD - -======= - if l.SkipRequestIfAnotherRequestTriggeredWithin != nil && l.TimeUnit.Duration() < l.SkipRequestIfAnotherRequestTriggeredWithin.Duration() { - return fmt.Errorf("SkipRequestIfAnotherRequestTriggeredWithin should be set below the TimeUnit duration") - } ->>>>>>> v2.17.0 return nil } @@ -284,7 +261,6 @@ func (gp *ReorgProfile) Validate() error { // CCIPTestGroupConfig defines configuration input to change how a particular CCIP test group should run type CCIPTestGroupConfig struct { -<<<<<<< HEAD Type string `toml:",omitempty"` KeepEnvAlive *bool `toml:",omitempty"` BiDirectionalLane *bool `toml:",omitempty"` @@ -315,37 +291,6 @@ type CCIPTestGroupConfig struct { LoadProfile *LoadProfile `toml:",omitempty"` ReorgProfile *ReorgProfile `toml:",omitempty"` SkipRequestIfAnotherRequestTriggeredWithin *config.Duration `toml:",omitempty"` -======= - Type string `toml:",omitempty"` - KeepEnvAlive *bool `toml:",omitempty"` - BiDirectionalLane *bool `toml:",omitempty"` - CommitAndExecuteOnSameDON *bool `toml:",omitempty"` - AllowOutOfOrder *bool `toml:",omitempty"` // To set out of order execution globally - NoOfCommitNodes int `toml:",omitempty"` - MsgDetails *MsgDetails `toml:",omitempty"` - TokenConfig *TokenConfig `toml:",omitempty"` - MulticallInOneTx *bool `toml:",omitempty"` - NoOfSendsInMulticall int `toml:",omitempty"` - PhaseTimeout *config.Duration `toml:",omitempty"` - LocalCluster *bool `toml:",omitempty"` - ExistingDeployment *bool `toml:",omitempty"` - ReuseContracts *bool `toml:",omitempty"` - NodeFunding float64 `toml:",omitempty"` - NetworkPairs []string `toml:",omitempty"` - DenselyConnectedNetworkChainIds []string `toml:",omitempty"` - NoOfNetworks int `toml:",omitempty"` - NoOfRoutersPerPair int `toml:",omitempty"` - MaxNoOfLanes int `toml:",omitempty"` - ChaosDuration *config.Duration `toml:",omitempty"` - USDCMockDeployment *bool `toml:",omitempty"` - CommitOCRParams *contracts.OffChainAggregatorV2Config `toml:",omitempty"` - ExecOCRParams *contracts.OffChainAggregatorV2Config `toml:",omitempty"` - OffRampConfig *OffRampConfig `toml:",omitempty"` - CommitInflightExpiry *config.Duration `toml:",omitempty"` - StoreLaneConfig *bool `toml:",omitempty"` - LoadProfile *LoadProfile `toml:",omitempty"` - ReorgProfile *ReorgProfile `toml:",omitempty"` ->>>>>>> v2.17.0 } func (c *CCIPTestGroupConfig) Validate() error { @@ -362,14 +307,11 @@ func (c *CCIPTestGroupConfig) Validate() error { return fmt.Errorf("test run name should be set if existing deployment is true and test is running in k8s") } } -<<<<<<< HEAD if c.ReorgProfile != nil { if err := c.ReorgProfile.Validate(); err != nil { return err } } -======= ->>>>>>> v2.17.0 } err := c.MsgDetails.Validate() if err != nil { @@ -396,13 +338,10 @@ func (c *CCIPTestGroupConfig) Validate() error { return fmt.Errorf("number of sends in multisend should be greater than 0 if multisend is true") } } -<<<<<<< HEAD if c.SkipRequestIfAnotherRequestTriggeredWithin != nil && c.LoadProfile != nil && c.LoadProfile.TimeUnit.Duration() < c.SkipRequestIfAnotherRequestTriggeredWithin.Duration() { return fmt.Errorf("SkipRequestIfAnotherRequestTriggeredWithin should be set below the load TimeUnit duration") } -======= ->>>>>>> v2.17.0 return nil } diff --git a/integration-tests/ccip-tests/testconfig/global.go b/integration-tests/ccip-tests/testconfig/global.go index 3e632f4b38..855b3e4b9a 100644 --- a/integration-tests/ccip-tests/testconfig/global.go +++ b/integration-tests/ccip-tests/testconfig/global.go @@ -29,12 +29,7 @@ import ( ) const ( -<<<<<<< HEAD - OVERIDECONFIG = "BASE64_CCIP_CONFIG_OVERRIDE" - -======= - OVERIDECONFIG = "BASE64_CONFIG_OVERRIDE" ->>>>>>> v2.17.0 + OVERIDECONFIG = "BASE64_CCIP_CONFIG_OVERRIDE" ErrReadConfig = "failed to read TOML config" ErrUnmarshalConfig = "failed to unmarshal TOML config" Load string = "load" @@ -141,10 +136,7 @@ func NewConfig() (*Config, error) { } } } -<<<<<<< HEAD -======= ->>>>>>> v2.17.0 // read secrets for all products if cfg.CCIP != nil { err := ctfconfig.LoadSecretEnvsFromFiles() @@ -183,8 +175,6 @@ type Common struct { func (p *Common) ReadFromEnvVar() error { logger := logging.GetTestLogger(nil) -<<<<<<< HEAD -======= testLogCollect := ctfconfig.MustReadEnvVar_Boolean(ctfconfig.E2E_TEST_LOG_COLLECT_ENV) if testLogCollect != nil { if p.Logging == nil { @@ -215,7 +205,6 @@ func (p *Common) ReadFromEnvVar() error { p.Logging.LogStream.LogTargets = logstreamLogTargets } ->>>>>>> v2.17.0 lokiTenantID := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_LOKI_TENANT_ID_ENV) if lokiTenantID != "" { if p.Logging == nil { @@ -300,8 +289,6 @@ func (p *Common) ReadFromEnvVar() error { p.Logging.Grafana.BearerToken = &grafanaBearerToken } -<<<<<<< HEAD -======= selectedNetworks := ctfconfig.MustReadEnvVar_Strings(ctfconfig.E2E_TEST_SELECTED_NETWORK_ENV, ",") if len(selectedNetworks) > 0 { if p.Network == nil { @@ -311,7 +298,6 @@ func (p *Common) ReadFromEnvVar() error { p.Network.SelectedNetworks = selectedNetworks } ->>>>>>> v2.17.0 walletKeys := ctfconfig.ReadEnvVarGroupedMap(ctfconfig.E2E_TEST_WALLET_KEY_ENV, ctfconfig.E2E_TEST_WALLET_KEYS_ENV) if len(walletKeys) > 0 { if p.Network == nil { @@ -355,8 +341,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkImage.Image = &chainlinkImage } -<<<<<<< HEAD -======= chainlinkVersion := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_VERSION_ENV) if chainlinkVersion != "" { if p.NewCLCluster == nil { @@ -389,7 +373,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkImage.PostgresVersion = &chainlinkPostgresVersion } ->>>>>>> v2.17.0 chainlinkUpgradeImage := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_UPGRADE_IMAGE_ENV) if chainlinkUpgradeImage != "" { if p.NewCLCluster == nil { @@ -406,8 +389,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkUpgradeImage.Image = &chainlinkUpgradeImage } -<<<<<<< HEAD -======= chainlinkUpgradeVersion := ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_UPGRADE_VERSION_ENV) if chainlinkUpgradeVersion != "" { if p.NewCLCluster == nil { @@ -424,7 +405,6 @@ func (p *Common) ReadFromEnvVar() error { p.NewCLCluster.Common.ChainlinkUpgradeImage.Version = &chainlinkUpgradeVersion } ->>>>>>> v2.17.0 return nil } diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 64ac701eb5..eee424d50d 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -29,13 +29,8 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain" ctfClient "github.com/smartcontractkit/chainlink-testing-framework/lib/client" -<<<<<<< HEAD - ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config" - ctfconfigtypes "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" -======= ctf_config "github.com/smartcontractkit/chainlink-testing-framework/lib/config" ctf_config_types "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" ->>>>>>> v2.17.0 ctftestenv "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env" "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/config" "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment" @@ -276,27 +271,16 @@ func (c *CCIPTestConfig) SetNetworkPairs(lggr zerolog.Logger) error { c.EnvInput.Network.AnvilConfigs[strings.ToUpper(name)] = existing } -<<<<<<< HEAD - chainConfig := &ctfconfig.EthereumChainConfig{} -======= chainConfig := &ctf_config.EthereumChainConfig{} ->>>>>>> v2.17.0 err := chainConfig.Default() if err != nil { allError = multierr.Append(allError, fmt.Errorf("failed to get default chain config: %w", err)) } else { chainConfig.ChainID = int(chainID) -<<<<<<< HEAD - eth1 := ctfconfigtypes.EthereumVersion_Eth1 - geth := ctfconfigtypes.ExecutionLayer_Geth - - c.EnvInput.PrivateEthereumNetworks[fmt.Sprint(chainID)] = &ctfconfig.EthereumNetworkConfig{ -======= eth1 := ctf_config_types.EthereumVersion_Eth1 geth := ctf_config_types.ExecutionLayer_Geth c.EnvInput.PrivateEthereumNetworks[fmt.Sprint(chainID)] = &ctf_config.EthereumNetworkConfig{ ->>>>>>> v2.17.0 EthereumVersion: ð1, ExecutionLayer: &geth, EthereumChainConfig: chainConfig, diff --git a/integration-tests/ccip-tests/testsetups/test_env.go b/integration-tests/ccip-tests/testsetups/test_env.go index 46a12c63b9..effd6e61bf 100644 --- a/integration-tests/ccip-tests/testsetups/test_env.go +++ b/integration-tests/ccip-tests/testsetups/test_env.go @@ -13,13 +13,8 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/require" -<<<<<<< HEAD - ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config" - ctfconfigtypes "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" -======= ctf_config "github.com/smartcontractkit/chainlink-testing-framework/lib/config" ctf_config_types "github.com/smartcontractkit/chainlink-testing-framework/lib/config/types" ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink-testing-framework/lib/networks" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/conversions" @@ -58,11 +53,7 @@ func SetResourceProfile(cpu, mem string) map[string]interface{} { } } -<<<<<<< HEAD -func setNodeConfig(nets []blockchain.EVMNetwork, nodeConfig, commonChain string, configByChain map[string]string) (*corechainlink.Config, string, error) { -======= func SetNodeConfig(nets []blockchain.EVMNetwork, nodeConfig, commonChain string, configByChain map[string]string) (*corechainlink.Config, string, error) { ->>>>>>> v2.17.0 var tomlCfg *corechainlink.Config var err error var commonChainConfig *evmcfg.Chain @@ -131,11 +122,7 @@ func ChainlinkPropsForUpdate( chainConfigByChain = testInputs.EnvInput.NewCLCluster.Common.ChainConfigTOMLByChain } -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig( -======= _, tomlStr, err := SetNodeConfig( ->>>>>>> v2.17.0 testInputs.SelectedNetworks, nodeConfig, commonChainConfig, chainConfigByChain, ) @@ -163,11 +150,7 @@ func ChainlinkPropsForUpdate( "version": upgradeTag, }, } -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig( -======= _, tomlStr, err := SetNodeConfig( ->>>>>>> v2.17.0 testInputs.SelectedNetworks, testInputs.EnvInput.NewCLCluster.Common.BaseConfigTOML, testInputs.EnvInput.NewCLCluster.Common.CommonChainConfigTOML, @@ -233,11 +216,7 @@ func ChainlinkChart( chainConfigByChain = testInputs.EnvInput.NewCLCluster.Common.ChainConfigTOMLByChain } -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig(nets, nodeConfig, commonChainConfig, chainConfigByChain) -======= _, tomlStr, err := SetNodeConfig(nets, nodeConfig, commonChainConfig, chainConfigByChain) ->>>>>>> v2.17.0 require.NoError(t, err) nodesMap = append(nodesMap, map[string]any{ "name": clNode.Name, @@ -261,11 +240,8 @@ func ChainlinkChart( return chainlink.New(0, clProps) } clProps["replicas"] = pointer.GetInt(testInputs.EnvInput.NewCLCluster.NoOfNodes) -<<<<<<< HEAD - _, tomlStr, err := setNodeConfig( -======= + _, tomlStr, err := SetNodeConfig( ->>>>>>> v2.17.0 nets, testInputs.EnvInput.NewCLCluster.Common.BaseConfigTOML, testInputs.EnvInput.NewCLCluster.Common.CommonChainConfigTOML, @@ -282,11 +258,7 @@ func DeployLocalCluster( ) (*test_env.CLClusterTestEnv, func() error) { selectedNetworks := testInputs.SelectedNetworks -<<<<<<< HEAD - privateEthereumNetworks := []*ctfconfig.EthereumNetworkConfig{} -======= privateEthereumNetworks := []*ctf_config.EthereumNetworkConfig{} ->>>>>>> v2.17.0 for _, network := range testInputs.EnvInput.PrivateEthereumNetworks { privateEthereumNetworks = append(privateEthereumNetworks, network) @@ -316,27 +288,17 @@ func DeployLocalCluster( } for _, network := range missing { -<<<<<<< HEAD - chainConfig := &ctfconfig.EthereumChainConfig{} -======= chainConfig := &ctf_config.EthereumChainConfig{} ->>>>>>> v2.17.0 err := chainConfig.Default() if err != nil { require.NoError(t, err, "failed to get default chain config: %w", err) } else { chainConfig.ChainID = int(network.ChainID) -<<<<<<< HEAD - eth1 := ctfconfigtypes.EthereumVersion_Eth1 - geth := ctfconfigtypes.ExecutionLayer_Geth - privateEthereumNetworks = append(privateEthereumNetworks, &ctfconfig.EthereumNetworkConfig{ -======= eth1 := ctf_config_types.EthereumVersion_Eth1 geth := ctf_config_types.ExecutionLayer_Geth privateEthereumNetworks = append(privateEthereumNetworks, &ctf_config.EthereumNetworkConfig{ ->>>>>>> v2.17.0 EthereumVersion: ð1, ExecutionLayer: &geth, EthereumChainConfig: chainConfig, @@ -372,12 +334,6 @@ func DeployLocalCluster( // a func to start the CL nodes asynchronously deployCL := func() error { noOfNodes := pointer.GetInt(testInputs.EnvInput.NewCLCluster.NoOfNodes) -<<<<<<< HEAD - // if individual nodes are specified, then deploy them with specified configs - if len(testInputs.EnvInput.NewCLCluster.Nodes) > 0 { - for _, clNode := range testInputs.EnvInput.NewCLCluster.Nodes { - toml, _, err := setNodeConfig( -======= if env.ClCluster == nil { env.ClCluster = &test_env.ClCluster{} } @@ -385,7 +341,6 @@ func DeployLocalCluster( if len(testInputs.EnvInput.NewCLCluster.Nodes) > 0 { for _, clNode := range testInputs.EnvInput.NewCLCluster.Nodes { toml, _, err := SetNodeConfig( ->>>>>>> v2.17.0 selectedNetworks, clNode.BaseConfigTOML, clNode.CommonChainConfigTOML, @@ -414,11 +369,7 @@ func DeployLocalCluster( } else { // if no individual nodes are specified, then deploy the number of nodes specified in the env input with common config for i := 0; i < noOfNodes; i++ { -<<<<<<< HEAD - toml, _, err := setNodeConfig( -======= toml, _, err := SetNodeConfig( ->>>>>>> v2.17.0 selectedNetworks, testInputs.EnvInput.NewCLCluster.Common.BaseConfigTOML, testInputs.EnvInput.NewCLCluster.Common.CommonChainConfigTOML, @@ -544,12 +495,8 @@ func DeployEnvironments( "fullnameOverride": actions.NetworkName(network.Name), "image": map[string]interface{}{ "repository": "ghcr.io/foundry-rs/foundry", -<<<<<<< HEAD - "tag": "nightly-2442e7a5fc165d7d0b022aa8b9f09dcdf675157b", -======= "tag": "nightly-5ac78a9cd4b94dc53d1fe5e0f42372b28b5a7559", // "tag": "nightly-ea2eff95b5c17edd3ffbdfc6daab5ce5cc80afc0", ->>>>>>> v2.17.0 }, "anvil": map[string]interface{}{ "chainId": fmt.Sprintf("%d", network.ChainID), From 91c1335fab51e51c62e6e7737a2a4a0ce8cb69de Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 23 Oct 2024 16:43:47 +0530 Subject: [PATCH 3/4] resolve more conflicts --- integration-tests/ccip-tests/Makefile | 26 ------ integration-tests/ccip-tests/README.md | 12 --- .../ccip-tests/load/ccip_loadgen.go | 34 ------- .../ccip-tests/load/ccip_multicall_loadgen.go | 4 - integration-tests/ccip-tests/load/helper.go | 13 --- .../ccip-tests/smoke/ccip_test.go | 44 +--------- .../ccip-tests/testconfig/README.md | 42 --------- .../testconfig/examples/.testsecrets.example | 6 +- .../testconfig/override/mainnet.toml | 88 ------------------- .../testconfig/tomls/ccip-default.toml | 15 +--- integration-tests/go.mod | 2 +- 11 files changed, 5 insertions(+), 281 deletions(-) diff --git a/integration-tests/ccip-tests/Makefile b/integration-tests/ccip-tests/Makefile index 90304c1481..40b4cc8338 100644 --- a/integration-tests/ccip-tests/Makefile +++ b/integration-tests/ccip-tests/Makefile @@ -1,35 +1,17 @@ ## To Override the default config: -<<<<<<< HEAD # example usage: make set_config override_toml=../config/config.toml -======= -# example usage: make set_config override_toml=../config/config.toml network_config_toml=../config/network.toml ->>>>>>> v2.17.0 .PHONY: set_config set_config: if [ -s "$(override_toml)" ]; then \ echo "Overriding config with $(override_toml)"; \ -<<<<<<< HEAD echo "export BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/.env; \ echo "export TEST_BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/.env; \ echo "BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/debug.env; \ echo "TEST_BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/debug.env; \ -======= - echo "export BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/.env; \ - echo "export TEST_BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/.env; \ - echo "BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/debug.env; \ - echo "TEST_BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/debug.env; \ ->>>>>>> v2.17.0 else \ echo "No override config found, using default config"; \ echo > ./testconfig/override/.env; \ fi -<<<<<<< HEAD -======= - if [ -s "$(network_config_toml)" ]; then \ - echo "Overriding network config with $(network_config_toml)"; \ - echo "export BASE64_NETWORK_CONFIG=$$(base64 -i $(network_config_toml))" >> ./testconfig/override/.env; \ - fi ->>>>>>> v2.17.0 @echo "Checking for test secrets file in ~/.testsecrets..."; @if [ ! -f ~/.testsecrets ]; then \ @@ -70,13 +52,8 @@ test_smoke_ccip: set_config test_smoke_ccip_default: set_config source ./testconfig/override/.env && \ DATABASE_URL=postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable \ -<<<<<<< HEAD BASE64_CCIP_CONFIG_OVERRIDE="" \ TEST_BASE64_CCIP_CONFIG_OVERRIDE="" \ -======= - BASE64_CONFIG_OVERRIDE="" \ - TEST_BASE64_CONFIG_OVERRIDE="" \ ->>>>>>> v2.17.0 ENV_JOB_IMAGE="" \ TEST_SUITE=smoke \ TEST_ARGS="-test.timeout 900h" \ @@ -90,7 +67,6 @@ test_smoke_ccip_default: set_config .PHONY: build_ccip_image build_ccip_image: docker build -f ../../core/chainlink.Dockerfile --build-arg COMMIT_SHA=$(git rev-parse HEAD) --build-arg CHAINLINK_USER=chainlink -t $(image):$(tag) ../../ -<<<<<<< HEAD # image: the name for the chainlink image being built, example: image=chainlink # tag: the tag for the chainlink image being built, example: tag=latest @@ -98,5 +74,3 @@ build_ccip_image: .PHONY: build_ccip_debug_image build_ccip_debug_image: docker build -f ../../core/chainlink.debug.Dockerfile --build-arg COMMIT_SHA=$(git rev-parse HEAD) --build-arg CHAINLINK_USER=chainlink -t $(image):$(tag) ../../ -======= ->>>>>>> v2.17.0 diff --git a/integration-tests/ccip-tests/README.md b/integration-tests/ccip-tests/README.md index f883eea212..a1d9cbf436 100644 --- a/integration-tests/ccip-tests/README.md +++ b/integration-tests/ccip-tests/README.md @@ -8,11 +8,7 @@ CCIP tests are designed to be highly configurable. Instead of writing many tests 1. Default test input - set via TOML - If no specific input is set; the tests will run with default inputs mentioned in [default.toml](./testconfig/tomls/ccip-default.toml). Please refer to the [testconfig README](../testconfig/README.md) for a more detailed look at how testconfig works. -<<<<<<< HEAD 2. If you want to run your test with a different config, you can override the default inputs. You can either write an [overrides.toml](../testconfig/README.md#configuration-and-overrides) file, or set the env var `BASE64_CCIP_CONFIG_OVERRIDE` containing the base64 encoded TOML file content with updated test input parameters. -======= -2. If you want to run your test with a different config, you can override the default inputs. You can either write an [overrides.toml](../testconfig/README.md#configuration-and-overrides) file, or set the env var `BASE64_CONFIG_OVERRIDE` containing the base64 encoded TOML file content with updated test input parameters. ->>>>>>> v2.17.0 For example, if you want to override the `Network` input in test and want to run your test on `avalanche testnet` and `arbitrum goerli` network, you need to: 1. Create a TOML file with the following content: @@ -24,17 +20,10 @@ For example, if you want to override the `Network` input in test and want to run ``` 2. Encode it using the `base64` command -<<<<<<< HEAD 3. Set the env var `BASE64_CCIP_CONFIG_OVERRIDE` with the encoded content. ```bash export BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -i ) -======= - 3. Set the env var `BASE64_CONFIG_OVERRIDE` with the encoded content. - - ```bash - export BASE64_CONFIG_OVERRIDE=$(base64 -i ) ->>>>>>> v2.17.0 ``` [mainnet.toml](./testconfig/override/mainnet.toml), [override.toml](./testconfig/examples/override.toml.example) are some of the sample override TOML files. @@ -42,7 +31,6 @@ For example, if you want to override the `Network` input in test and want to run For example - In order to run the smoke test (TestSmokeCCIPForBidirectionalLane) on mainnet, run the test with following env var set: ```bash -<<<<<<< HEAD export BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -i ./testconfig/override/mainnet.toml) ``` diff --git a/integration-tests/ccip-tests/load/ccip_loadgen.go b/integration-tests/ccip-tests/load/ccip_loadgen.go index cf95bf7cf6..8a3059feca 100644 --- a/integration-tests/ccip-tests/load/ccip_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_loadgen.go @@ -10,33 +10,20 @@ import ( "testing" "time" -<<<<<<< HEAD -======= - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" - ->>>>>>> v2.17.0 "github.com/AlekSi/pointer" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" -<<<<<<< HEAD "github.com/stretchr/testify/require" "go.uber.org/atomic" chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" -======= - chain_selectors "github.com/smartcontractkit/chain-selectors" - "github.com/stretchr/testify/require" - "go.uber.org/atomic" - ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink-testing-framework/wasp" "github.com/smartcontractkit/chainlink-common/pkg/config" -<<<<<<< HEAD "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" @@ -44,16 +31,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers" -======= - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers" - - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testreporters" ->>>>>>> v2.17.0 ) // CCIPLaneOptimized is a light-weight version of CCIPLane, It only contains elements which are used during load triggering and validation @@ -220,10 +197,7 @@ func (c *CCIPE2ELoad) CCIPMsg() (router.ClientEVM2AnyMessage, *testreporters.Req extraArgs []byte err error ) -<<<<<<< HEAD // v1.5.0 and later starts using V2 extra args -======= ->>>>>>> v2.17.0 matchErr := contracts.MatchContractVersionsOrAbove(map[contracts.Name]contracts.Version{ contracts.OnRampContract: contracts.V1_5_0, }) @@ -251,16 +225,12 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { res := &wasp.Response{} sourceCCIP := c.Lane.Source var recentRequestFoundAt *time.Time -<<<<<<< HEAD var latestEvent *types.Log -======= ->>>>>>> v2.17.0 var err error // Use IsPastRequestTriggeredWithinTimeframe to check for any historical CCIP send request events // within the specified timeframe for the first message. Subsequently, use the watcher method to monitor // and detect any new events as they occur. if c.CurrentMsgSerialNo.Load() == int64(1) { -<<<<<<< HEAD latestEvent, err = sourceCCIP.IsPastRequestTriggeredWithinTimeframe(testcontext.Get(c.t), c.SkipRequestIfAnotherRequestTriggeredWithin) require.NoError(c.t, err, "error while filtering past requests") if latestEvent != nil { @@ -268,10 +238,6 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { require.NoError(c.t, err, "error while getting header by block number") recentRequestFoundAt = pointer.ToTime(hdr.Timestamp) } -======= - recentRequestFoundAt, err = sourceCCIP.IsPastRequestTriggeredWithinTimeframe(testcontext.Get(c.t), c.SkipRequestIfAnotherRequestTriggeredWithin) - require.NoError(c.t, err, "error while filtering past requests") ->>>>>>> v2.17.0 } else { recentRequestFoundAt = sourceCCIP.IsRequestTriggeredWithinTimeframe(c.SkipRequestIfAnotherRequestTriggeredWithin) } diff --git a/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go b/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go index 8a02aa7dc7..39e5388244 100644 --- a/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_multicall_loadgen.go @@ -91,11 +91,7 @@ func NewMultiCallLoadGenerator(testCfg *testsetups.CCIPTestConfig, lanes []*acti testCfg.Test, lane, testCfg.TestGroupInput.PhaseTimeout.Duration(), 100000, testCfg.TestGroupInput.LoadProfile.MsgProfile, 0, -<<<<<<< HEAD testCfg.TestGroupInput.SkipRequestIfAnotherRequestTriggeredWithin, -======= - testCfg.TestGroupInput.LoadProfile.SkipRequestIfAnotherRequestTriggeredWithin, ->>>>>>> v2.17.0 ) ccipLoad.BeforeAllCall() m.E2ELoads[fmt.Sprintf("%s-%s", lane.SourceNetworkName, lane.DestNetworkName)] = ccipLoad diff --git a/integration-tests/ccip-tests/load/helper.go b/integration-tests/ccip-tests/load/helper.go index 03607a8329..f89aadc248 100644 --- a/integration-tests/ccip-tests/load/helper.go +++ b/integration-tests/ccip-tests/load/helper.go @@ -112,7 +112,6 @@ func (l *LoadArgs) scheduleForDest(destNetworkName string) []*wasp.Segment { // if found, use that frequency for the destination network // otherwise, use the default frequency if l.TestCfg.TestGroupInput.LoadProfile.FrequencyByDestination != nil { -<<<<<<< HEAD l.lggr.Debug(). Interface("FrequencyByDestination", l.TestCfg.TestGroupInput.LoadProfile.FrequencyByDestination). Msg("LoadProfile provided") @@ -122,10 +121,6 @@ func (l *LoadArgs) scheduleForDest(destNetworkName string) []*wasp.Segment { l.lggr.Info().Str("Destination", destNetworkName). Ints64("RequestPerUnitTime", freq.RequestPerUnitTime). Msg("Using frequency for destination") -======= - for networkName, freq := range l.TestCfg.TestGroupInput.LoadProfile.FrequencyByDestination { - if strings.Contains(destNetworkName, networkName) { ->>>>>>> v2.17.0 return WaspSchedule( freq.RequestPerUnitTime, l.TestCfg.TestGroupInput.LoadProfile.TestDuration, @@ -281,11 +276,7 @@ func (l *LoadArgs) TriggerLoadByLane() { ccipLoad := NewCCIPLoad( l.TestCfg.Test, lane, l.TestCfg.TestGroupInput.PhaseTimeout.Duration(), 100000, l.TestCfg.TestGroupInput.LoadProfile.MsgProfile, sendMaxData, -<<<<<<< HEAD l.TestCfg.TestGroupInput.SkipRequestIfAnotherRequestTriggeredWithin, -======= - l.TestCfg.TestGroupInput.LoadProfile.SkipRequestIfAnotherRequestTriggeredWithin, ->>>>>>> v2.17.0 ) ccipLoad.BeforeAllCall() // if it's not multicall set the tokens to nil to free up some space, @@ -321,11 +312,7 @@ func (l *LoadArgs) TriggerLoadByLane() { } waspCfg.LokiConfig.Timeout = time.Minute loadRunner, err := wasp.NewGenerator(waspCfg) -<<<<<<< HEAD - require.NoError(l.TestCfg.Test, err, "initiating loadgen for lane %s --> %s", -======= require.NoError(l.TestCfg.Test, err, "error while initiating loadgen for lane %s --> %s", ->>>>>>> v2.17.0 lane.SourceNetworkName, lane.DestNetworkName) loadRunner.Run(false) l.AddToRunnerGroup(loadRunner) diff --git a/integration-tests/ccip-tests/smoke/ccip_test.go b/integration-tests/ccip-tests/smoke/ccip_test.go index ab8d81747e..cc8cc9b9a4 100644 --- a/integration-tests/ccip-tests/smoke/ccip_test.go +++ b/integration-tests/ccip-tests/smoke/ccip_test.go @@ -3,7 +3,6 @@ package smoke import ( "fmt" "math/big" -<<<<<<< HEAD "strings" "testing" "time" @@ -17,39 +16,18 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/osutil" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" + "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" -======= - "testing" - "time" - - "github.com/rs/zerolog" - "github.com/stretchr/testify/assert" - - "github.com/AlekSi/pointer" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" - - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions" ->>>>>>> v2.17.0 "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testreporters" - "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testsetups" -<<<<<<< HEAD + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" -======= ->>>>>>> v2.17.0 ) type testDefinition struct { @@ -61,10 +39,7 @@ func TestSmokeCCIPForBidirectionalLane(t *testing.T) { t.Parallel() log := logging.GetTestLogger(t) TestCfg := testsetups.NewCCIPTestConfig(t, log, testconfig.Smoke) -<<<<<<< HEAD -======= require.NotNil(t, TestCfg.TestGroupInput.MsgDetails.DestGasLimit) ->>>>>>> v2.17.0 gasLimit := big.NewInt(*TestCfg.TestGroupInput.MsgDetails.DestGasLimit) setUpOutput := testsetups.CCIPDefaultTestSetUp(t, &log, "smoke-ccip", nil, TestCfg) if len(setUpOutput.Lanes) == 0 { @@ -273,14 +248,10 @@ func TestSmokeCCIPRateLimit(t *testing.T) { tc.lane.Source.Common.ChainClient.GetDefaultWallet(), src.Common.Router.Address(), src.TransferAmount[0]), ) require.NoError(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) -<<<<<<< HEAD failedTx, _, _, err := tc.lane.Source.SendRequest( tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit), ) -======= - failedTx, _, _, err := tc.lane.Source.SendRequest(tc.lane.Dest.ReceiverDapp.EthAddress, big.NewInt(actions.DefaultDestinationGasLimit)) ->>>>>>> v2.17.0 require.NoError(t, err) require.Error(t, tc.lane.Source.Common.ChainClient.WaitForEvents()) errReason, v, err := tc.lane.Source.Common.ChainClient.RevertReasonFromTx(failedTx, evm_2_evm_onramp.EVM2EVMOnRampABI) @@ -941,7 +912,6 @@ func TestSmokeCCIPReorgAboveFinalityAtSource(t *testing.T) { }) } -<<<<<<< HEAD // TestSmokeCCIPForGivenNetworkPairs is designed specifically for scheduled mainnet testing. This test checks for recent // transaction and skip the lanes accordingly. This test also has capability to take override input on network pairs and phase timeout. func TestSmokeCCIPForGivenNetworkPairs(t *testing.T) { @@ -1059,8 +1029,6 @@ func TestSmokeCCIPForGivenNetworkPairs(t *testing.T) { } } -======= ->>>>>>> v2.17.0 // performAboveFinalityReorgAndValidate is to perform the above finality reorg test func performAboveFinalityReorgAndValidate(t *testing.T, network string) { t.Helper() @@ -1103,21 +1071,13 @@ func performAboveFinalityReorgAndValidate(t *testing.T, network string) { require.NoError(t, err) for _, d := range resp.Data { if d.Attributes.Name == logPollerName && d.Attributes.Output == "finality violated" && d.Attributes.Status == "failing" { -<<<<<<< HEAD log.Debug().Str("Node", node.ChainlinkClient.URL()).Msg("Finality violated is detected by node") -======= - log.Debug().Msg("Finality violated is detected by node") ->>>>>>> v2.17.0 nodesDetectedViolation[node.ChainlinkClient.URL()] = true } } } return len(nodesDetectedViolation) == len(clNodes) -<<<<<<< HEAD }, 5*time.Minute, 5*time.Second, "Reorg above finality depth is not detected by every node") -======= - }, 3*time.Minute, 20*time.Second, "Reorg above finality depth is not detected by every node") ->>>>>>> v2.17.0 log.Debug().Interface("Nodes", nodesDetectedViolation).Msg("Violation detection details") // send another request and verify it fails err = lane.SendRequests(1, gasLimit) diff --git a/integration-tests/ccip-tests/testconfig/README.md b/integration-tests/ccip-tests/testconfig/README.md index 1614ed62eb..cf1431baa9 100644 --- a/integration-tests/ccip-tests/testconfig/README.md +++ b/integration-tests/ccip-tests/testconfig/README.md @@ -6,19 +6,11 @@ The test config is read in following order: - The test reads the default configuration from [ccip-default.toml](./tomls/ccip-default.toml). - The default can be overridden by specifying the test config in a separate file. -<<<<<<< HEAD - The file content needs to be encoded in base64 format and set in `BASE64_CCIP_CONFIG_OVERRIDE` environment variable. - The config mentioned in this file will override the default config. - Example override file - [override.toml.example](./examples/override.toml.example) - If there are sensitive details like private keys, credentials in test config, they can be specified in a separate dotenv file as env vars - The `~/.testsecrets` file in home directory is automatically loaded and should have all test secrets as env vars. Learn more about it [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md#test-secrets) -======= - - The file content needs to be encoded in base64 format and set in `BASE64_CONFIG_OVERRIDE` environment variable. - - The config mentioned in this file will override the default config. - - Example override file - [override.toml.example](./examples/override.toml.example) -- If there are sensitive details like private keys, credentials in test config, they can be specified in a separate dotenv file as env vars - - The `~/.testsecrets` file in home directory is automatically loaded and should have all test secrets as env vars ->>>>>>> v2.17.0 - Example secret file - [.testsecrets.example](./examples/.testsecrets.example) ## CCIP.ContractVersions @@ -118,11 +110,7 @@ Or, DataFile = '' ``` -<<<<<<< HEAD ## CCIP.Env -======= -## CCIP.Env ->>>>>>> v2.17.0 Specifies the environment details for the test to be run on. Mandatory fields are: @@ -131,18 +119,7 @@ Mandatory fields are: - **NewCLCluster**: [CCIP.Env.NewCLCluster](#ccipenvnewclcluster) - This is mandatory if the test needs to deploy Chainlink nodes. - **ExistingCLCluster**: [CCIP.Env.ExistingCLCluster](#ccipenvexistingclcluster) - This is mandatory if the test needs to run on existing Chainlink nodes to deploy ccip jobs. -<<<<<<< HEAD Test needs network/chain details to be set through configuration. Set network urls in ~/.testsecrets [see docs](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md#test-secrets). -======= -Test needs network/chain details to be set through configuration. This configuration is mandatory for running the tests. -you have option to set the network details in two ways: - -1. Using [CCIP.Env.Networks](#ccipenvnetworks) -2. Using a separate network config file - - - refer to the example - [network_config.toml.example](./examples/network_config.toml.example) - - once all necessary values are set, encode the toml file content in base64 format, - - set the base64'ed string content in `BASE64_NETWORK_CONFIG` environment variable. ->>>>>>> v2.17.0 ### CCIP.Env.Networks @@ -162,11 +139,7 @@ If the network is not present in known_networks, then the network details can be #### CCIP.Env.Network.EVMNetworks -<<<<<<< HEAD Specifies the network config to be used while creating blockchain EVMClient for test. -======= -Specifies the network config to be used while creating blockchain EVMClient for test. ->>>>>>> v2.17.0 It is a map of network name to EVMNetworks where key is network name specified under `CCIP.Env.Networks.selected_networks` and value is `EVMNetwork`. The EVMNetwork is imported from [EVMNetwork](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/blockchain/config.go#L43) in chainlink-testing-framework. @@ -684,7 +657,6 @@ Specifies the OCR parameters for the execute job. This is only valid if the test Specifies the value for the `InflightExpiry` in commit job's offchain config. This is only valid if the test is not run on [existing deployments](#ccipgroupstestgroupexistingdeployment). -<<<<<<< HEAD ### CCIP.Groups.[testgroup].SkipRequestIfAnotherRequestTriggeredWithin If there is CCIP Send requested event present within this duration, the test will skip sending another @@ -692,8 +664,6 @@ request during load run or avoid sending request in smoke test in that lane. For if `SkipRequestIfAnotherRequestTriggeredWithin` is set to `40m`, and a request is triggered at 0th second, the test will skip sending another request for another 40m. This particular field is used to avoid sending transaction when there is traffic already in that lane. -======= ->>>>>>> v2.17.0 ### CCIP.Groups.[testgroup].OffRampConfig Specifies the offramp configuration for the execution job. This is only valid if the test is not run on [existing deployments](#ccipgroupstestgroupexistingdeployment). @@ -773,14 +743,6 @@ Specifies the duration network delay used for `NetworkChaos` experiment. This is If there are multiple chaos experiments, this specifies the duration to wait between each chaos experiment. This is only valid if the test is run on k8s and not on [existing deployments](#ccipgroupstestgroupexistingdeployment). -<<<<<<< HEAD -======= -#### CCIP.Groups.[testgroup].LoadProfile.SkipRequestIfAnotherRequestTriggeredWithin - -If a request is triggered within this duration, the test will skip sending another request during load run. For Example, if `SkipRequestIfAnotherRequestTriggeredWithin` is set to `40m`, and a request is triggered at 0th second, the test will skip sending another request for another 40m. -This particular field is used to avoid sending multiple requests in a short duration during load run. - ->>>>>>> v2.17.0 #### CCIP.Groups.[testgroup].LoadProfile.OptimizeSpace This is used internally to optimize memory usage during load run. If set to true, after the initial lane set up is over the test will discard the lane config to save memory. @@ -861,8 +823,4 @@ DataLength = 10000 MsgType = 'Data' DestGasLimit = 2500000 DataLength = 10000 -<<<<<<< HEAD -``` -======= ``` ->>>>>>> v2.17.0 diff --git a/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example b/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example index bba5ab0bc2..52afa77015 100644 --- a/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example +++ b/integration-tests/ccip-tests/testconfig/examples/.testsecrets.example @@ -36,8 +36,4 @@ E2E_TEST_LOKI_ENDPOINT="" # Grafana secrets E2E_TEST_GRAFANA_BASE_URL="" -<<<<<<< HEAD -E2E_TEST_GRAFANA_DASHBOARD_URL="/d/6vjVx-1V8/ccip-long-running-tests" -======= -E2E_TEST_GRAFANA_DASHBOARD_URL="/d/6vjVx-1V8/ccip-long-running-tests" ->>>>>>> v2.17.0 +E2E_TEST_GRAFANA_DASHBOARD_URL="/d/6vjVx-1V8/ccip-long-running-tests" \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/override/mainnet.toml b/integration-tests/ccip-tests/testconfig/override/mainnet.toml index 3aec6ec714..6fa0c3e0dd 100644 --- a/integration-tests/ccip-tests/testconfig/override/mainnet.toml +++ b/integration-tests/ccip-tests/testconfig/override/mainnet.toml @@ -1081,7 +1081,6 @@ TTL = '8h' [CCIP.Env.Network] selected_networks = [ -<<<<<<< HEAD 'ARBITRUM_MAINNET', 'AVALANCHE_MAINNET', 'BASE_MAINNET', @@ -1156,54 +1155,6 @@ BiDirectionalLane = true PhaseTimeout = '20m' ExistingDeployment = true SkipRequestIfAnotherRequestTriggeredWithin = '40m' -======= - 'ARBITRUM_MAINNET', - 'AVALANCHE_MAINNET', - 'BSC_MAINNET', - 'BASE_MAINNET', - 'ETHEREUM_MAINNET', - 'KROMA_MAINNET', - 'OPTIMISM_MAINNET', - 'POLYGON_MAINNET', - 'WEMIX_MAINNET', - ] - -[CCIP.Groups.load] -NetworkPairs = [ - 'ETHEREUM_MAINNET,OPTIMISM_MAINNET', - 'ETHEREUM_MAINNET,AVALANCHE_MAINNET', - 'ETHEREUM_MAINNET,POLYGON_MAINNET', - 'ETHEREUM_MAINNET,BSC_MAINNET', - 'ETHEREUM_MAINNET,ARBITRUM_MAINNET', - 'ETHEREUM_MAINNET,BASE_MAINNET', - 'ETHEREUM_MAINNET,WEMIX_MAINNET', - 'AVALANCHE_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,OPTIMISM_MAINNET', - 'BASE_MAINNET,ARBITRUM_MAINNET', - 'AVALANCHE_MAINNET,BSC_MAINNET', - 'BSC_MAINNET,POLYGON_MAINNET', - 'OPTIMISM_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,BSC_MAINNET', - 'POLYGON_MAINNET,ARBITRUM_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,BSC_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,OPTIMISM_MAINNET', # added as batch 1 - 'AVALANCHE_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'BASE_MAINNET,POLYGON_MAINNET', # added as batch 2 - 'BSC_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,BASE_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,KROMA_MAINNET', - 'BSC_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'POLYGON_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'OPTIMISM_MAINNET,WEMIX_MAINNET' # added as batch 2 -] - -BiDirectionalLane = true -PhaseTimeout = '30m' -ExistingDeployment = true ->>>>>>> v2.17.0 [CCIP.Groups.load.TokenConfig] NoOfTokensPerChain = 1 @@ -1214,11 +1165,7 @@ TimeUnit = '1h' TestDuration = '5h' TestRunName = 'Soak_test_mainnet' FailOnFirstErrorInLoad = true -<<<<<<< HEAD -======= -SkipRequestIfAnotherRequestTriggeredWithin = '40m' ->>>>>>> v2.17.0 [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] MsgType = 'Data' @@ -1230,7 +1177,6 @@ AmountPerToken = 1 [CCIP.Groups.smoke] # these are all the valid network pairs NetworkPairs = [ -<<<<<<< HEAD 'ARBITRUM_MAINNET,BSC_MAINNET', 'ARBITRUM_MAINNET,OPTIMISM_MAINNET', 'AVALANCHE_MAINNET,ARBITRUM_MAINNET', @@ -1280,36 +1226,6 @@ NetworkPairs = [ 'WEMIX_MAINNET,ARBITRUM_MAINNET', 'WEMIX_MAINNET,KROMA_MAINNET', 'ZKSYNC_MAINNET,ARBITRUM_MAINNET' -======= - 'ETHEREUM_MAINNET,OPTIMISM_MAINNET', - 'ETHEREUM_MAINNET,AVALANCHE_MAINNET', - 'ETHEREUM_MAINNET,POLYGON_MAINNET', - 'ETHEREUM_MAINNET,BSC_MAINNET', - 'ETHEREUM_MAINNET,ARBITRUM_MAINNET', - 'ETHEREUM_MAINNET,BASE_MAINNET', - 'ETHEREUM_MAINNET,WEMIX_MAINNET', - 'AVALANCHE_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,OPTIMISM_MAINNET', - 'BASE_MAINNET,ARBITRUM_MAINNET', - 'AVALANCHE_MAINNET,BSC_MAINNET', - 'BSC_MAINNET,POLYGON_MAINNET', - 'OPTIMISM_MAINNET,POLYGON_MAINNET', - 'BASE_MAINNET,BSC_MAINNET', - 'POLYGON_MAINNET,ARBITRUM_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,BSC_MAINNET', # added as batch 1 - 'ARBITRUM_MAINNET,OPTIMISM_MAINNET', # added as batch 1 - 'AVALANCHE_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'BASE_MAINNET,POLYGON_MAINNET', # added as batch 2 - 'BSC_MAINNET,OPTIMISM_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,BASE_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,KROMA_MAINNET', - 'BSC_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'AVALANCHE_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'POLYGON_MAINNET,WEMIX_MAINNET', # added as batch 2 - 'WEMIX_MAINNET,ARBITRUM_MAINNET', # added as batch 2 - 'OPTIMISM_MAINNET,WEMIX_MAINNET' # added as batch 2 ->>>>>>> v2.17.0 ] BiDirectionalLane = true @@ -1317,11 +1233,7 @@ PhaseTimeout = '20m' LocalCluster = false ExistingDeployment = true ReuseContracts = true -<<<<<<< HEAD SkipRequestIfAnotherRequestTriggeredWithin = '24h' -======= - ->>>>>>> v2.17.0 [CCIP.Groups.smoke.TokenConfig] NoOfTokensPerChain = 1 diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml index 379215421c..3bc6e25460 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml @@ -229,13 +229,10 @@ BlockHistorySize = 200 EIP1559FeeCapBufferBlocks = 0 """ -<<<<<<< HEAD # Run by default using latest version from `ccip-develop` branch, override this value to use a specific version [CCIP.Env.NewCLCluster.Common.ChainlinkImage] version = "ccip-develop" -======= ->>>>>>> v2.17.0 # the following configs are specific to each test type, smoke, load , chaos, etc... [CCIP.Groups] [CCIP.Groups.smoke] @@ -246,14 +243,8 @@ version = "ccip-develop" KeepEnvAlive = false # if true, the test will not tear down the test environment after the test is finished CommitAndExecuteOnSameDON = true # if true, and the test is building the env from scratch, same chainlink nodes will be used for Commit and Execution jobs. -<<<<<<< HEAD # Otherwise Commit and execution jobs will be set up in different nodes based on the number of nodes specified in NoOfCommitNodes and CCIP.Env.NewCLCluster.NoOfNodes AllowOutOfOrder = false # if true, all lanes will set all transactions to allow out of order execution. This setting overrides individual settings from lane_config. To allow out of order execution per lane, then send "allow_out_of_order":true, similar to is_native_fee_token variable. -======= -AllowOutOfOrder = false # if true, all the lanes will allow out of order execution and it -# overrides settings from lane_config. To allow out of order execution per lane, then send "allow_out_of_order":true, similar to is_native_fee_token variable. -# Otherwise Commit and execution jobs will be set up in different nodes based on the number of nodes specified in NoOfCommitNodes and CCIP.Env.NewCLCluster.NoOfNodes ->>>>>>> v2.17.0 BiDirectionalLane = true # True uses both the lanes. If bidirectional is false only one way lane is set up. NoOfCommitNodes = 5 # no of chainlink nodes with Commit job PhaseTimeout = '10m' # Duration to wait for the each phase validation(SendRequested, Commit, RMN Blessing, Execution) to time-out. @@ -384,11 +375,7 @@ CCIPOwnerTokens = false # if true, the test will use deploy the tokens by the CC # Uncomment the following if you want to run your tests with updated OCR params # otherwise test will use default OCR params from - -<<<<<<< HEAD # https://github.com/smartcontractkit/ccip/blob/ccip-develop/integration-tests/ccip-tests/contracts/contract_deployer.go#L729-L751 -======= -# https://github.com/smartcontractkit/chainlink/blob/develop/integration-tests/ccip-tests/contracts/contract_deployer.go#L729-L751 ->>>>>>> v2.17.0 ## OCR Params #CommitInflightExpiry = '2m' #ExecInflightExpiry = '2m' @@ -425,7 +412,7 @@ CommitAndExecuteOnSameDON = false AllowOutOfOrder = false BiDirectionalLane = true NoOfCommitNodes = 5 -PhaseTimeout = '50m' +PhaseTimeout = '50m'`q LocalCluster = false ExistingDeployment = false ReuseContracts = true diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 6ef40545e0..c40ac63013 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -6,6 +6,7 @@ go 1.22.5 replace github.com/smartcontractkit/chainlink/v2 => ../ require ( + dario.cat/mergo v1.0.1 github.com/AlekSi/pointer v1.1.0 github.com/Khan/genqlient v0.7.0 github.com/Masterminds/semver/v3 v3.2.1 @@ -67,7 +68,6 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/math v1.3.0 // indirect - dario.cat/mergo v1.0.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect From 9ac85458e362ca144fd3d3dd25d9d1cb13ad8033 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Wed, 23 Oct 2024 17:20:27 +0530 Subject: [PATCH 4/4] Fix lint --- integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml | 2 +- integration-tests/crib/chaos.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml index 3bc6e25460..15bf443bca 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/ccip-default.toml @@ -412,7 +412,7 @@ CommitAndExecuteOnSameDON = false AllowOutOfOrder = false BiDirectionalLane = true NoOfCommitNodes = 5 -PhaseTimeout = '50m'`q +PhaseTimeout = '50m' LocalCluster = false ExistingDeployment = false ReuseContracts = true diff --git a/integration-tests/crib/chaos.go b/integration-tests/crib/chaos.go index 745237e67b..463ced483f 100644 --- a/integration-tests/crib/chaos.go +++ b/integration-tests/crib/chaos.go @@ -3,8 +3,6 @@ package crib import ( "time" - "github.com/smartcontractkit/chainlink-testing-framework/havoc" - "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"