Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTO-8855] Fix Automation load, nightly tests #11891

Merged
merged 7 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
30 changes: 15 additions & 15 deletions integration-tests/load/automationv2_1/automationv2_1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/networks"

ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config"
ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/config"

"github.com/smartcontractkit/chainlink/integration-tests/actions"
"github.com/smartcontractkit/chainlink/integration-tests/actions/automationv2"
"github.com/smartcontractkit/chainlink/integration-tests/client"
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
contractseth "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum"
tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig"
a_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/automation"
aconfig "github.com/smartcontractkit/chainlink/integration-tests/testconfig/automation"
"github.com/smartcontractkit/chainlink/integration-tests/testreporters"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_utils_2_1"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_emitter"
Expand Down Expand Up @@ -142,15 +142,15 @@ func TestLogTrigger(t *testing.T) {
Msg("Test Config")

testConfigFormat := `Number of Nodes: %d
Duration: %d
Block Time: %d
Spec Type: %s
Log Level: %s
Image: %s
Tag: %s
Duration: %d
Block Time: %d
Spec Type: %s
Log Level: %s
Image: %s
Tag: %s

Load Config:
%s`
Load Config:
%s`

prettyLoadConfig, err := toml.Marshal(loadedTestConfig.Automation.Load)
require.NoError(t, err, "Error marshalling load config")
Expand Down Expand Up @@ -181,7 +181,7 @@ func TestLogTrigger(t *testing.T) {
}

testEnvironment := environment.New(&environment.Config{
TTL: time.Hour * 24, // 1 day,
TTL: loadDuration + time.Hour*6,
NamespacePrefix: fmt.Sprintf(
"automation-%s-%s",
testType,
Expand Down Expand Up @@ -245,8 +245,8 @@ func TestLogTrigger(t *testing.T) {
nodeTOML = networks.AddNetworksConfig(nodeTOML, loadedTestConfig.Pyroscope, testNetwork)

var overrideFn = func(_ interface{}, target interface{}) {
ctf_config.MustConfigOverrideChainlinkVersion(loadedTestConfig.ChainlinkImage, target)
ctf_config.MightConfigOverridePyroscopeKey(loadedTestConfig.Pyroscope, target)
ctfconfig.MustConfigOverrideChainlinkVersion(loadedTestConfig.ChainlinkImage, target)
ctfconfig.MightConfigOverridePyroscopeKey(loadedTestConfig.Pyroscope, target)
}

cd := chainlink.NewWithOverride(i, map[string]any{
Expand Down Expand Up @@ -336,7 +336,7 @@ func TestLogTrigger(t *testing.T) {
}

upkeepConfigs := make([]automationv2.UpkeepConfig, 0)
loadConfigs := make([]a_config.Load, 0)
loadConfigs := make([]aconfig.Load, 0)
cEVMClient, err := blockchain.ConcurrentEVMClient(testNetwork, testEnvironment, chainClient, l)
require.NoError(t, err, "Error building concurrent chain client")

Expand All @@ -351,7 +351,7 @@ func TestLogTrigger(t *testing.T) {
Int("Out Of", *u.NumberOfUpkeeps).
Msg("Deployed Automation Log Trigger Consumer Contract")

loadCfg := a_config.Load{
loadCfg := aconfig.Load{
NumberOfEvents: u.NumberOfEvents,
NumberOfSpamMatchingEvents: u.NumberOfSpamMatchingEvents,
NumberOfSpamNonMatchingEvents: u.NumberOfSpamNonMatchingEvents,
Expand Down
Loading