Skip to content

Commit

Permalink
Merge branch 'develop' into test-crib-4
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchad authored Jan 29, 2024
2 parents c03d75b + cfe4279 commit ce7cfa1
Show file tree
Hide file tree
Showing 394 changed files with 56,178 additions and 10,326 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-sign-publish-chainlink/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ runs:

- if: inputs.publish == 'true'
name: Login to ECR
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ inputs.ecr-hostname }}

Expand Down Expand Up @@ -166,7 +166,7 @@ runs:
- name: Generate docker metadata for non-root image
id: meta-nonroot
uses: docker/metadata-action@2c0bd771b40637d97bf205cbccdd294a32112176 # v4.5.0
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0
env:
DOCKER_METADATA_PR_HEAD_SHA: "true"
with:
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 @@ -15,7 +15,7 @@ inputs:
required: false
suites:
description: The test suites to build into the image
default: chaos migration performance reorg smoke soak benchmark load/automationv2_1
default: chaos migration reorg smoke soak benchmark load/automationv2_1
required: false
QA_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
2 changes: 1 addition & 1 deletion .github/actions/golangci-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ runs:
working-directory: ${{ inputs.go-directory }}
- name: Store lint report artifact
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: golangci-lint-report
path: ${{ inputs.go-directory }}/golangci-lint-report.xml
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ runs:
- name: Setup docker buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Set up qemu
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Setup go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: "go.mod"
- name: Setup goreleaser
uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # v3.2.0
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
distribution: goreleaser
install-only: true
version: ${{ inputs.goreleaser-version }}
- name: Setup zig
uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb # v2.0.1
uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.0
with:
version: ${{ inputs.zig-version }}
- name: Setup cosign
Expand All @@ -89,7 +89,7 @@ runs:
cosign-release: ${{ inputs.cosign-version }}
- name: Login to docker registry
if: inputs.enable-docker-publish == 'true'
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ inputs.docker-registry }}
- name: Goreleaser release
Expand Down
130 changes: 130 additions & 0 deletions .github/actions/setup-create-base64-config-live-testnets/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: Create Base64 Config
description: A composite action that creates a base64-encoded config to be used by integration tests

inputs:
runId:
description: The run id
testLogCollect:
description: Whether to always collect logs, even for passing tests
default: "false"
chainlinkImage:
description: The chainlink image to use
default: "public.ecr.aws/chainlink/chainlink"
chainlinkVersion:
description: The git commit sha to use for the image tag
pyroscopeServer:
description: URL of Pyroscope server
pyroscopeEnvironment:
description: Name of Pyroscope environment
pyroscopeKey:
description: Pyroscope server key
lokiEndpoint:
description: Loki push endpoint
lokiTenantId:
description: Loki tenant id
lokiBasicAuth:
description: Loki basic auth
logstreamLogTargets:
description: Where to send logs (e.g. file, loki)
grafanaUrl:
description: Grafana URL
grafanaDashboardUrl:
description: Grafana dashboard URL
network:
description: Network to run tests on
httpEndpoints:
description: HTTP endpoints to use for network
wsEndpoints:
description: WS endpoints to use for network
fundingKeys:
description: Funding keys to use for network

runs:
using: composite
steps:
- name: Prepare Base64 TOML override
shell: bash
id: base64-config-override
env:
RUN_ID: ${{ inputs.runId }}
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }}
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }}
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }}
LOKI_TENANT_ID: ${{ inputs.lokiTenantId }}
LOKI_BASIC_AUTH: ${{ inputs.lokiBasicAuth }}
LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }}
GRAFANA_URL: ${{ inputs.grafanaUrl }}
GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }}
NETWORK: ${{ inputs.network }}
HTTP_ENDPOINTS: ${{ inputs.httpEndpoints }}
WS_ENDPOINTS: ${{ inputs.wsEndpoints }}
FUNDING_KEYS: ${{ inputs.fundingKeys }}
run: |
convert_to_toml_array() {
local IFS=','
local input_array=($1)
local toml_array_format="["
for element in "${input_array[@]}"; do
toml_array_format+="\"$element\","
done
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
if [ -n "$PYROSCOPE_SERVER" ]; then
pyroscope_enabled=true
else
pyroscope_enabled=false
fi
cat << EOF > config.toml
[Common]
chainlink_node_funding=0.5
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="$CHAINLINK_VERSION"
[Pyroscope]
enabled=$pyroscope_enabled
server_url="$PYROSCOPE_SERVER"
environment="$PYROSCOPE_ENVIRONMENT"
key="$PYROSCOPE_KEY"
[Logging]
run_id="$RUN_ID"
[Logging.LogStream]
log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS")
[Logging.Loki]
tenant_id="$LOKI_TENANT_ID"
endpoint="$LOKI_URL"
basic_auth="$LOKI_BASIC_AUTH"
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
[Network]
selected_networks=["$NETWORK"]
[Network.RpcHttpUrls]
"$NETWORK" = $(convert_to_toml_array "$HTTP_ENDPOINTS")
[Network.RpcWsUrls]
"$NETWORK" = $(convert_to_toml_array "$WS_ENDPOINTS")
[Network.WalletKeys]
"$NETWORK" = $(convert_to_toml_array "$FUNDING_KEYS")
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
120 changes: 120 additions & 0 deletions .github/actions/setup-create-base64-config/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Create Base64 Config
description: A composite action that creates a base64-encoded config to be used by integration tests

inputs:
runId:
description: The run id
testLogCollect:
description: Whether to always collect logs, even for passing tests
default: "false"
selectedNetworks:
description: The networks to run tests against
chainlinkImage:
description: The chainlink image to use
default: "public.ecr.aws/chainlink/chainlink"
chainlinkVersion:
description: The git commit sha to use for the image tag
pyroscopeServer:
description: URL of Pyroscope server
pyroscopeEnvironment:
description: Name of Pyroscope environment
pyroscopeKey:
description: Pyroscope server key
lokiEndpoint:
description: Loki push endpoint
lokiTenantId:
description: Loki tenant id
lokiBasicAuth:
description: Loki basic auth
logstreamLogTargets:
description: Where to send logs (e.g. file, loki)
grafanaUrl:
description: Grafana URL
grafanaDashboardUrl:
description: Grafana dashboard URL

runs:
using: composite
steps:
- name: Prepare Base64 TOML override
shell: bash
id: base64-config-override
env:
RUN_ID: ${{ inputs.runId }}
TEST_LOG_COLLECT: ${{ inputs.testLogCollect }}
SELECTED_NETWORKS: ${{ inputs.selectedNetworks }}
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }}
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }}
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }}
LOKI_TENANT_ID: ${{ inputs.lokiTenantId }}
LOKI_BASIC_AUTH: ${{ inputs.lokiBasicAuth }}
LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }}
GRAFANA_URL: ${{ inputs.grafanaUrl }}
GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }}
run: |
echo ::add-mask::$CHAINLINK_IMAGE
function convert_to_toml_array() {
local IFS=','
local input_array=($1)
local toml_array_format="["
for element in "${input_array[@]}"; do
toml_array_format+="\"$element\","
done
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS")
log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS")
if [ -n "$PYROSCOPE_SERVER" ]; then
pyroscope_enabled=true
else
pyroscope_enabled=false
fi
if [ -n "$TEST_LOG_COLLECT" ]; then
test_log_collect=true
else
test_log_collect=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="$PYROSCOPE_KEY"
[Logging]
test_log_collect=$test_log_collect
run_id="$RUN_ID"
[Logging.LogStream]
log_targets=$log_targets
[Logging.Loki]
tenant_id="$LOKI_TENANT_ID"
endpoint="$LOKI_ENDPOINT"
basic_auth="$LOKI_BASIC_AUTH"
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
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
61 changes: 61 additions & 0 deletions .github/actions/setup-create-base64-upgrade-config/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Create Base64 Upgrade Config
description: A composite action that creates a base64-encoded config to be used by Chainlink version upgrade tests

inputs:
selectedNetworks:
description: The networks to run tests against
chainlinkImage:
description: The chainlink image to upgrade from
default: "public.ecr.aws/chainlink/chainlink"
chainlinkVersion:
description: The git commit sha to use for the image tag
upgradeImage:
description: The chainlink image to upgrade to
default: "public.ecr.aws/chainlink/chainlink"
upgradeVersion:
description: The git commit sha to use for the image tag

runs:
using: composite
steps:
- name: Prepare Base64 TOML override
shell: bash
id: base64-config-override
env:
SELECTED_NETWORKS: ${{ inputs.selectedNetworks }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
UPGRADE_IMAGE: ${{ inputs.upgradeImage }}
UPGRADE_VERSION: ${{ inputs.upgradeVersion }}
run: |
function convert_to_toml_array() {
local IFS=','
local input_array=($1)
local toml_array_format="["
for element in "${input_array[@]}"; do
toml_array_format+="\"$element\","
done
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS")
cat << EOF > config.toml
[Network]
selected_networks=$selected_networks
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="$CHAINLINK_VERSION"
[ChainlinkUpgradeImage]
image="$UPGRADE_IMAGE"
version="$UPGRADE_VERSION"
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
2 changes: 1 addition & 1 deletion .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
using: composite
steps:
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: ${{ inputs.go-version-file }}
cache: false
Expand Down
Loading

0 comments on commit ce7cfa1

Please sign in to comment.