Skip to content

Commit

Permalink
Merge branch 'develop' into tt_922_automation_seth
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Apr 24, 2024
2 parents da267d8 + 99dd165 commit c2a6f5c
Show file tree
Hide file tree
Showing 383 changed files with 3,728 additions and 2,376 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-penguins-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Fix in memory data source cache changes/bug that only allowed pipeline results where none of the data sources failed. #bugfix
5 changes: 5 additions & 0 deletions .changeset/chilled-bikes-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Add script to create test database user and update docs
5 changes: 5 additions & 0 deletions .changeset/four-shoes-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Removed AppConfig from Evm config #internal
5 changes: 5 additions & 0 deletions .changeset/kind-deers-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

bump mockery in makefile #updated
6 changes: 6 additions & 0 deletions .changeset/lovely-jeans-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"chainlink": minor
---

#nops : Enable configurable client error regexes for error classification
#added : New toml configuration options for [EVM.NodePool.Errors] to pass regexes on NonceTooLow, NonceTooHigh, ReplacementTransactionUnderpriced, LimitReached, TransactionAlreadyInMempool, TerminallyUnderpriced, InsufficientEth, TxFeeExceedsCap, L2FeeTooLow, L2FeeTooHigh, L2Full, TransactionAlreadyMined, Fatal, and ServiceUnavailable.
2 changes: 1 addition & 1 deletion .changeset/new-forks-grab.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"chainlink": removed
"chainlink": patch
---

Drop unused queryTimeout config from TXM strategy #internal
5 changes: 5 additions & 0 deletions .changeset/sour-needles-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

cleanup set #bugfix
7 changes: 7 additions & 0 deletions .changeset/stale-terms-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"chainlink": patch
---

Bump libocr => fd3cab206b2ca3b7ff207996b95673b2d6303ec4

#internal
3 changes: 2 additions & 1 deletion .github/actions/build-chainlink-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ runs:
AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }}
- name: Build Image
if: steps.check-image.outputs.exists != 'true'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.14
with:
cl_repo: smartcontractkit/chainlink
cl_ref: ${{ inputs.git_commit_sha }}
cl_dockerfile: ${{ inputs.dockerfile }}
push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }}
QA_AWS_REGION: ${{ inputs.AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }}
GO_COVER_FLAG: true
dep_evm_sha: ${{ inputs.dep_evm_sha }}
- name: Print Chainlink Image Built
shell: sh
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/build-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,44 +56,6 @@ jobs:
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }}
git-commit-sha: ${{ steps.git-ref.outputs.checked-out || github.sha }}

- name: Setup GAP
# Don't run for plugins.
if: matrix.image.name == ''
uses: smartcontractkit/.github/actions/setup-gap@1bc7ce34fa81fffcb4a6eb0e4e12e59d94d0fc8f # [email protected]
with:
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_SAND }}
api-gateway-host: ${{ secrets.AWS_API_GW_HOST_K8S_SAND }}
use-k8s: "true"
k8s-cluster-name: ${{ secrets.AWS_EKS_CLUSTER_NAME_SAND }}
use-private-ecr-registry: true
ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
metrics-job-name: push-chainlink-develop ${{ matrix.image.name }}
gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }}
gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}

# A mutable image tag is used for these CRIBs and it was just built/published
# from this workflow. The deployment has an `imagePullPolicy: Always` set, so
# we need to restart the deployments to pick up the new image.
- name: Restart K8s Deployments for CRIBs
# Don't run for plugins.
if: matrix.image.name == ''
shell: bash
run: |
set -euo pipefail
# Removes the "smartcontractkit/" (org name) prefix.
REPO_NAME_ONLY="${GITHUB_REPOSITORY##*/}"
K8S_NAMESPACE="crib-${REPO_NAME_ONLY}-develop"
deployment_node_names=$(kubectl --namespace "${K8S_NAMESPACE}" \
get deployments \
-l "app=${K8S_NAMESPACE}" \
-o custom-columns=:metadata.name --no-headers)
echo "Restarting deployments: $deployment_node_names"
kubectl rollout restart deployment $deployment_node_names --namespace "${K8S_NAMESPACE}"
- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
if: ${{ needs.filter.outputs.changes == 'true' }}
uses: ./.github/actions/setup-go
- name: Run short tests
if: ${{ needs.filter.outputs.changes == 'true' }}
run: go test -short ./...
- name: Setup Solana
if: ${{ needs.filter.outputs.changes == 'true' }}
Expand Down Expand Up @@ -170,8 +171,16 @@ jobs:
run: |
cat output.txt | gotestloghelper -ci
- name: Print Races
id: print-races
if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && needs.filter.outputs.changes == 'true' }}
run: find race.* | xargs cat
run: |
find race.* | xargs cat > race.txt
if [[ -s race.txt ]]; then
cat race.txt
echo "post_to_slack=true" >> $GITHUB_OUTPUT
else
echo "post_to_slack=false" >> $GITHUB_OUTPUT
fi
- name: Print postgres logs
if: ${{ always() && needs.filter.outputs.changes == 'true' }}
run: docker compose logs postgres | tee ../../../postgres_logs.txt
Expand All @@ -188,7 +197,7 @@ jobs:
./coverage.txt
./postgres_logs.txt
- name: Notify Slack
if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && (github.event_name == 'merge_group' || github.event.branch == 'develop') && needs.filter.outputs.changes == 'true' }}
if: ${{ failure() && steps.print-races.outputs.post_to_slack == 'true' && matrix.type.cmd == 'go_core_race_tests' && (github.event_name == 'merge_group' || github.event.branch == 'develop') && needs.filter.outputs.changes == 'true' }}
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
env:
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
Expand Down
77 changes: 72 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ jobs:
## 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@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639
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
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand All @@ -394,6 +394,16 @@ jobs:
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

- name: Upload Coverage Data
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: cl-node-coverage-data-${{ matrix.product.name }}
path: .covdata
retention-days: 1

- name: Print failed test summary
if: always()
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
Expand Down Expand Up @@ -466,7 +476,7 @@ jobs:
## Run this step when changes that require tests to be run are made
- name: Run Tests
if: needs.changes.outputs.src == 'true'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.11
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
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand All @@ -486,6 +496,15 @@ jobs:
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

- name: Upload Coverage Data
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: cl-node-coverage-data-${{ matrix.product.name }}
path: .covdata
retention-days: 1

eth-smoke-tests-matrix:
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
Expand Down Expand Up @@ -668,7 +687,7 @@ jobs:
## 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@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639
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
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand All @@ -688,6 +707,16 @@ jobs:
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

- name: Upload Coverage Data
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
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'
Expand Down Expand Up @@ -780,6 +809,26 @@ jobs:
this-job-name: Clean up integration environment deployments
continue-on-error: true

show-coverage:
name: Show Chainlink Node Go Coverage
if: always()
needs: [cleanup]
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
repository: smartcontractkit/chainlink
ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
- name: Download All Artifacts
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
with:
path: cl-node-coverage-data
pattern: cl-node-coverage-data-*
merge-multiple: true
- name: Show Coverage
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:
Expand Down Expand Up @@ -852,7 +901,7 @@ jobs:
upgradeImage: ${{ env.UPGRADE_IMAGE }}
upgradeVersion: ${{ env.UPGRADE_VERSION }}
- name: Run Migration Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.11
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand All @@ -870,6 +919,15 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
go_coverage_src_dir: /var/tmp/go-coverage
go_coverage_dest_dir: ${{ github.workspace }}/.covdata
- name: Upload Coverage Data
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: cl-node-coverage-data-migration-tests
path: .covdata
retention-days: 1

- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand Down Expand Up @@ -1152,7 +1210,7 @@ jobs:
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Run Tests
if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.11
with:
test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} && make test_smoke
cl_repo: ${{ env.CHAINLINK_IMAGE }}
Expand All @@ -1170,4 +1228,13 @@ jobs:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ""
run_setup: false
go_coverage_src_dir: /var/tmp/go-coverage
go_coverage_dest_dir: ${{ github.workspace }}/.covdata

- name: Upload Coverage Data
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: cl-node-coverage-data-solana-tests
path: .covdata
retention-days: 1

8 changes: 4 additions & 4 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ jobs:
echo "Bumping version to ${{ needs.tag-check.outputs.pre-release-version }}"
pnpm version ${{ needs.tag-check.outputs.pre-release-version }} --no-git-tag-version --no-commit-hooks --no-git-checks
- name: Publish to NPM (Dry Run)
uses: smartcontractkit/.github/actions/ci-publish-npm@e1c9d45fc66369d6be5d3863c65af1750797a7f5 # ci-publish-npm@0.3.0
- name: Publish to NPM (beta)
uses: smartcontractkit/.github/actions/ci-publish-npm@4b0ab756abcb1760cb82e1e87b94ff431905bffc # ci-publish-npm@0.4.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}
create-github-release: false
Expand Down Expand Up @@ -254,8 +254,8 @@ jobs:
exit 1
fi
- name: Publish to NPM (Dry Run)
uses: smartcontractkit/.github/actions/ci-publish-npm@e1c9d45fc66369d6be5d3863c65af1750797a7f5 # ci-publish-npm@0.3.0
- name: Publish to NPM (latest)
uses: smartcontractkit/.github/actions/ci-publish-npm@4b0ab756abcb1760cb82e1e87b94ff431905bffc # ci-publish-npm@0.4.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ tools/clroot/db.sqlite3-wal
.DS_Store
.envrc
.env*
.dbenv
!charts/chainlink-cluster/.env.example
!crib/.env.example
!.github/actions/setup-postgres/.env
.direnv
.idea
Expand All @@ -49,6 +51,7 @@ output.txt
race.*
golangci-lint-output.txt
/golangci-lint/
.covdata

# DB state
./db/
Expand Down
10 changes: 9 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ docs: ## Install and run pkgsite to view Go docs
install-chainlink: operator-ui ## Install the chainlink binary.
go install $(GOFLAGS) .

.PHONY: install-chainlink-cover
install-chainlink-cover: operator-ui ## Install the chainlink binary with cover flag.
go install -cover $(GOFLAGS) .

.PHONY: chainlink
chainlink: ## Build the chainlink binary.
go build $(GOFLAGS) .
Expand Down Expand Up @@ -104,6 +108,10 @@ testscripts: chainlink-test ## Install and run testscript against testdata/scrip
testscripts-update: ## Update testdata/scripts/* files via testscript.
make testscripts TS_FLAGS="-u"

.PHONY: setup-testdb
setup-testdb: ## Setup the test database.
./core/scripts/setup_testdb.sh

.PHONY: testdb
testdb: ## Prepares the test database.
go run . local db preparetest
Expand All @@ -125,7 +133,7 @@ gomods: ## Install gomods

.PHONY: mockery
mockery: $(mockery) ## Install mockery.
go install github.com/vektra/mockery/v2@v2.38.0
go install github.com/vektra/mockery/v2@v2.42.2

.PHONY: codecgen
codecgen: $(codecgen) ## Install codecgen
Expand Down
Loading

0 comments on commit c2a6f5c

Please sign in to comment.