Skip to content

Commit

Permalink
Merge branch 'develop' into feature/BCI-2591-finalized-tx
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaidashenko committed Jan 25, 2024
2 parents 25bd7cc + 1e791ac commit 850539f
Show file tree
Hide file tree
Showing 50 changed files with 512 additions and 224 deletions.
20 changes: 10 additions & 10 deletions .github/actions/setup-create-base64-config-live-testnets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
description: The git commit sha to use for the image tag
pyroscopeServer:
description: URL of Pyroscope server
pyroscopeEnvironment:
pyroscopeEnvironment:
description: Name of Pyroscope environment
pyroscopeKey:
description: Pyroscope server key
Expand Down Expand Up @@ -47,9 +47,9 @@ runs:
id: base64-config-override
env:
RUN_ID: ${{ inputs.runId }}
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }}
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }}
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }}
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }}
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }}
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }}
Expand Down Expand Up @@ -81,15 +81,15 @@ runs:
else
pyroscope_enabled=false
fi
cat << EOF > config.toml
[Common]
chainlink_node_funding=0.5
chainlink_node_funding=0.5
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="$CHAINLINK_VERSION"
[Pyroscope]
enabled=$pyroscope_enabled
server_url="$PYROSCOPE_SERVER"
Expand All @@ -109,7 +109,7 @@ runs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dasboard_url="$GRAFANA_DASHBOARD_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
[Network]
selected_networks=["$NETWORK"]
Expand All @@ -123,7 +123,7 @@ runs:
[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
Expand Down
30 changes: 14 additions & 16 deletions .github/actions/setup-create-base64-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ inputs:
description: Whether to always collect logs, even for passing tests
default: "false"
selectedNetworks:
description: The networks to run tests against
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:
pyroscopeEnvironment:
description: Name of Pyroscope environment
pyroscopeKey:
description: Pyroscope server key
Expand All @@ -43,9 +43,9 @@ runs:
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 }}
PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }}
PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }}
PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }}
CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }}
CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }}
LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }}
Expand All @@ -55,7 +55,7 @@ runs:
GRAFANA_URL: ${{ inputs.grafanaUrl }}
GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }}
run: |
echo ::add-mask::$CHAINLINK_IMAGE
echo ::add-mask::$CHAINLINK_IMAGE
function convert_to_toml_array() {
local IFS=','
local input_array=($1)
Expand All @@ -68,10 +68,10 @@ runs:
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS")
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
Expand All @@ -82,16 +82,16 @@ runs:
test_log_collect=true
else
test_log_collect=false
fi
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"
Expand All @@ -109,14 +109,12 @@ runs:
tenant_id="$LOKI_TENANT_ID"
endpoint="$LOKI_ENDPOINT"
basic_auth="$LOKI_BASIC_AUTH"
# legacy, you only need this to access the cloud version
# bearer_token="bearer_token"
[Logging.Grafana]
base_url="$GRAFANA_URL"
dasboard_url="$GRAFANA_DASHBOARD_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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A composite action that creates a base64-encoded config to be used

inputs:
selectedNetworks:
description: The networks to run tests against
description: The networks to run tests against
chainlinkImage:
description: The chainlink image to upgrade from
default: "public.ecr.aws/chainlink/chainlink"
Expand Down Expand Up @@ -40,13 +40,13 @@ runs:
toml_array_format="${toml_array_format%,}]"
echo "$toml_array_format"
}
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS")
selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS")
cat << EOF > config.toml
[Network]
selected_networks=$selected_networks
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="$CHAINLINK_VERSION"
Expand All @@ -55,7 +55,7 @@ runs:
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
12 changes: 6 additions & 6 deletions .github/actions/setup-merge-base64-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
description: Base64-encoded config to decode

runs:
using: composite
using: composite
steps:
- name: Add masks and export base64 config
shell: bash
Expand All @@ -18,7 +18,7 @@ runs:
decoded_toml=$(echo $BASE64_CONFIG_OVERRIDE | base64 -d)
CHAINLINK_IMAGE=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*image[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
echo ::add-mask::$CHAINLINK_IMAGE
CHAINLINK_VERSION=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*version[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
CHAINLINK_VERSION=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*version[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
NETWORKS=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*selected_networks[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
if [ -n "$CHAINLINK_IMAGE" ]; then
Expand All @@ -31,11 +31,11 @@ runs:
echo "CHAINLINK_VERSION=$CHAINLINK_VERSION" >> $GITHUB_ENV
else
echo "No Chainlink Version found in base64-ed config. Exiting"
exit 1
fi
exit 1
fi
if [ -n "$NETWORKS" ]; then
echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV
fi
echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV
fi
# use Loki config from GH secrets and merge it with base64 input
cat << EOF > config.toml
Expand Down
16 changes: 8 additions & 8 deletions .github/actions/setup-parse-base64-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ inputs:
description: Base64-encoded config to decode

runs:
using: composite
using: composite
steps:
- name: Add masks and export base64 config
shell: bash
run: |
decoded_toml=$(echo $BASE64_CONFIG_OVERRIDE | base64 -d)
CHAINLINK_IMAGE=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*image[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
echo ::add-mask::$CHAINLINK_IMAGE
CHAINLINK_VERSION=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*version[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
CHAINLINK_VERSION=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*version[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
NETWORKS=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*selected_networks[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
ETH2_EL_CLIENT=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*execution_layer[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
ETH2_EL_CLIENT=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*execution_layer[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null)
if [ -n "$CHAINLINK_IMAGE" ]; then
echo "CHAINLINK_IMAGE=$CHAINLINK_IMAGE" >> $GITHUB_ENV
Expand All @@ -28,11 +28,11 @@ runs:
echo "CHAINLINK_VERSION=$CHAINLINK_VERSION" >> $GITHUB_ENV
else
echo "No Chainlink Version found in base64-ed config. Exiting"
exit 1
fi
exit 1
fi
if [ -n "$NETWORKS" ]; then
echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV
fi
echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV
fi
if [ -n "$ETH2_EL_CLIENT" ]; then
echo "ETH2_EL_CLIENT=$ETH2_EL_CLIENT" >> $GITHUB_ENV
echo "ETH2_EL_CLIENT=$ETH2_EL_CLIENT" >> $GITHUB_ENV
fi
20 changes: 20 additions & 0 deletions .github/workflows/automation-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ jobs:
BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64Config' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Merge Pyrsoscope config
env:
PYROSCOPE_SERVER: ${{ secrets.QA_PYROSCOPE_INSTANCE }}
PYROSCOPE_ENVIRONMENT: "automation-load-test"
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
run: |
decoded_toml=$(echo $BASE64_CONFIG_OVERRIDE | base64 -d)
# use Pyroscope config from GH secrets and merge it with base64 input
cat << EOF > config.toml
server_url="$PYROSCOPE_SERVER"
environment="$PYROSCOPE_ENVIRONMENT"
key="$PYROSCOPE_KEY"
EOF
echo "$decoded_toml" >> final_config.toml
cat config.toml >> final_config.toml
BASE64_CONFIG_OVERRIDE=$(cat final_config.toml | base64 -w 0)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Parse base64 config
uses: ./.github/actions/setup-parse-base64-config
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/automation-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
CHAINLINK_COMMIT_SHA: ${{ github.sha }}
CHAINLINK_ENV_USER: ${{ github.actor }}
TEST_LOG_LEVEL: debug
SELECTED_NETWORKS: "SIMULATED"
strategy:
fail-fast: false
matrix:
Expand All @@ -77,8 +78,8 @@ jobs:
selectedNetworks: ${{ env.SELECTED_NETWORKS }}
chainlinkImage: "public.ecr.aws/chainlink/chainlink"
chainlinkVersion: "latest"
upgradeImage: ${{ env.UPGRADE_IMAGE }}
upgradeVersion: ${{ env.UPGRADE_VERSION }}
upgradeImage: ${{ env.CHAINLINK_IMAGE }}
upgradeVersion: ${{ github.sha }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
env:
Expand Down
Loading

0 comments on commit 850539f

Please sign in to comment.