Skip to content

Commit 5623134

Browse files
authored
Merge branch 'main' into fix-skip-nonce-errors
2 parents efc2ad7 + c0b7401 commit 5623134

File tree

162 files changed

+16878
-3313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+16878
-3313
lines changed

.changeset/curly-llamas-glow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/whole-symbols-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink-deployments-framework": minor
3+
---
4+
5+
add error decode command

.github/CODEOWNERS

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
# Root
2-
* @smartcontractkit/cld-team
3-
4-
engine/cld/legacy/cli/mcmsv2 @smartcontractkit/devex-tooling @smartcontractkit/cld-team
5-
experimental/analyzers @smartcontractkit/devex-tooling @smartcontractkit/cld-team
6-
experimental/proposalutils @smartcontractkit/devex-tooling @smartcontractkit/cld-team
2+
* @smartcontractkit/operations-platform

.github/workflows/pull-request-main.yml

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
# disable the checkptr runtime check due a false positive in github.com/xssnick/tonutils-go
4646
# causing tests in ci to fail "fatal error: checkptr: pointer arithmetic result points to invalid allocation"
4747
# https://github.com/xssnick/tonutils-go/issues/310
48-
# Exclude provider packages which use Docker containers
49-
go-test-cmd: go test -race -gcflags=all=-d=checkptr=0 -coverprofile=coverage.txt $(go list ./... | grep -v '/provider')
48+
# Exclude provider packages which use Docker containers and remote catalog tests
49+
go-test-cmd: go test -race -gcflags=all=-d=checkptr=0 -coverprofile=coverage.txt $(go list ./... | grep -v '/provider' | grep -v '/catalog/remote')
5050
use-go-cache: true
5151
artifact-name: unit-tests
5252

@@ -71,11 +71,75 @@ jobs:
7171
use-go-cache: true
7272
artifact-name: provider-tests
7373

74+
ci-test-catalog-remote:
75+
name: Catalog Remote Tests
76+
runs-on: ubuntu-latest
77+
timeout-minutes: 15
78+
permissions:
79+
id-token: write
80+
contents: read
81+
actions: read
82+
steps:
83+
- name: Checkout code
84+
uses: actions/checkout@v5
85+
86+
- name: Configure AWS credentials for ECR
87+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
88+
with:
89+
role-to-assume: ${{ secrets.ECR_READ_ROLE_ARN }}
90+
aws-region: ${{ secrets.AWS_REGION }}
91+
92+
- name: Get latest catalog service tag from ECR
93+
id: get-catalog-tag
94+
run: |
95+
# Fetch the latest semantic version tag from ECR
96+
# Sort images by push date (latest first) and find the first semver tag
97+
LATEST_TAG=$(aws ecr describe-images \
98+
--repository-name op-catalog-service \
99+
--region ${{ secrets.AWS_REGION }} \
100+
--registry-id ${{ secrets.AWS_ACCOUNT_NUMBER_PROD }} \
101+
--query 'reverse(sort_by(imageDetails,& imagePushedAt))' \
102+
--output json | \
103+
jq -r '
104+
[.[] |
105+
select(.imageTags != null) |
106+
.imageTags[] |
107+
select(test("^v[0-9]+\\.[0-9]+\\.[0-9]+$"))
108+
] | first
109+
')
110+
111+
if [[ -z "${LATEST_TAG}" ]] || [[ "${LATEST_TAG}" == "null" ]]; then
112+
echo "::error::Could not find a valid semantic version tag in ECR"
113+
exit 1
114+
fi
115+
116+
echo "Latest catalog service tag from ECR: ${LATEST_TAG}"
117+
echo "tag=${LATEST_TAG}" >> "${GITHUB_OUTPUT}"
118+
119+
- name: Pull Catalog Service ECR Image
120+
uses: smartcontractkit/.github/actions/pull-private-ecr-image@2f8f0baf38e46140c6a119eb551a56eaaabcc09e # pull-private-ecr-image@1.0.0
121+
with:
122+
aws-account-number: ${{ secrets.AWS_ACCOUNT_NUMBER_PROD }}
123+
aws-region: ${{ secrets.AWS_REGION }}
124+
aws-role-arn: ${{ secrets.ECR_READ_ROLE_ARN }}
125+
ecr-repository: "op-catalog-service"
126+
image-tag: ${{ steps.get-catalog-tag.outputs.tag }}
127+
128+
- name: Run Catalog Remote Integration Tests
129+
uses: smartcontractkit/.github/actions/ci-test-go@dfcba48f05933158428bce867d790e3d5a9baa6b # ci-test-go@1.1.0
130+
with:
131+
# Must cd into datastore/catalog/remote because TestMain only runs from package directory
132+
go-test-cmd: cd datastore/catalog/remote && go test -v -race -timeout 10m -gcflags=all=-d=checkptr=0 -coverprofile=../../../coverage.txt
133+
use-go-cache: true
134+
artifact-name: catalog-remote-tests
135+
env:
136+
CATALOG_SERVICE_IMAGE: ${{ secrets.AWS_ACCOUNT_NUMBER_PROD }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/op-catalog-service:${{ steps.get-catalog-tag.outputs.tag }}
137+
74138
sonarqube:
75139
name: Sonar Scan
76140
if: github.event_name == 'pull_request'
77141
runs-on: ubuntu-24.04
78-
needs: [ci-test, ci-test-provider, ci-lint-misc, ci-lint]
142+
needs: [ci-test, ci-test-provider, ci-test-catalog-remote, ci-lint-misc, ci-lint]
79143
permissions:
80144
contents: read
81145
actions: read

.github/workflows/schedule-main.yml

Lines changed: 87 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,101 @@ jobs:
4040
actions: read
4141
steps:
4242
- name: Build and test
43-
uses: smartcontractkit/.github/actions/ci-test-go@eeb76b5870e3c17856d5a60fd064a053c023b5f5 # ci-test-go@1.0.0
43+
uses: smartcontractkit/.github/actions/ci-test-go@dfcba48f05933158428bce867d790e3d5a9baa6b # ci-test-go@1.1.0
44+
with:
45+
# disable the checkptr runtime check due a false positive in github.com/xssnick/tonutils-go
46+
# Exclude provider packages which use Docker containers and remote catalog tests
47+
go-test-cmd: go test -race -gcflags=all=-d=checkptr=0 -coverprofile=coverage.txt $(go list ./... | grep -v '/provider' | grep -v '/catalog/remote')
48+
use-go-cache: true
49+
artifact-name: unit-tests
50+
51+
ci-test-provider:
52+
name: Provider Tests
53+
runs-on: ubuntu-latest
54+
timeout-minutes: 10
55+
permissions:
56+
id-token: write
57+
contents: read
58+
actions: read
59+
steps:
60+
- name: Build and test provider packages
61+
uses: smartcontractkit/.github/actions/ci-test-go@dfcba48f05933158428bce867d790e3d5a9baa6b # ci-test-go@1.1.0
4462
with:
4563
# disable the checkptr runtime check due a false positive in github.com/xssnick/tonutils-go
46-
# causing tests in ci to fail "fatal error: checkptr: pointer arithmetic result points to invalid allocation"
47-
# https://github.com/xssnick/tonutils-go/issues/310
4864
# -p 2 -parallel 3 = 2 packages, 3 tests max = 6 containers max
49-
go-test-cmd: go test -race -gcflags=all=-d=checkptr=0 -p 2 -parallel 3 -coverprofile=coverage.txt $(go list ./...)
65+
# Only run provider packages which use Docker containers
66+
go-test-cmd: go test -race -gcflags=all=-d=checkptr=0 -p 2 -parallel 3 -coverprofile=coverage.txt $(go list ./... | grep '/provider')
67+
use-go-cache: true
68+
artifact-name: provider-tests
69+
70+
ci-test-catalog-remote:
71+
name: Catalog Remote Tests
72+
runs-on: ubuntu-latest
73+
timeout-minutes: 15
74+
permissions:
75+
id-token: write
76+
contents: read
77+
actions: read
78+
steps:
79+
- name: Checkout code
80+
uses: actions/checkout@v5
81+
82+
- name: Configure AWS credentials for ECR
83+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
84+
with:
85+
role-to-assume: ${{ secrets.ECR_READ_ROLE_ARN }}
86+
aws-region: ${{ secrets.AWS_REGION }}
87+
88+
- name: Get latest catalog service tag from ECR
89+
id: get-catalog-tag
90+
run: |
91+
# Fetch the latest semantic version tag from ECR
92+
# Sort images by push date (latest first) and find the first semver tag
93+
LATEST_TAG=$(aws ecr describe-images \
94+
--repository-name op-catalog-service \
95+
--region ${{ secrets.AWS_REGION }} \
96+
--registry-id ${{ secrets.AWS_ACCOUNT_NUMBER_PROD }} \
97+
--query 'reverse(sort_by(imageDetails,& imagePushedAt))' \
98+
--output json | \
99+
jq -r '
100+
[.[] |
101+
select(.imageTags != null) |
102+
.imageTags[] |
103+
select(test("^v[0-9]+\\.[0-9]+\\.[0-9]+$"))
104+
] | first
105+
')
106+
107+
if [[ -z "${LATEST_TAG}" ]] || [[ "${LATEST_TAG}" == "null" ]]; then
108+
echo "::error::Could not find a valid semantic version tag in ECR"
109+
exit 1
110+
fi
111+
112+
echo "Latest catalog service tag from ECR: ${LATEST_TAG}"
113+
echo "tag=${LATEST_TAG}" >> "${GITHUB_OUTPUT}"
114+
115+
- name: Pull Catalog Service ECR Image
116+
uses: smartcontractkit/.github/actions/pull-private-ecr-image@2f8f0baf38e46140c6a119eb551a56eaaabcc09e # pull-private-ecr-image@1.0.0
117+
with:
118+
aws-account-number: ${{ secrets.AWS_ACCOUNT_NUMBER_PROD }}
119+
aws-region: ${{ secrets.AWS_REGION }}
120+
aws-role-arn: ${{ secrets.ECR_READ_ROLE_ARN }}
121+
ecr-repository: "op-catalog-service"
122+
image-tag: ${{ steps.get-catalog-tag.outputs.tag }}
123+
124+
- name: Run Catalog Remote Integration Tests
125+
uses: smartcontractkit/.github/actions/ci-test-go@dfcba48f05933158428bce867d790e3d5a9baa6b # ci-test-go@1.1.0
126+
with:
127+
# Must cd into datastore/catalog/remote because TestMain only runs from package directory
128+
go-test-cmd: cd datastore/catalog/remote && go test -v -race -timeout 10m -gcflags=all=-d=checkptr=0 -coverprofile=../../../coverage.txt
50129
use-go-cache: true
130+
artifact-name: catalog-remote-tests
131+
env:
132+
CATALOG_SERVICE_IMAGE: ${{ secrets.AWS_ACCOUNT_NUMBER_PROD }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/op-catalog-service:${{ steps.get-catalog-tag.outputs.tag }}
51133

52134
sonarqube:
53135
name: Sonar Scan
54136
runs-on: ubuntu-24.04
55-
needs: [ci-test, ci-lint-misc, ci-lint]
137+
needs: [ci-test, ci-test-provider, ci-test-catalog-remote, ci-lint-misc, ci-lint]
56138
permissions:
57139
contents: read
58140
actions: read

.mockery.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,29 @@ packages:
8181
filename: "mock_{{.InterfaceName | snakecase}}.go"
8282
interfaces:
8383
NodeServiceClient:
84+
github.com/smartcontractkit/chainlink-deployments-framework/datastore:
85+
config:
86+
all: false
87+
filename: "mock_{{.InterfaceName | snakecase}}_test.go"
88+
structname: "{{.Mock}}{{.InterfaceName | firstUpper }}"
89+
interfaces:
90+
CatalogStore:
91+
MutableRefStoreV2:
92+
MutableStoreV2:
93+
MutableUnaryStoreV2:
94+
github.com/smartcontractkit/chainlink-deployments-framework/chain/evm:
95+
config:
96+
all: false
97+
dir: "{{.InterfaceDir}}"
98+
filename: "mock_{{.InterfaceName | snakecase}}.go"
99+
structname: "{{.Mock}}{{.InterfaceName}}"
100+
interfaces:
101+
OnchainClient:
102+
github.com/smartcontractkit/chainlink-deployments-framework/experimental/analyzer:
103+
config:
104+
all: false
105+
dir: "{{.InterfaceDir}}"
106+
filename: "mock_{{.InterfaceName | snakecase}}.go"
107+
structname: "{{.Mock}}{{.InterfaceName}}"
108+
interfaces:
109+
ProposalContext:

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
golang 1.24.4
1+
golang 1.24.5
22
golangci-lint 2.5.0
33
mockery 3.3.4
44
nodejs 20.16.0

0 commit comments

Comments
 (0)