Skip to content

CI/CD: Add performance regression tests using QE infrastructure #798

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

Draft
wants to merge 69 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
3990aec
finish step 1
juliannguyen4 Jun 25, 2025
8874083
fix
juliannguyen4 Jun 25, 2025
cb602a9
do this way
juliannguyen4 Jun 25, 2025
af6406e
2nd repo probably needs to be cd'd into
juliannguyen4 Jun 25, 2025
1a0bc99
forgot yaml
juliannguyen4 Jun 25, 2025
48b3360
install testctl
juliannguyen4 Jun 25, 2025
c221ab7
fix
juliannguyen4 Jun 25, 2025
ad02e19
use jf cli instead
juliannguyen4 Jun 25, 2025
89a502a
+x
juliannguyen4 Jun 25, 2025
c383595
chmod inside new shell
juliannguyen4 Jun 25, 2025
47f93c9
.local/bin doesnt exist in PATH?
juliannguyen4 Jun 25, 2025
97d75f1
just install in default loc
juliannguyen4 Jun 25, 2025
46b25fc
just install in qe-tools/bin
juliannguyen4 Jun 25, 2025
e1a8f44
debug
juliannguyen4 Jun 25, 2025
7b3950a
action only supports env, but we need the cred file
juliannguyen4 Jun 25, 2025
7c34a09
fix
juliannguyen4 Jun 25, 2025
01cb334
debug
juliannguyen4 Jun 25, 2025
41165de
show version
juliannguyen4 Jun 25, 2025
5b14066
add qe section
juliannguyen4 Jun 26, 2025
276537a
print out test runs
juliannguyen4 Jun 26, 2025
1518ff3
Potential fix for code scanning alert no. 76: Workflow does not conta…
juliannguyen4 Jun 27, 2025
07c701a
try running custom test now
juliannguyen4 Jun 30, 2025
a2060f1
use test definition registered in bob
juliannguyen4 Jul 1, 2025
a10524a
use env var to always get the right test run id
juliannguyen4 Jul 1, 2025
6b8cab4
poll test run, then download and print test results
juliannguyen4 Jul 1, 2025
a661af2
print cmds for debugging
juliannguyen4 Jul 1, 2025
81005fe
fix
juliannguyen4 Jul 1, 2025
0b20963
wrong output name
juliannguyen4 Jul 1, 2025
e8f9b3b
rm debug step
juliannguyen4 Jul 1, 2025
7278491
disable color to fix
juliannguyen4 Jul 1, 2025
a87759b
show test run string
juliannguyen4 Jul 1, 2025
2057362
trim whitespace
juliannguyen4 Jul 1, 2025
4366903
testctl wrong configf
juliannguyen4 Jul 1, 2025
7933e37
try skipping downloading build packages since we dont have vpn access
juliannguyen4 Jul 1, 2025
6799c6b
flag not in right order
juliannguyen4 Jul 1, 2025
99ed17e
fix order of args
juliannguyen4 Jul 1, 2025
a28094c
workaround
juliannguyen4 Jul 1, 2025
0151a54
revise commenting
juliannguyen4 Jul 2, 2025
29d8a8f
set job status
juliannguyen4 Jul 2, 2025
53de49d
fail fast on test-enqueue step
juliannguyen4 Jul 2, 2025
d6e57fa
set test def to a bogus one
juliannguyen4 Jul 2, 2025
48c1976
revert
juliannguyen4 Jul 2, 2025
f13043b
improve err msg
juliannguyen4 Jul 2, 2025
173d5fd
use heredoc to add aws credentials
juliannguyen4 Jul 2, 2025
682a668
heredoc contents maybe needs to be tabbed?
juliannguyen4 Jul 2, 2025
891afb3
leading tabs since this is in a for loop
juliannguyen4 Jul 2, 2025
a0ac884
rm leading space up to first EOF. <<- will not remove leading whitesp…
juliannguyen4 Jul 2, 2025
92dc1c4
rm leading space for 2nd EOF
juliannguyen4 Jul 2, 2025
85bfa06
print debug
juliannguyen4 Jul 2, 2025
aeca494
fix
juliannguyen4 Jul 2, 2025
b361c5e
hide debugging
juliannguyen4 Jul 2, 2025
4b208c0
add workflow to enqueue qe tests
juliannguyen4 Jul 2, 2025
044416e
rm automatic trigger
juliannguyen4 Jul 2, 2025
0f0e9b5
fix order
juliannguyen4 Jul 2, 2025
1a0d69d
fix
juliannguyen4 Jul 2, 2025
38c6df3
print stderr as well
juliannguyen4 Jul 2, 2025
2278a1a
use echo, set -x does not print in the right order
juliannguyen4 Jul 2, 2025
d494d8e
use rclone to fetch binaries from google drive
juliannguyen4 Jul 16, 2025
51a80df
wrong syntax
juliannguyen4 Jul 16, 2025
0983843
fix incorrect names for binaries
juliannguyen4 Jul 16, 2025
d7e1136
debug print
juliannguyen4 Jul 16, 2025
c498a5f
use the prev version of testctl and test-enqueue. we already register…
juliannguyen4 Jul 16, 2025
63c6c3e
fix
juliannguyen4 Jul 16, 2025
bcbe93a
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Jul 25, 2025
3eec83a
update redirected links. double timeout delay
juliannguyen4 Jul 25, 2025
9a84c25
Revert "update redirected links. double timeout delay"
juliannguyen4 Jul 25, 2025
919d0f0
replace redirected link
juliannguyen4 Jul 25, 2025
a22ca22
Revert "replace redirected link"
juliannguyen4 Jul 25, 2025
9c10e6c
tail logs
juliannguyen4 Aug 1, 2025
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
133 changes: 133 additions & 0 deletions .github/workflows/run-qe-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
on:
workflow_dispatch:
inputs:
test-scenario:
required: true
default: CLIENT-3541-add-client-centered-performance-regression-tests@perf_regression/client_centered_kvs
description: Test scenario

jobs:
foo:
env:
TEST_CONFIG_FILE_NAME: client_perf.yaml
TESTCTL_BINARY_NAME: testctl
runs-on: ubuntu-24.04
steps:
# - name: Setup Rclone
# uses: AnimMouse/setup-rclone@0d99fa3878a334d3e307c1a8372ad55550fdaea7
# with:
# rclone_config: ${{ secrets.RCLONE_CONFIG }}

# - name: Download test-enqueue and testctl
# run: 'rclone --drive-root-folder-id ${{ secrets.TEST_ENQUEUE_PERF_GOOGLE_DRIVE_FOLDER_ID }} copy remote:/ ~/bin'

# - name: Add test-enqueue and testctl to PATH
# run: |
# ls -l ~/bin
# echo "$(realpath ~/bin)" >> $GITHUB_PATH

- name: Get test-enqueue
uses: actions/checkout@v4
with:
repository: citrusleaf/qe-tools
token: ${{ secrets.CLIENT_BOT_PAT }}
path: qe-tools
sparse-checkout: |
bin/test-enqueue
sparse-checkout-cone-mode: false

- name: Add test-enqueue to PATH
run: echo "$(realpath qe-tools/bin)" >> $GITHUB_PATH

- uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ secrets.JFROG_PLATFORM_URL }}
JF_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }}

- run: jf rt download qe-go-dev-local/testctl.amd64.linux qe-tools/bin/testctl
- run: chmod u+x ./testctl
working-directory: qe-tools/bin

- uses: actions/checkout@v4
with:
path: aerospike-client-python
sparse-checkout: |
test/${{ env.TEST_CONFIG_FILE_NAME }}
sparse-checkout-cone-mode: false

- name: Add AWS credentials
run: |
mkdir -p ~/.aws
cd ~/.aws
sections=("default" "qe")
for section in ${sections[@]};
do
cat <<-EOF >> credentials
[$section]
aws_access_key_id = ${{ secrets.QE_TEST_ENQUEUE_AWS_ACCESS_KEY_ID }}
aws_secret_access_key = ${{ secrets.QE_TEST_ENQUEUE_AWS_SECRET_ACCESS_KEY }}
region = us-west-1
EOF
done
shell: bash

# - run: testctl --version

# test-enqueue hides testctl's output, so this can be helpful for debugging
# - run: testctl --config staging run 901b1178-0159-452d-9b36-64d455e568f2 --deployment perf_client
# working-directory: aerospike-client-python/test/

- name: Allows us to get the exact test run id that was created by test-enqueue.
run: echo TESTCTL_USER=$(uuidgen) >> $GITHUB_ENV

- run: yq -i '.definitions.std.[0] = "${{ inputs.test-scenario }}"' ${{ env.TEST_CONFIG_FILE_NAME }}
working-directory: aerospike-client-python/test/

- name: Enqueue test run and fail fast if unable to enqueue
run: |
enqueue_count=$(test-enqueue --config staging --deployment perf_client ${{ env.TEST_CONFIG_FILE_NAME }} | grep "COUNT:" | sed 's/COUNT\://' | xargs)
if [[ "$enqueue_count" != "1" ]]; then
echo "We expected 1 test run to be enqueued, but $enqueue_count was actually enqueued."
exit 1
fi
working-directory: aerospike-client-python/test/

- run: sshpass -p ${{ secrets.PERF_PASSWORD }} ssh ${{ secrets.PERF_USERNAME }}@${{ secrets.PERF_HOST }} docker logs -f test_0

# - name: Wait for test run to finish
# id: poll-run-id
# run: |
# while true; do
# # Color messes up the run_id's string
# # Use xargs to trim whitespace from testctl's output
# run_id=$(${{ env.TESTCTL_BINARY_NAME }} --config staging ps --no-color --user ${{ env.TESTCTL_USER }} -n 1 -status completed --columns RUN_ID | sed '1d' | xargs)
# if [[ -z "$run_id" ]]; then
# echo "Test run has not finished yet..."
# sleep 2
# else
# echo "Test run $run_id has finished."
# break
# fi
# done
# echo "run_id=$run_id" >> "$GITHUB_OUTPUT"

# Downloading builds doesn't work here, so we disable it
# - run: ${{ env.TESTCTL_BINARY_NAME }} --config staging download --skip-build-download ${{ steps.poll-run-id.outputs.run_id }}

# - name: Print test run logs
# run: |
# cd ${{ steps.poll-run-id.outputs.run_id }}*/work/test_0
# echo "stdout:"
# cat stdout
# echo "stderr:"
# cat stderr

- name: Set Github job status
run: |
run_status=$(${{ env.TESTCTL_BINARY_NAME }} --config staging ps --no-color --user ${{ env.TESTCTL_USER }} -n 1 -status completed --columns STATUS | sed '1d' | xargs)
echo $run_status
if [[ "$run_status" == "Failure" ]]; then
exit 1
else
exit 0
fi
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: PR tests

permissions:
contents: read

env:
LOWEST_SUPPORTED_PY_VERSION: '3.9'
# pull_request event doesn't support inputs
Expand Down
15 changes: 15 additions & 0 deletions test/client_perf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
build:
repo: citrusleaf/aerospike-server
ref:
- 8.0.0.8

script: enterprise
target:
- x86-ubuntu-22.04

scenarios:
std:
- perfasd
definitions:
std:
- CLIENT-3541-add-client-centered-performance-regression-tests@perf_regression/client_centered_kvs
Loading