Skip to content

Commit

Permalink
Merge pull request #11292 from smartcontractkit/chore/release-2.7.0-t…
Browse files Browse the repository at this point in the history
…o-master

release/2.7.0 -> master
  • Loading branch information
chainchad authored Nov 21, 2023
2 parents d3b056c + 05ea807 commit 2674b17
Show file tree
Hide file tree
Showing 1,147 changed files with 34,328 additions and 32,692 deletions.
10 changes: 8 additions & 2 deletions .github/actions/build-sign-publish-chainlink/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ inputs:
required: false

dockerfile:
description: Path to the Dockerfile (relative to the repo root)
default: core/chainlink.Dockerfile
required: false
ecr-hostname:
Expand All @@ -23,6 +24,11 @@ inputs:
default: chainlink/chainlink
required: false
ecr-tag-suffix:
description: Docker image tag suffix
required: false
git-commit-sha:
description: Git commit SHA used as metadata when building the application (appears in logs)
default: ${{ github.sha }}
required: false
aws-role-to-assume:
description: The AWS role to assume as the CD user, if any. Used in configuring the docker/login-action
Expand Down Expand Up @@ -74,7 +80,7 @@ runs:
)
SHARED_BUILD_ARGS=$(cat << EOF
COMMIT_SHA=${{ github.sha }}
COMMIT_SHA=${{ inputs.git-commit-sha }}
EOF
)
Expand Down Expand Up @@ -195,7 +201,7 @@ runs:
- if: inputs.sign-images == 'true'
name: Install cosign
uses: sigstore/cosign-installer@581838fbedd492d2350a9ecd427a95d6de1e5d01 # v2.1.0
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
with:
cosign-release: "v1.6.0"

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
file: ./integration-tests/test.Dockerfile
build-args: |
BASE_IMAGE=${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image
IMAGE_VERSION=v0.32.9
IMAGE_VERSION=v0.38.2
SUITES="${{ inputs.suites }}"
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
Expand Down
77 changes: 77 additions & 0 deletions .github/actions/golangci-lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI lint for Golang
description: Runs CI lint for Golang
inputs:
# general inputs
name:
description: Name of the lint action
default: lint
go-directory:
description: Go directory to run commands from
default: "."
# setup-go inputs
only-modules:
description: Set to 'true' to only cache modules
default: "false"
cache-version:
description: Set this to cache bust
default: "1"
go-version-file:
description: Set where the go version file is located at
default: "go.mod"
go-module-file:
description: Set where the go module file is located at
default: "go.sum"
# grafana cloud inputs
gc-host:
description: "grafana cloud hostname"
gc-basic-auth:
description: "grafana cloud basic auth"

runs:
using: composite
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/setup-go
with:
only-modules: ${{ inputs.only-modules }}
cache-version: ${{ inputs.cache-version }}
go-version-file: ${{ inputs.go-version-file }}
go-module-file: ${{ inputs.go-module-file }}
- name: Touching core/web/assets/index.html
shell: bash
run: mkdir -p core/web/assets && touch core/web/assets/index.html
- name: Build binary
if: ${{ inputs.go-directory == '.' }}
shell: bash
run: go build ./...
- name: Build binary
if: ${{ inputs.go-directory != '.' }}
working-directory: ${{ inputs.go-directory }}
shell: bash
run: go build
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.55.0
# We already cache these directories in setup-go
skip-pkg-cache: true
skip-build-cache: true
# only-new-issues is only applicable to PRs, otherwise it is always set to false
only-new-issues: true
args: --out-format colored-line-number,checkstyle:golangci-lint-report.xml
working-directory: ${{ inputs.go-directory }}
- name: Store lint report artifact
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: golangci-lint-report
path: ${{ inputs.go-directory }}/golangci-lint-report.xml
- name: Collect Metrics
if: always()
uses: smartcontractkit/push-gha-metrics-action@f4d2fcbe12e9e44921e0171d24085ab7d2a30bc9 # v2.0.1
with:
basic-auth: ${{ inputs.gc-basic-auth }}
hostname: ${{ inputs.gc-host }}
this-job-name: ${{ inputs.name }}
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
version: ${{ inputs.zig-version }}
- name: Setup cosign
if: inputs.enable-cosign == 'true'
uses: sigstore/cosign-installer@581838fbedd492d2350a9ecd427a95d6de1e5d01 # v2.1.0
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
with:
cosign-release: ${{ inputs.cosign-version }}
- name: Login to docker registry
Expand Down
87 changes: 49 additions & 38 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,64 @@
name: Setup Go
description: Setup Golang with efficient caching
description: Setup Golang with efficient caching
inputs:
only-modules:
description: Set to 'true' to only cache modules
default: 'false'
default: "false"
cache-version:
description: Set this to cache bust
default: "1"
go-version-file:
description: Set where the go version file is located at
default: "go.mod"
go-module-file:
description: Set where the go module file is located at
default: "go.sum"

runs:
using: composite
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
cache: false
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ${{ inputs.go-version-file }}
cache: false

- name: Get branch name
if: ${{ inputs.only-modules == 'false' }}
id: branch-name
uses: tj-actions/branch-names@2e5354c6733793113f416314375826df030ada23 #v6.5
- name: Get branch name
if: ${{ inputs.only-modules == 'false' }}
id: branch-name
uses: tj-actions/branch-names@2e5354c6733793113f416314375826df030ada23 #v6.5

- name: Set go cache keys
shell: bash
id: go-cache-dir
run: |
echo "gomodcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
echo "gobuildcache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- name: Set go cache keys
shell: bash
id: go-cache-dir
run: |
echo "gomodcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
echo "gobuildcache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Cache Go Modules
with:
path: |
${{ steps.go-cache-dir.outputs.gomodcache }}
# The lifetime of go modules is much higher than the build outputs, so we increase cache efficiency
# here by not having the primary key contain the branch name
key: ${{ runner.os }}-gomod-${{ inputs.cache-version }}-${{ hashFiles('./go.sum') }}
restore-keys: |
${{ runner.os }}-gomod-${{ inputs.cache-version }}-
- name: Set go module path
id: go-module-path
shell: bash
run: echo "path=./${{ inputs.go-module-file }}" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
if: ${{ inputs.only-modules == 'false' }}
name: Cache Go Build Outputs
with:
path: |
${{ steps.go-cache-dir.outputs.gobuildcache }}
# The lifetime of go build outputs is pretty short, so we make our primary cache key be the branch name
key: ${{ runner.os }}-gobuild-${{ inputs.cache-version }}-${{ hashFiles('./go.sum') }}-${{ steps.branch-name.outputs.current_branch }}
restore-keys: |
${{ runner.os }}-gobuild-${{ inputs.cache-version }}-${{ hashFiles('./go.sum') }}-
${{ runner.os }}-gobuild-${{ inputs.cache-version }}-
- uses: actions/cache@v3
name: Cache Go Modules
with:
path: |
${{ steps.go-cache-dir.outputs.gomodcache }}
# The lifetime of go modules is much higher than the build outputs, so we increase cache efficiency
# here by not having the primary key contain the branch name
key: ${{ runner.os }}-gomod-${{ inputs.cache-version }}-${{ hashFiles(steps.go-module-path.output.path) }}
restore-keys: |
${{ runner.os }}-gomod-${{ inputs.cache-version }}-
- uses: actions/cache@v3
if: ${{ inputs.only-modules == 'false' }}
name: Cache Go Build Outputs
with:
path: |
${{ steps.go-cache-dir.outputs.gobuildcache }}
# The lifetime of go build outputs is pretty short, so we make our primary cache key be the branch name
key: ${{ runner.os }}-gobuild-${{ inputs.cache-version }}-${{ hashFiles(steps.go-module-path.output.path) }}-${{ steps.branch-name.outputs.current_branch }}
restore-keys: |
${{ runner.os }}-gobuild-${{ inputs.cache-version }}-${{ hashFiles(steps.go-module-path.output.path) }}-
${{ runner.os }}-gobuild-${{ inputs.cache-version }}-
2 changes: 1 addition & 1 deletion .github/actions/setup-postgres/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POSTGRES_USER=postgres
POSTGRES_OPTIONS="-c max_connections=1000 -c shared_buffers=2GB"
POSTGRES_OPTIONS="-c max_connections=1000 -c shared_buffers=2GB -c log_lock_waits=true"
POSTGRES_PASSWORD=postgres
POSTGRES_DB=chainlink_test
POSTGRES_HOST_AUTH_METHOD=trust
2 changes: 2 additions & 0 deletions .github/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pages_branch: helm-release
packages_with_index: true
5 changes: 5 additions & 0 deletions .github/tracing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Distributed Tracing

These config files are for an OTEL collector, grafana Tempo, and a grafana UI instance to run as containers on the same network.

A localhost client can send gRPC calls to the server. The gRPC server is instrumented with open telemetry traces, which are sent to the OTEL collector and forwarded to the Tempo backend. The grafana UI can then read the trace data from the Tempo backend.
18 changes: 18 additions & 0 deletions .github/tracing/grafana-datasources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: 1

datasources:
- name: Tempo
type: tempo
access: proxy
orgId: 1
url: http://tempo:3200
basicAuth: false
isDefault: true
version: 1
editable: false
apiVersion: 1
uid: tempo
jsonData:
httpMethod: GET
serviceMap:
datasourceUid: prometheus
46 changes: 46 additions & 0 deletions .github/tracing/local-smoke-docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: "3"
services:

# ... the OpenTelemetry Collector configured to receive traces and export to Tempo ...
otel-collector:
image: otel/opentelemetry-collector:0.61.0
command: [ "--config=/etc/otel-collector.yaml" ]
volumes:
- ./otel-collector.yaml:/etc/otel-collector.yaml
ports:
- "4317:4317" # otlp grpc
depends_on:
- tempo
networks:
- tracing-network

# .. Which accepts requests from grafana ...
tempo:
image: grafana/tempo:latest
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/tmp/tempo
ports:
- "4317" # otlp grpc
networks:
- tracing-network

grafana:
image: grafana/grafana:9.4.3
volumes:
- ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
ports:
- "3000:3000"
networks:
- tracing-network

networks:
tracing-network:
name: tracing
driver: bridge
15 changes: 15 additions & 0 deletions .github/tracing/otel-collector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
exporters:
otlp:
endpoint: tempo:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp]
24 changes: 24 additions & 0 deletions .github/tracing/tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
server:
http_listen_port: 3200

distributor:
receivers:
otlp:
protocols:
http:
grpc:

ingester:
max_block_duration: 5m # cut the headblock when this much time passes. this is being set for demo purposes and should probably be left alone normally

compactor:
compaction:
block_retention: 1h # overall Tempo trace retention. set for demo purposes

storage:
trace:
backend: local # backend configuration to use
wal:
path: /tmp/tempo/wal # where to store the the wal locally
local:
path: /tmp/tempo/blocks
4 changes: 2 additions & 2 deletions .github/workflows/automation-benchmark-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
description: Chainlink image version to use
required: true
type: string
default: 2.0.0
default: 2.5.0
chainlinkImage:
description: Chainlink image repo to use
required: true
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Collect Metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec
uses: smartcontractkit/push-gha-metrics-action@f4d2fcbe12e9e44921e0171d24085ab7d2a30bc9 # v2.0.1
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
Expand Down
Loading

0 comments on commit 2674b17

Please sign in to comment.