Skip to content

Commit

Permalink
Merge branch 'develop' into bug/fix-batch-tx-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-momin authored Dec 11, 2023
2 parents 6f4e4dc + 1a45097 commit fc715bb
Show file tree
Hide file tree
Showing 246 changed files with 9,255 additions and 1,097 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci-chaincli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ name: chaincli CI

on:
push:
paths:
- "core/scripts/chaincli/**"
pull_request:
paths:
- "core/scripts/chaincli/**"

jobs:
golangci:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,13 @@ jobs:
PYROSCOPE_SERVER: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725
PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }}
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }}
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
LOGSTREAM_LOG_TARGETS: ${{ vars.LOGSTREAM_LOG_TARGETS }}
GRAFANA_URL: ${{ vars.GRAFANA_URL }}
GRAFANA_DATASOURCE: ${{ vars.GRAFANA_DATASOURCE }}
RUN_ID: ${{ github.run_id }}
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 | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand Down Expand Up @@ -487,6 +494,27 @@ jobs:
with:
name: trace-data
path: ./integration-tests/smoke/traces/trace-data.json
- name: Print failed test summary
if: always()
run: |
directory="./integration-tests/smoke/.test_summary"
files=("$directory"/*)
if [ -d "$directory" ]; then
echo "Test summary folder found"
if [ ${#files[@]} -gt 0 ]; then
first_file="${files[0]}"
echo "Name of the first test summary file: $(basename "$first_file")"
echo "### Failed Test Execution Logs Dashboard (over VPN):" >> $GITHUB_STEP_SUMMARY
cat "$first_file" | jq -r '.loki[] | "* [\(.test_name)](\(.value))"' >> $GITHUB_STEP_SUMMARY
if [ ${#files[@]} -gt 1 ]; then
echo "Found more than one test summary file. This is incorrect, there should be only one file"
fi
else
echo "Test summary directory is empty. This should not happen"
fi
else
echo "No test summary folder found. If no test failed or log collection wasn't explicitly requested this is correct. Exiting"
fi
### Used to check the required checks box when the matrix completes
eth-smoke-tests:
Expand Down
881 changes: 709 additions & 172 deletions .github/workflows/live-testnet-tests.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ go.work*

# This sometimes shows up for some reason
tools/flakeytests/coverage.txt

.test_summary/
.run.id
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
golang 1.21.4
mockery 2.35.4
golang 1.21.5
mockery 2.38.0
nodejs 16.16.0
postgres 13.3
helm 3.10.3
Expand Down
6 changes: 5 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ presubmit: ## Format go files and imports.

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

.PHONY: codecgen
codecgen: $(codecgen) ## Install codecgen
Expand Down Expand Up @@ -147,6 +147,10 @@ goreleaser-dev-build: ## Run goreleaser snapshot build
goreleaser-dev-release: ## run goreleaser snapshot release
./tools/bin/goreleaser_wrapper release --snapshot --rm-dist --config ${GORELEASER_CONFIG}

.PHONY: modgraph
modgraph:
./tools/bin/modgraph > go.md

help:
@echo ""
@echo " .__ .__ .__ .__ __"
Expand Down
12 changes: 4 additions & 8 deletions charts/chainlink-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ nix develop
## New cluster
We are using [devspace](https://www.devspace.sh/docs/getting-started/installation?x0=3)

Configure the cluster, see `deployments.app.helm.values` and [values.yaml](./values.yaml) comments
Configure the cluster, see `deployments.app.helm.values` and [values.yaml](./values.yaml) comments for more details

Set your registry for the image, example for `ECR`:
```
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin ${aws_account}.dkr.ecr.us-west-2.amazonaws.com
export DEVSPACE_IMAGE="${aws_account}.dkr.ecr.us-west-2.amazonaws.com/chainlink-devspace"
```
Enter the shell and deploy
```
# set your unique namespace if it's a new cluster
Expand All @@ -45,11 +40,12 @@ Fix something in the code locally, it'd automatically sync, rebuild it inside co
make chainlink
make chainlink-local-start
```
If you need to update the whole cluster run `deploy` again with a new set of images

Reset the pod to original image
```
devspace reset pods
devspace deploy
```

Destroy the cluster
```
devspace purge
Expand Down
34 changes: 18 additions & 16 deletions charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ deployments:
- name: node-1
image: ${DEVSPACE_IMAGE}
version: latest
# default resources are 300m/1Gi
# first node need more resources to build faster inside container
# at least 2Gi of memory is required otherwise build will fail (OOM)
resources:
requests:
cpu: 2000m
memory: 2048Mi
limits:
cpu: 2000m
memory: 2048Mi
# override default config per node
# for example, use OCRv2 P2P setup, the whole config
# toml: |
Expand Down Expand Up @@ -105,13 +115,6 @@ deployments:
- name: node-6
image: ${DEVSPACE_IMAGE}
version: latest
resources:
requests:
cpu: 350m
memory: 1024Mi
limits:
cpu: 350m
memory: 1024Mi

# each CL node have a dedicated PostgreSQL 11.15
# use StatefulSet by setting:
Expand Down Expand Up @@ -231,7 +234,7 @@ profiles:
patches:
- op: replace
path: dev.app.workingDir
value: /home/root/chainlink/integration-tests
value: /home/chainlink/integration-tests
- op: replace
path: dev.app.container
value: runner
Expand All @@ -256,21 +259,20 @@ profiles:
# This is a list of `dev` containers that are based on the containers created by your deployments
dev:
app:
workingDir: /home/root/chainlink
workingDir: /home/chainlink
container: node
labelSelector:
instance: node-1
# Sync files between the local filesystem and the development container
sync:
- path: ../../core/services/chainlink:/home/root/chainlink/core/services/chainlink
- path: ../../core/services/chainlink:/home/chainlink/core/services/chainlink
printLogs: true
disableDownload: true
- path: ../..:/home/root/chainlink
- path: ../..:/home/chainlink
printLogs: true
disableDownload: true
uploadExcludePaths:
- integration-tests/
- .git/
- .github/
- belt/
- charts/
Expand All @@ -280,16 +282,16 @@ dev:
- integration-scripts/
- testdata/
- evm-test-helpers/
- tools/
# Open a terminal and use the following command
terminal:
command: bash
ssh:
enabled: true
proxyCommands:
- command: devspace
- command: kubectl
- command: helm
# TODO: access issues
# - command: devspace
# - command: kubectl
# - command: helm
- gitCredentials: true
ports:
- port: "2345"
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ spec:
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 20
{{ if (hasKey $.Values.chainlink "resources") }}
{{ if (hasKey $cfg "resources") }}
resources:
requests:
memory: {{ default "1024Mi" $.Values.chainlink.resources.requests.memory }}
cpu: {{ default "500m" $.Values.chainlink.resources.requests.cpu }}
memory: {{ default "1024Mi" $cfg.resources.requests.memory }}
cpu: {{ default "300m" $cfg.resources.requests.cpu }}
limits:
memory: {{ default "1024Mi" $.Values.chainlink.resources.limits.memory }}
cpu: {{ default "500m" $.Values.chainlink.resources.limits.cpu }}
memory: {{ default "1024Mi" $cfg.resources.limits.memory }}
cpu: {{ default "300m" $cfg.resources.limits.cpu }}
{{ else }}
{{ end }}
{{- with $.Values.nodeSelector }}
Expand Down
10 changes: 10 additions & 0 deletions charts/chainlink-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ chainlink:
nodes:
- name: node-1
image: "public.ecr.aws/chainlink/chainlink:latest"
# default resources are 300m/1Gi
# first node need more resources to build faster inside container
# at least 2Gi of memory is required otherwise build will fail (OOM)
resources:
requests:
cpu: 2000m
memory: 2048Mi
limits:
cpu: 2000m
memory: 2048Mi
# override default config per node
# for example, use OCRv2 P2P setup, the whole config
# toml: |
Expand Down
10 changes: 9 additions & 1 deletion common/client/mock_head_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 25 additions & 1 deletion common/client/mock_node_client_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion common/client/mock_node_selector_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc715bb

Please sign in to comment.