Skip to content

Commit

Permalink
Merge branch 'develop' into integration-test-runner-size-defaults-cle…
Browse files Browse the repository at this point in the history
…anup
  • Loading branch information
tateexon authored Apr 16, 2024
2 parents 2e826e7 + 6b0a7af commit fd7453c
Show file tree
Hide file tree
Showing 272 changed files with 4,042 additions and 13,153 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-crabs-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Add support for workflow jobs to Operator UI #wip #added
5 changes: 5 additions & 0 deletions .changeset/hot-dryers-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

core/services: update llo & versioning to use sqlutil #internal
5 changes: 5 additions & 0 deletions .changeset/many-pillows-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

core/services/keeper: switch to sqlutil.DataSource #internal
5 changes: 5 additions & 0 deletions .changeset/poor-socks-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

core/services/ocr2/plugins/ocr2keeper/evmregister/v21/upkeepstate: use sqlutil instead of pg.QOpts #internal
5 changes: 5 additions & 0 deletions .changeset/real-numbers-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

core/services/functions: switch to sqlutil.DataStore #internal
5 changes: 5 additions & 0 deletions .changeset/rich-jars-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Narrowing topic, data_word indexes by adding (evm_chain_id, address, event_sig) to the index definition #db_update
5 changes: 5 additions & 0 deletions .changeset/sweet-sloths-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

core/sessions: switch to sqlutil.DataSource #internal
5 changes: 5 additions & 0 deletions .changeset/swift-horses-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

core/bridges: use sqlutil.DataSource #internal
5 changes: 5 additions & 0 deletions .changeset/ten-clouds-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal
5 changes: 5 additions & 0 deletions .changeset/tender-crews-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

vrfv2plus - account for num words in coordinator gas overhead in v2plus wrapper
2 changes: 2 additions & 0 deletions .github/actions/build-sign-publish-chainlink/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ runs:
role-to-assume: ${{ inputs.aws-role-to-assume }}
role-duration-seconds: ${{ inputs.aws-role-duration-seconds }}
aws-region: ${{ inputs.aws-region }}
mask-aws-account-id: true
role-session-name: build-sign-publish-chainlink

- if: inputs.publish == 'true'
name: Login to ECR
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
tags:
- "v*"
branches:
- master
- "release/**"

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: "Build Chainlink"

on:
pull_request:
push:
branches:
- master

jobs:
build-chainlink:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ concurrency:
on:
push:
branches:
- master
- develop
- "release/*"
merge_group:
Expand All @@ -19,7 +18,7 @@ on:
workflow_dispatch:
inputs:
distinct_run_name:
description: 'A unique identifier for this run, used when running from other repos'
description: "A unique identifier for this run, used when running from other repos"
required: false
type: string
evm-ref:
Expand All @@ -29,7 +28,6 @@ on:
type: string

jobs:

filter: # No need to run core tests if there are only changes to the integration-tests
name: Detect Changes
permissions:
Expand Down Expand Up @@ -211,7 +209,7 @@ jobs:
needs: [filter, core]
name: Flakey Test Detection
runs-on: ubuntu-latest
if: ${{ always() && github.actor != 'dependabot[bot]' }}
if: ${{ always() && github.actor != 'dependabot[bot]' }}
env:
CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable
steps:
Expand All @@ -234,7 +232,7 @@ jobs:
- name: Touching core/web/assets/index.html
if: ${{ needs.filter.outputs.changes == 'true' }}
run: mkdir -p core/web/assets && touch core/web/assets/index.html
- name: Download Go vendor packages
- name: Download Go vendor packages
if: ${{ needs.filter.outputs.changes == 'true' }}
run: go mod download
- name: Replace chainlink-evm deps
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/goreleaser-build-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN }}
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true
role-session-name: goreleaser-build-publish-chainlink.push-chainlink-develop-goreleaser
- name: Build, sign, and publish image
id: build-sign-publish
uses: ./.github/actions/goreleaser-build-sign-publish
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/helm-chart-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_GATI }}
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true
role-session-name: helm-publish.helm-release

- name: Get Github Token
id: get-gh-token
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/operator-ui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ jobs:
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.AWS_OIDC_CHAINLINK_CI_OPERATOR_UI_ACCESS_TOKEN_ISSUER_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
role-duration-seconds: 3600
role-session-name: operator-ui-ci.check-gql
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true

- name: Get Github Token
id: get-gh-token
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_SAND }}
role-duration-seconds: 900
role-session-name: gha-pr-labels-crib
aws-region: ${{ secrets.AWS_REGION }}
role-duration-seconds: 900
mask-aws-account-id: true
role-session-name: pr-labels.crib

- name: Comment CRIB details on PR
run: ./.github/scripts/crib/pr-comment-crib-env.js
Expand Down
5 changes: 4 additions & 1 deletion charts/chainlink-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ We are using [Grabana](https://github.com/K-Phoen/grabana) lib to create dashboa

You can also select dashboard platform in `INFRA_PLATFORM` either `kubernetes` or `docker`

You can select the dashboard panels with `PANELS_INCLUDED` which is a list of panel names separated by comma
If you don't specify it will include core panels by default

```
export LOKI_TENANT_ID=promtail
export LOKI_URL=...
Expand All @@ -159,7 +162,7 @@ export GRAFANA_TOKEN=...
export PROMETHEUS_DATA_SOURCE_NAME=Thanos
export LOKI_DATA_SOURCE_NAME=Loki
export INFRA_PLATFORM=kubernetes
export GRAFANA_FOLDER=CRIB
export GRAFANA_FOLDER=DashboardCoreDebug
export DASHBOARD_NAME=CL-Cluster
devspace run dashboard_deploy
Expand Down
19 changes: 19 additions & 0 deletions charts/chainlink-cluster/dashboard/cmd/delete.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package main

import (
lib "github.com/smartcontractkit/chainlink/dashboard-lib"
)

func main() {
cfg := lib.ReadEnvDeployOpts()
db := lib.NewDashboard(cfg.Name, cfg, nil)
err := db.Delete()
if err != nil {
lib.L.Fatal().Err(err).Msg("failed to delete the dashboard")
}
lib.L.Info().
Str("Name", db.Name).
Str("GrafanaURL", db.DeployOpts.GrafanaURL).
Str("GrafanaFolder", db.DeployOpts.GrafanaFolder).
Msg("Dashboard deleted")
}
47 changes: 31 additions & 16 deletions charts/chainlink-cluster/dashboard/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,48 @@ package main
import (
"github.com/K-Phoen/grabana/dashboard"
lib "github.com/smartcontractkit/chainlink/dashboard-lib"
atlas_don "github.com/smartcontractkit/chainlink/dashboard-lib/atlas-don"
core_don "github.com/smartcontractkit/chainlink/dashboard-lib/core-don"
k8spods "github.com/smartcontractkit/chainlink/dashboard-lib/k8s-pods"
waspdb "github.com/smartcontractkit/wasp/dashboard"
)

const (
DashboardName = "Chainlink Cluster (DON)"
"strings"
)

func main() {
cfg := lib.ReadEnvDeployOpts()
db := lib.NewDashboard(DashboardName, cfg,
db := lib.NewDashboard(cfg.Name, cfg,
[]dashboard.Option{
dashboard.AutoRefresh("10s"),
dashboard.Tags([]string{"generated"}),
},
)
db.Add(
core_don.New(
core_don.Props{
PrometheusDataSource: cfg.DataSources.Prometheus,
PlatformOpts: core_don.PlatformPanelOpts(cfg.Platform),
},
),
)
if len(cfg.PanelsIncluded) == 0 || cfg.PanelsIncluded["core"] {
db.Add(
core_don.New(
core_don.Props{
PrometheusDataSource: cfg.DataSources.Prometheus,
PlatformOpts: core_don.PlatformPanelOpts(cfg.Platform),
},
),
)
// TODO: refactor as a component later
addWASPRows(db, cfg)
}
if cfg.PanelsIncluded["ocr"] || cfg.PanelsIncluded["ocr2"] || cfg.PanelsIncluded["ocr3"] {
for key := range cfg.PanelsIncluded {
if strings.Contains(key, "ocr") {
db.Add(
atlas_don.New(
atlas_don.Props{
PrometheusDataSource: cfg.DataSources.Prometheus,
PlatformOpts: atlas_don.PlatformPanelOpts(cfg.Platform, key),
OcrVersion: key,
},
),
)
}
}
}
if cfg.Platform == "kubernetes" {
db.Add(
k8spods.New(
Expand All @@ -38,13 +55,11 @@ func main() {
),
)
}
// TODO: refactor as a component later
addWASPRows(db, cfg)
if err := db.Deploy(); err != nil {
lib.L.Fatal().Err(err).Msg("failed to deploy the dashboard")
}
lib.L.Info().
Str("Name", DashboardName).
Str("Name", db.Name).
Str("GrafanaURL", db.DeployOpts.GrafanaURL).
Str("GrafanaFolder", db.DeployOpts.GrafanaFolder).
Msg("Dashboard deployed")
Expand Down
2 changes: 2 additions & 0 deletions charts/chainlink-cluster/templates/chainlink-cm.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.chainlink.enabled }}
{{- range $cfg := .Values.chainlink.nodes }}
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -69,3 +70,4 @@ data:
{{ end }}
---
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.db.enabled }}
{{- range $cfg := .Values.chainlink.nodes }}
apiVersion: apps/v1
{{ if $.Values.db.stateful }}
Expand Down Expand Up @@ -150,3 +151,4 @@ spec:
{{- end }}
---
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.networkPolicies.enabled }}
{{- if and .Values.db.enabled .Values.networkPolicies.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand All @@ -18,4 +18,4 @@ spec:
ports:
- protocol: TCP
port: 5432
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/chainlink-cluster/templates/chainlink-db-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.db.enabled }}
{{- range $cfg := .Values.chainlink.nodes }}
apiVersion: v1
kind: Service
Expand All @@ -13,4 +14,5 @@ spec:
port: 5432
targetPort: 5432
---
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.chainlink.enabled }}
{{- range $index, $cfg := .Values.chainlink.nodes }}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -126,3 +127,4 @@ spec:
{{- end }}
---
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.networkPolicies.enabled }}
{{- if and .Values.chainlink.enabled .Values.networkPolicies.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand All @@ -15,4 +15,4 @@ spec:
- podSelector:
matchLabels:
app: {{ $.Release.Name }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.chainlink.enabled }}
{{- range $cfg := .Values.chainlink.nodes }}
apiVersion: v1
kind: Service
Expand All @@ -15,4 +16,5 @@ spec:
instance: {{ $cfg.name }}
type: ClusterIP
---
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if $.Values.prometheusMonitor }}
{{- if and .Values.chainlink.enabled .Values.prometheusMonitor }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
Expand Down
4 changes: 3 additions & 1 deletion charts/chainlink-cluster/templates/chainlink-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.chainlink.enabled }}
{{- range $cfg := .Values.chainlink.nodes }}
apiVersion: v1
kind: Secret
Expand All @@ -9,4 +10,5 @@ data:
apicredentials: bm90cmVhbEBmYWtlZW1haWwuY2hudHdvY2hhaW5zCg==
node-password: VC50TEhrY213ZVBUL3AsXXNZdW50andIS0FzcmhtIzRlUnM0THVLSHd2SGVqV1lBQzJKUDRNOEhpbXdnbWJhWgo=
---
{{- end }}
{{- end }}
{{- end }}
Loading

0 comments on commit fd7453c

Please sign in to comment.