run the otel-daemon alongside load tests (#1357)
## Description With this in place, we just need client details to hook up to xray in order to receive open telemetry info from our load test suite. ## Type of change - [x] 🤖 Test ## Issue(s) * #902 ## Test Plan - [x] 💚 E2E
This commit is contained in:
parent
7e824f5426
commit
3d52cb18f9
47
.github/workflows/load_test.yml
vendored
47
.github/workflows/load_test.yml
vendored
@ -26,6 +26,21 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# AWS creds
|
||||||
|
- name: Configure AWS credentials from Test account
|
||||||
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
|
||||||
|
role-session-name: integration-testing
|
||||||
|
aws-region: us-east-1
|
||||||
|
|
||||||
|
- name: Build the otel-daemon
|
||||||
|
run: make build-otel-daemon
|
||||||
|
|
||||||
|
# TODO: write logs to a file in src/test_results for archival
|
||||||
|
- name: Run the otel-daemon
|
||||||
|
run: make otel-daemon
|
||||||
|
|
||||||
- name: Setup Golang with cache
|
- name: Setup Golang with cache
|
||||||
uses: magnetikonline/action-golang-cache@v3
|
uses: magnetikonline/action-golang-cache@v3
|
||||||
with:
|
with:
|
||||||
@ -37,14 +52,6 @@ jobs:
|
|||||||
- name: Set up gotestfmt
|
- name: Set up gotestfmt
|
||||||
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
|
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
|
||||||
|
|
||||||
# AWS creds
|
|
||||||
- name: Configure AWS credentials from Test account
|
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
|
|
||||||
role-session-name: integration-testing
|
|
||||||
aws-region: us-east-1
|
|
||||||
|
|
||||||
# run the tests
|
# run the tests
|
||||||
- name: Integration Tests
|
- name: Integration Tests
|
||||||
env:
|
env:
|
||||||
@ -69,16 +76,6 @@ jobs:
|
|||||||
-outputdir=test_results \
|
-outputdir=test_results \
|
||||||
./pkg/repository/repository_load_test.go \
|
./pkg/repository/repository_load_test.go \
|
||||||
2>&1 | tee ./test_results/goloadtest.log | gotestfmt -hide successful-tests
|
2>&1 | tee ./test_results/goloadtest.log | gotestfmt -hide successful-tests
|
||||||
|
|
||||||
# package all artifacts for later review
|
|
||||||
- name: Upload Log, Profilers, Traces
|
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: load-test-profiling
|
|
||||||
path: src/test_results/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 14
|
|
||||||
|
|
||||||
# currently, we're required to generate a unique folder for each factory
|
# currently, we're required to generate a unique folder for each factory
|
||||||
# production. Whenever possible, this should be reverted to increasing the
|
# production. Whenever possible, this should be reverted to increasing the
|
||||||
@ -124,3 +121,17 @@ jobs:
|
|||||||
go run ./cmd/purge/purge.go
|
go run ./cmd/purge/purge.go
|
||||||
--user '*'
|
--user '*'
|
||||||
--prefix ${{ env.DELETE_FOLDER_PREFIX }}
|
--prefix ${{ env.DELETE_FOLDER_PREFIX }}
|
||||||
|
|
||||||
|
- name: Put Down the Daemons Arisen
|
||||||
|
if: always()
|
||||||
|
run: docker kill otel-daemon
|
||||||
|
|
||||||
|
# package all artifacts for later review
|
||||||
|
- name: Upload Log, Profilers, Traces
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: load-test-profiling
|
||||||
|
path: src/test_results/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 14
|
||||||
|
|||||||
16
src/Makefile
16
src/Makefile
@ -32,13 +32,27 @@ build-otel-daemon:
|
|||||||
docker build -t xray-daemon .
|
docker build -t xray-daemon .
|
||||||
|
|
||||||
otel-daemon:
|
otel-daemon:
|
||||||
|
results_dir=$$PWD/test_results; \
|
||||||
|
cd ./testfiles/otel_daemon; \
|
||||||
|
docker run \
|
||||||
|
-d \
|
||||||
|
-e AWS_REGION \
|
||||||
|
-v ~/.aws/:/root/.aws/:ro \
|
||||||
|
--name otel-daemon \
|
||||||
|
-p 2000:2000/udp \
|
||||||
|
--rm \
|
||||||
|
xray-daemon \
|
||||||
|
--local-mode \
|
||||||
|
--log-level debug
|
||||||
|
|
||||||
|
local-daemon:
|
||||||
results_dir=$$PWD/test_results; \
|
results_dir=$$PWD/test_results; \
|
||||||
cd ./testfiles/otel_daemon; \
|
cd ./testfiles/otel_daemon; \
|
||||||
docker run \
|
docker run \
|
||||||
--attach STDOUT \
|
--attach STDOUT \
|
||||||
-e AWS_REGION \
|
-e AWS_REGION \
|
||||||
-v ~/.aws/:/root/.aws/:ro \
|
-v ~/.aws/:/root/.aws/:ro \
|
||||||
--name xray-daemon \
|
--name otel-daemon \
|
||||||
-p 2000:2000/udp \
|
-p 2000:2000/udp \
|
||||||
--rm \
|
--rm \
|
||||||
xray-daemon \
|
xray-daemon \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user