Skip to content

Commit

Permalink
Post merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG authored and RensR committed Apr 8, 2024
1 parent 1540560 commit 8950cf3
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 189 deletions.
220 changes: 100 additions & 120 deletions .github/workflows/client-compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,54 +86,21 @@ jobs:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}

get-latest-available-images:
build-tests:
if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
needs: [ changes ]
environment: integration
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
geth_tag: ${{ env.GETH_TAG }}
nethermind_tag: ${{ env.NETHERMIND_TAG }}
besu_tag: ${{ env.BESU_TAG }}
erigon_tag: ${{ env.ERIGON_TAG }}
name: Build Tests Binary
runs-on: ubuntu-latest
steps:
# Setup AWS creds
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
with:
aws-region: ${{ secrets.QA_AWS_REGION }}
role-to-assume: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 3600
# Login to ECR
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
with:
mask-password: 'true'
env:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
- name: Get latest docker images from ECR
run: |
geth_tag=$(aws ecr describe-images --repository-name ethereum/client-go --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json | jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "GETH_TAG=$geth_tag" >> $GITHUB_ENV
echo "Geth latest tag: $geth_tag"
nethermind_tag=$(aws ecr describe-images --repository-name nethermind/nethermind --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json | jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "NETHERMIND_TAG=$nethermind_tag" >> $GITHUB_ENV
echo "Nethermind latest tag: $nethermind_tag"
besu_tag=$(aws ecr describe-images --repository-name hyperledger/besu --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json | jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "BESU_TAG=$besu_tag" >> $GITHUB_ENV
echo "Besu latest tag: $besu_tag"
erigon_tag=$(aws ecr describe-images --repository-name thorax/erigon --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json |jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "ERIGON_TAG=$erigon_tag" >> $GITHUB_ENV
echo "Erigon latest tag: $erigon_tag"
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: client-compatablility-build-tests
id: ccip-build-tests
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
Expand All @@ -154,6 +121,50 @@ jobs:
cache_restore_only: "true"
binary_name: tests

get-latest-available-images:
if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
needs: [ changes ]
environment: integration
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
geth_tag: ${{ env.GETH_TAG }}
nethermind_tag: ${{ env.NETHERMIND_TAG }}
besu_tag: ${{ env.BESU_TAG }}
erigon_tag: ${{ env.ERIGON_TAG }}
steps:
# Setup AWS creds
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
with:
aws-region: ${{ secrets.QA_AWS_REGION }}
role-to-assume: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 3600
# Login to ECR
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
with:
mask-password: 'true'
env:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
- name: Get latest docker images from ECR
run: |
geth_tag=$(aws ecr describe-images --repository-name ethereum/client-go --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json | jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "GETH_TAG=$geth_tag" >> $GITHUB_ENV
echo "Geth latest tag: $geth_tag"
nethermind_tag=$(aws ecr describe-images --repository-name nethermind/nethermind --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json | jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "NETHERMIND_TAG=$nethermind_tag" >> $GITHUB_ENV
echo "Nethermind latest tag: $nethermind_tag"
besu_tag=$(aws ecr describe-images --repository-name hyperledger/besu --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json | jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "BESU_TAG=$besu_tag" >> $GITHUB_ENV
echo "Besu latest tag: $besu_tag"
erigon_tag=$(aws ecr describe-images --repository-name thorax/erigon --region ${{ secrets.QA_AWS_REGION }} --query 'sort_by(imageDetails,& imageTags[0])[-10:]' --output json |jq -r '[.[] | .imageTags[] | {original: ., numeric: (ltrimstr("v") | (split(".") + ["0","0"])[:3] | map(tonumber) | .[0]*10000 + .[1]*100 + .[2])}] | max_by(.numeric) | .original')
echo "ERIGON_TAG=$erigon_tag" >> $GITHUB_ENV
echo "Erigon latest tag: $erigon_tag"
# End Build Test Dependencies

evm-compatibility-matrix:
Expand All @@ -179,56 +190,33 @@ jobs:
test: TestSmokeCCIPForBidirectionalLane
client: geth
timeout: 30m
pyroscope_env: ci-smoke-ocr-geth-simulated
- name: ocr-nethermind
test: TestOCRBasic
file: ocr
client: nethermind
timeout: 30m
pyroscope_env: ci-smoke-ocr-nethermind-simulated
# Will fail until https://github.com/hyperledger/besu/pull/6702 is merged and released
# - name: ocr-besu
# test: TestOCRBasic
# file: ocr
pyroscope_env: ci-ccip-bidirectionallane-geth
chainConfig: "1337=ethereum/client-go:${{ needs.get-latest-available-images.outputs.geth_tag }},2337=ethereum/client-go:${{ needs.get-latest-available-images.outputs.geth_tag }}"
# uncomment when nethermind flake reason is addressed
# - name: bidirectionallane-nethermind
# test: TestSmokeCCIPForBidirectionalLane
# client: nethermind
# timeout: 30m
# pyroscope_env: ci-ccip-bidirectionallane-nethermind
# chainConfig: "1337=nethermind/nethermind:${{ needs.get-latest-available-images.outputs.nethermind_tag }},2337=nethermind/nethermind:${{ needs.get-latest-available-images.outputs.nethermind_tag }}"
# uncomment when 24.4.0 is released with our data/input fix
# - name: bidirectionallane-besu
# test: TestSmokeCCIPForBidirectionalLane
# client: besu
# timeout: 30m
# pyroscope_env: ci-smoke-ocr-besu-simulated
- name: ocr-erigon
test: TestOCRBasic
file: ocr
# pyroscope_env: ci-ccip-bidirectionallane-besu
# chainConfig: "1337=hyperledger/besu:${{ needs.get-latest-available-images.outputs.besu_tag }},2337=hyperledger/besu:${{ needs.get-latest-available-images.outputs.besu_tag }}"
- name: bidirectionallane-erigon
test: TestSmokeCCIPForBidirectionalLane
client: erigon
timeout: 30m
pyroscope_env: ci-smoke-ocr-erigon-simulated
- name: ocr2-geth
test: "^TestOCRv2Basic/plugins$"
file: ocr2
client: geth
timeout: 30m
pyroscope_env: ci-smoke-ocr2-geth-simulated
- name: ocr2-nethermind
test: "^TestOCRv2Basic/plugins$"
file: ocr2
client: nethermind
timeout: 30m
pyroscope_env: ci-smoke-nethermind-evm-simulated
# Will fail until https://github.com/hyperledger/besu/pull/6702 is merged and released
# - name: ocr2-besu
# test: "^TestOCRv2Basic/plugins$"
# file: ocr2
# client: besu
# timeout: 30m
# pyroscope_env: ci-smoke-ocr2-besu-simulated
- name: ocr2-erigon
test: "^TestOCRv2Basic/plugins$"
file: ocr2
client: erigon
timeout: 60m
pyroscope_env: ci-smoke-ocr2-erigon-simulated
pyroscope_env: ci-ccip-bidirectionallane-erigon
chainConfig: "1337=thorax/erigon:${{ needs.get-latest-available-images.outputs.erigon_tag }},2337=thorax/erigon:${{ needs.get-latest-available-images.outputs.erigon_tag }}"
runs-on: ubuntu-latest
name: CCIP Latest EVM Node Compatibility Test with ${{ matrix.client }}
steps:
- name: Download Tests Binary
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: smartcontractkit/ccip
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
Expand All @@ -241,46 +229,38 @@ jobs:
else
echo "run_command=./ccip-tests/smoke/ccip_test.go" >> "$GITHUB_OUTPUT"
fi
if [ -n "$PYROSCOPE_SERVER" ]; then
pyroscope_enabled=true
else
pyroscope_enabled=false
fi
cat << EOF > config.toml
[Network]
selected_networks=$selected_networks
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="$CHAINLINK_VERSION"
[Pyroscope]
enabled=$pyroscope_enabled
server_url="$PYROSCOPE_SERVER"
environment="$PYROSCOPE_ENVIRONMENT"
key_secret="$PYROSCOPE_KEY"
[PrivateEthereumNetwork]
ethereum_version="eth2"
consensus_layer="prysm"
execution_layer="$execution_layer"
wait_for_finalization=false
[PrivateEthereumNetwork.EthereumChainConfig]
chain_id=1337
genesis_delay=15
seconds_per_slot=3
validator_count=8
slots_per_epoch=2
addresses_to_fund=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"]
EOF
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
touch .root_dir
- name: Prepare Base64 TOML override
uses: ./.github/actions/setup-create-base64-config
with:
runId: ${{ github.run_id }}
testLogCollect: ${{ vars.TEST_LOG_COLLECT }}
selectedNetworks: ${{ env.SELECTED_NETWORKS }}
chainlinkImage: ${{ env.CHAINLINK_IMAGE }}
chainlinkVersion: ${{ github.sha }}
pyroscopeServer: ${{ matrix.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725
pyroscopeEnvironment: ${{ matrix.pyroscope_env }}
pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }}
lokiEndpoint: ${{ secrets.LOKI_URL_CI }}
lokiTenantId: ${{ vars.LOKI_TENANT_ID }}
lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }}
logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }}
grafanaUrl: ${{ vars.GRAFANA_URL }}
grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
- name: Prepare Base64 TOML override for CCIP secrets
uses: ./.github/actions/setup-create-base64-config-ccip
with:
runId: ${{ github.run_id }}
testLogCollect: ${{ vars.TEST_LOG_COLLECT }}
selectedNetworks: SIMULATED_1,SIMULATED_2
chainlinkImage: ${{ env.CHAINLINK_IMAGE }}
chainlinkVersion: ${{ github.sha }}
lokiEndpoint: ${{ secrets.LOKI_URL_CI }}
lokiTenantId: ${{ vars.LOKI_TENANT_ID }}
lokiBasicAuth: ${{ secrets.LOKI_BASIC_AUTH }}
logstreamLogTargets: ${{ vars.LOGSTREAM_LOG_TARGETS }}
grafanaUrl: ${{ vars.GRAFANA_URL }}
grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
customEvmNodes: ${{ matrix.chainConfig }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@7882cf348cd6a1f6bcf1ee8280185584ebba96e9 # v2.3.10
with:
Expand Down
69 changes: 3 additions & 66 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
publish-beta:
name: Publish Beta NPM
environment: publish-contracts
needs: [tag-check, changes, lint, prettier, native-compile, prepublish-test]
needs: [tag-check, changes, lint, prettier, native-compile]
runs-on: ubuntu-latest
if: needs.tag-check.outputs.is-pre-release == 'true'
steps:
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
publish-prod:
name: Publish Prod NPM
environment: publish-contracts
needs: [tag-check, changes, lint, prettier, native-compile, prepublish-test]
needs: [tag-check, changes, lint, prettier, native-compile]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -289,67 +289,4 @@ jobs:
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Publish Prod NPM
continue-on-error: true

publish-beta:
needs: [initialize, changes, native-compile, lint, prettier]
name: Publish Beta NPM
runs-on: ubuntu-latest
if: needs.initialize.outputs.is-pre-release == 'true'
steps:
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- name: Configure npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
- name: Publish Beta
run: pnpm publish-beta --publish-branch "${GITHUB_REF_NAME}" --no-git-checks
working-directory: contracts
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Publish-Beta
continue-on-error: true

publish-prod:
needs: [initialize, changes, native-compile, lint, prettier]
name: Publish Prod NPM
runs-on: ubuntu-latest
if: needs.initialize.outputs.is-release == 'true'
steps:
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- name: Create GitHub Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
tag_name: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
- name: Publish Prod
run: pnpm publish-prod --publish-branch "${GITHUB_REF_NAME}" --no-git-checks
working-directory: contracts
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Publish-Prod
continue-on-error: true
continue-on-error: true
9 changes: 7 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ abigen: ## Build & install abigen.
./tools/bin/build_abigen

.PHONY: generate
generate: abigen codecgen mockery protoc gomods ## Execute all go:generate commands.
gomods -w go generate -x ./...
generate: pnpmdep abigen codecgen mockery protoc gomods ## Execute all go:generate commands.
go generate -x ./...
cd ./core/scripts && go generate -x ./...
cd ./integration-tests && go generate -x ./...
cd ./integration-tests/load && go generate -x ./...
cd ./dashboard-lib && go generate -x ./...
cd ./charts/chainlink-cluster && go generate -x ./...

.PHONY: testscripts
testscripts: chainlink-test ## Install and run testscript against testdata/scripts/* files.
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"publish-beta": "pnpm publish --tag beta",
"publish-prod": "npm dist-tag add @chainlink/[email protected] latest",
"lint:ccip": "solhint --config ./src/v0.8/ccip/.solhint.json --ignore-path .ccip-solhint-ignore --max-warnings 0 \"./src/v0.8/ccip/**/*.sol\"",
"solhint": "solhint --max-warnings 18 \"./src/v0.8/**/*.sol\""
"solhint": "solhint --max-warnings 92 \"./src/v0.8/**/*.sol\""
},
"files": [
"src/v0.8/ccip/**/*.sol",
Expand Down

0 comments on commit 8950cf3

Please sign in to comment.