-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/ccip_misc_fixes
- Loading branch information
Showing
126 changed files
with
3,911 additions
and
2,080 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": minor | ||
--- | ||
|
||
#updated feat(job-distributor): support tron chain type on sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ jobs: | |
permissions: | ||
id-token: write | ||
contents: write | ||
actions: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -86,7 +87,7 @@ jobs: | |
go-mod-download-directory: ${{ matrix.type.test-suite == 'ccip-deployment' && matrix.type.module-directory || '' }} | ||
|
||
- name: Build Tests | ||
uses: smartcontractkit/.github/apps/go-conditional-tests@37882e110590e636627a26371bdbd56ddfcce821 # go-conditional-tests@0.1.0 | ||
uses: smartcontractkit/.github/apps/go-conditional-tests@57f99fbea73056c490c766d50ef582a13ec4f3bb # go-conditional-tests@0.2.0 | ||
timeout-minutes: 10 | ||
with: | ||
pipeline-step: "build" | ||
|
@@ -98,7 +99,7 @@ jobs: | |
build-flags: ${{ matrix.type.build-flags }} | ||
|
||
- name: Run Tests | ||
uses: smartcontractkit/.github/apps/go-conditional-tests@37882e110590e636627a26371bdbd56ddfcce821 # go-conditional-tests@0.1.0 | ||
uses: smartcontractkit/.github/apps/go-conditional-tests@57f99fbea73056c490c766d50ef582a13ec4f3bb # go-conditional-tests@0.2.0 | ||
timeout-minutes: 15 | ||
env: | ||
CL_DATABASE_URL: ${{ env.DB_URL }} | ||
|
@@ -112,7 +113,7 @@ jobs: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update Test Index | ||
uses: smartcontractkit/.github/apps/go-conditional-tests@37882e110590e636627a26371bdbd56ddfcce821 # go-conditional-tests@0.1.0 | ||
uses: smartcontractkit/.github/apps/go-conditional-tests@57f99fbea73056c490c766d50ef582a13ec4f3bb # go-conditional-tests@0.2.0 | ||
with: | ||
pipeline-step: "update" | ||
collect-coverage: ${{ needs.filter.outputs.should-collect-coverage }} | ||
|
@@ -130,7 +131,7 @@ jobs: | |
if: ${{ needs.filter.outputs.should-collect-coverage == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
- name: Checkout the repo | ||
uses: actions/[email protected] | ||
with: | ||
# fetches all history for all tags and branches to provide more metadata for sonar reports | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,11 @@ on: | |
baseRef: | ||
required: false | ||
type: string | ||
description: 'The base reference or branch to compare changes for detecting flaky tests.' | ||
description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)' | ||
headRef: | ||
required: false | ||
type: string | ||
description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.' | ||
description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)' | ||
runAllTests: | ||
required: false | ||
type: boolean | ||
|
@@ -56,6 +56,7 @@ on: | |
required: true | ||
|
||
env: | ||
GIT_BASE_REF: ${{ inputs.baseRef }} | ||
GIT_HEAD_REF: ${{ inputs.headRef || github.ref }} | ||
SKIPPED_TESTS: ${{ fromJSON(inputs.extraArgs)['skipped_tests'] || '' }} # Comma separated list of test names to skip running in the flaky detector. Related issue: TT-1823 | ||
DEFAULT_MAX_RUNNER_COUNT: ${{ fromJSON(inputs.extraArgs)['default_max_runner_count'] || '8' }} # The default maximum number of GitHub runners to use for parallel test execution. | ||
|
@@ -80,29 +81,49 @@ jobs: | |
affected_test_packages: ${{ steps.get-tests.outputs.packages }} | ||
git_head_sha: ${{ steps.get_commit_sha.outputs.git_head_sha }} | ||
git_head_short_sha: ${{ steps.get_commit_sha.outputs.git_head_short_sha }} | ||
git_base_sha: ${{ steps.get_commit_sha.outputs.git_base_sha }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.GIT_HEAD_REF }} | ||
|
||
- name: Get commit SHA | ||
- name: Get SHA | ||
id: get_commit_sha | ||
run: | | ||
# Resolve HEAD SHA | ||
git_head_sha=$(git rev-parse HEAD) | ||
git_head_short_sha=$(git rev-parse --short HEAD) | ||
echo "git_head_sha=$git_head_sha" >> $GITHUB_OUTPUT | ||
echo "git_head_short_sha=$git_head_short_sha" >> $GITHUB_OUTPUT | ||
# Print HEAD SHAs to the console | ||
echo "HEAD SHA: $git_head_sha" | ||
echo "HEAD Short SHA: $git_head_short_sha" | ||
# Conditionally resolve BASE SHA | ||
if [ -n "${{ env.GIT_BASE_REF }}" ]; then | ||
git fetch origin ${{ env.GIT_BASE_REF }} --quiet | ||
git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }}) | ||
echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT | ||
# Print BASE SHA to the console | ||
echo "BASE SHA: $git_base_sha" | ||
else | ||
echo "BASE SHA not provided." | ||
echo "git_base_sha=" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Set up Go 1.21.9 | ||
uses: actions/[email protected] | ||
with: | ||
cache: false | ||
|
||
- name: Install flakeguard | ||
shell: bash | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # [email protected] | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # [email protected] | ||
|
||
- name: Find new or updated test packages | ||
if: ${{ inputs.runAllTests == false }} | ||
|
@@ -115,7 +136,7 @@ jobs: | |
PATH=$PATH:$(go env GOPATH)/bin | ||
export PATH | ||
PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }}) | ||
PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }}) | ||
echo $PACKAGES | ||
echo "packages=$PACKAGES" >> $GITHUB_OUTPUT | ||
|
@@ -130,7 +151,7 @@ jobs: | |
PATH=$PATH:$(go env GOPATH)/bin | ||
export PATH | ||
TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }}) | ||
TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }}) | ||
echo $TEST_FILES | ||
echo "test_files=$TEST_FILES" >> $GITHUB_OUTPUT | ||
|
@@ -261,11 +282,11 @@ jobs: | |
|
||
- name: Install flakeguard | ||
shell: bash | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # [email protected] | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # [email protected] | ||
|
||
- name: Run tests with flakeguard | ||
shell: bash | ||
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --output-json=test-result.json | ||
run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --output-json=test-result.json --omit-test-outputs-on-success=true | ||
env: | ||
CL_DATABASE_URL: ${{ env.DB_URL }} | ||
|
||
|
@@ -281,7 +302,7 @@ jobs: | |
needs: [get-tests, run-tests] | ||
if: always() | ||
name: Report | ||
runs-on: ubuntu-24.04-8cores-32GB-ARM # Use a runner with more resources to avoid OOM errors when aggregating test results. | ||
runs-on: ubuntu-latest | ||
outputs: | ||
test_results: ${{ steps.results.outputs.results }} | ||
steps: | ||
|
@@ -308,7 +329,7 @@ jobs: | |
|
||
- name: Install flakeguard | ||
shell: bash | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # [email protected] | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # [email protected] | ||
|
||
- name: Aggregate Flakeguard Results | ||
id: results | ||
|
@@ -329,7 +350,11 @@ jobs: | |
--output-path ./flakeguard-report \ | ||
--repo-path "${{ github.workspace }}" \ | ||
--codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \ | ||
--max-pass-ratio "${{ inputs.maxPassRatio }}" | ||
--max-pass-ratio "${{ inputs.maxPassRatio }}" \ | ||
--repo-url "${{ inputs.repoUrl }}" \ | ||
--base-sha "${{ needs.get-tests.outputs.git_base_sha }}" \ | ||
--head-sha "${{ needs.get-tests.outputs.git_head_sha }}" \ | ||
--github-workflow-name "${{ github.workflow }}" | ||
|
||
# Print out the summary file | ||
echo -e "\nFlakeguard Summary:" | ||
|
@@ -461,7 +486,7 @@ jobs: | |
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" | ||
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" | ||
} | ||
}, | ||
{ | ||
|
@@ -481,7 +506,7 @@ jobs: | |
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, inputs.baseRef, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" | ||
"text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, env.GIT_BASE_REF, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" | ||
} | ||
} | ||
] | ||
|
@@ -514,7 +539,7 @@ jobs: | |
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" | ||
"text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" | ||
} | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,49 @@ on: | |
tags: | ||
- "*" | ||
workflow_dispatch: | ||
inputs: | ||
team: | ||
description: Team to run the tests for (e.g. BIX, CCIP) | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
run-e2e-tests-workflow-dispatch: | ||
name: Run E2E Tests (Workflow Dispatch) | ||
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760 | ||
if: github.event_name == 'workflow_dispatch' | ||
with: | ||
test_path: .github/e2e-tests.yml | ||
chainlink_version: ${{ github.sha }} | ||
require_chainlink_image_versions_in_qa_ecr: ${{ github.sha }} | ||
test_trigger: E2E Chaos Tests | ||
test_log_level: debug | ||
team: ${{ inputs.team }} | ||
secrets: | ||
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | ||
PROD_AWS_ACCOUNT_NUMBER: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }} | ||
QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} | ||
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | ||
GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} | ||
LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }} | ||
LOKI_URL: ${{ secrets.LOKI_URL }} | ||
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
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 }} | ||
|
||
run-e2e-tests-workflow: | ||
name: Run E2E Tests | ||
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@5412507526722a7b1c5d719fa686eed5a1bc4035 # [email protected] | ||
name: Run E2E Tests (Push and Sechedule) | ||
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@0d4a2b2b009c87b5c366d0b97f7a8d7de2f60760 | ||
if: github.event_name != 'workflow_dispatch' | ||
with: | ||
test_path: .github/e2e-tests.yml | ||
chainlink_version: ${{ github.sha }} | ||
|
@@ -32,8 +70,9 @@ jobs: | |
LOKI_TENANT_ID: ${{ secrets.LOKI_TENANT_ID }} | ||
LOKI_URL: ${{ secrets.LOKI_URL }} | ||
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
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 }} | ||
AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} | ||
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,13 +133,6 @@ testdb-force: ## Prepares the test database, drops any pesky user connections th | |
testdb-user-only: ## Prepares the test database with user only. | ||
go run . local db preparetest --user-only | ||
|
||
# Format for CI | ||
.PHONY: presubmit | ||
presubmit: ## Format go files and imports. | ||
goimports -w . | ||
gofmt -w . | ||
go mod tidy | ||
|
||
.PHONY: gomods | ||
gomods: ## Install gomods | ||
go install github.com/jmank88/[email protected] | ||
|
Oops, something went wrong.