Skip to content

Commit

Permalink
fix automation load test - pyroscope config
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Jan 25, 2024
1 parent a314ffe commit a72d659
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/automation-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,34 @@ 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)
if [ -n "$PYROSCOPE_SERVER" ]; then
pyroscope_enabled=true
else
pyroscope_enabled=false
fi
# use Pyroscope config from GH secrets and merge it with base64 input
cat << EOF > config.toml
[Pyroscope]
enabled=$pyroscope_enabled
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: 0 additions & 5 deletions integration-tests/load/automationv2_1/automationv2_1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"math"
"math/big"
"os"
"strconv"
"strings"
"testing"
Expand Down Expand Up @@ -231,11 +230,7 @@ Load Config:
}

if *loadedTestConfig.Pyroscope.Enabled {
serverUrl := os.Getenv("PYROSCOPE_SERVER")
serverKey := os.Getenv("PYROSCOPE_KEY")
loadedTestConfig.Pyroscope.Environment = &testEnvironment.Cfg.Namespace
loadedTestConfig.Pyroscope.ServerUrl = &serverUrl
loadedTestConfig.Pyroscope.Key = &serverKey
}

numberOfUpkeeps := *loadedTestConfig.Automation.General.NumberOfNodes
Expand Down

0 comments on commit a72d659

Please sign in to comment.