Skip to content

Commit

Permalink
check what is the config missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Jan 9, 2024
1 parent 5171f92 commit 513423d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/client-compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ jobs:
PYROSCOPE_SERVER: ${{ secrets.QA_PYROSCOPE_INSTANCE }}
PYROSCOPE_ENVIRONMENT: ci-client-compatability-${{ matrix.client }}-testnet
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
ETH2_EL_CLIENT: ${{matrix.client}}
ETH2_EL_CLIENT: ${{matrix.client}}
CHAINLINK_VERSION: ${{ github.sha }}
run: |
convert_to_toml_array() {
local IFS=','
Expand Down Expand Up @@ -199,7 +200,7 @@ jobs:
[ChainlinkImage]
image="$CHAINLINK_IMAGE"
version="${{ github.sha }}"
version="$CHAINLINK_VERSION"
[Pyroscope]
enabled=$pyroscope_enabled
Expand All @@ -212,7 +213,7 @@ jobs:
EOF
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
# echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
touch .root_dir
- name: Debug pwd
Expand Down
7 changes: 5 additions & 2 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
}

if _, ok := someToml[configurationName]; !ok {
logger.Debug().Msgf("Config file %s does not contain configuration named '%s', skipping.", fileName, configurationName)
logger.Debug().Msgf("Config file %s does not contain configuration named '%s', will read only default configuration.", fileName, configurationName)
continue
}

Expand All @@ -216,6 +216,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {

configEncoded, isSet := os.LookupEnv(Base64OverrideEnvVarName)
if isSet && configEncoded != "" {
logger.Debug().Msgf("Base64 config override from environment variable '%s' found", Base64OverrideEnvVarName)
decoded, err := base64.StdEncoding.DecodeString(configEncoded)
if err != nil {
return TestConfig{}, err
Expand All @@ -227,7 +228,6 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
return TestConfig{}, errors.Wrapf(err, "error unmarshaling base64 config")
}

logger.Debug().Msgf("Applying base64 config override from environment variable %s", Base64OverrideEnvVarName)
maybeTestConfigs = append(maybeTestConfigs, base64override)
} else {
logger.Debug().Msg("Base64 config override from environment variable not found")
Expand All @@ -240,6 +240,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
return TestConfig{}, errors.Wrapf(err, "error applying secrets to network config")
}

logger.Debug().Msg("Applying overrides to test config")
for i := range maybeTestConfigs {
err := testConfig.ApplyOverrides(&maybeTestConfigs[i])
if err != nil {
Expand All @@ -248,6 +249,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
}

testConfig.ConfigurationName = configurationName
logger.Debug().Msg("Validating test config")
err = testConfig.Validate()
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error validating test config")
Expand All @@ -257,6 +259,7 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
testConfig.Common = &Common{}
}

logger.Debug().Msg("Correct test config constructed successfully")
return testConfig, nil
}

Expand Down

0 comments on commit 513423d

Please sign in to comment.