Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 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
08f4a73
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Sep 8, 2025
7dcbd99
rm dup
juliannguyen4 Sep 8, 2025
db9b843
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Sep 9, 2025
ba313ba
Clear up
juliannguyen4 Sep 9, 2025
a4dc5b2
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Sep 17, 2025
78eb266
Test all the features in our test suite
juliannguyen4 Sep 22, 2025
a1fbc38
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Sep 24, 2025
818b357
add test def for raising exceptions
juliannguyen4 Oct 2, 2025
3974005
Skeleton code for building qe docker test image. Add expression test
juliannguyen4 Oct 3, 2025
8384aa7
Grant least permissions to GITHUB_TOKEN to stop warnings
juliannguyen4 Oct 3, 2025
7b0e13d
Fix syntax
juliannguyen4 Oct 3, 2025
ae246b1
ci/cd manual testing
juliannguyen4 Oct 7, 2025
4dd28e0
Merge remote-tracking branch 'origin/master' into cicd-performance-re…
juliannguyen4 Oct 7, 2025
42d6438
only allow read permissions for getting the repo
juliannguyen4 Oct 7, 2025
2f785c8
clone qe-docker using PAT since it is a private repo, and public repo…
juliannguyen4 Oct 7, 2025
93dea91
fix
juliannguyen4 Oct 7, 2025
5228f86
fix
juliannguyen4 Oct 7, 2025
d97ea62
try using bin/build
juliannguyen4 Oct 7, 2025
6a0e6ca
Package docker image with wheel to use for performance testing
juliannguyen4 Oct 7, 2025
5d3021a
fix syntax
juliannguyen4 Oct 7, 2025
f3f7fab
fix
juliannguyen4 Oct 7, 2025
e0151b7
fix
juliannguyen4 Oct 7, 2025
7450113
fix
juliannguyen4 Oct 7, 2025
9466d2c
fix
juliannguyen4 Oct 7, 2025
921366f
token registered under jfrog handle?
juliannguyen4 Oct 7, 2025
99df934
fix endpoint
juliannguyen4 Oct 7, 2025
02f8266
reuse composite action to dl wheel from jfrog
juliannguyen4 Oct 7, 2025
f0515c0
fix
juliannguyen4 Oct 7, 2025
87b62f8
download wheel in the right place
juliannguyen4 Oct 7, 2025
0b14488
wheel in workspace folder?
juliannguyen4 Oct 7, 2025
f9cd712
fix
juliannguyen4 Oct 7, 2025
a706d16
Setup qemu and buildx to build arm64 images on x86_64, and use gha to…
juliannguyen4 Oct 7, 2025
a3aa439
fix tag
juliannguyen4 Oct 7, 2025
68f68a8
build on free linux arm runners to avoid emulating arm
juliannguyen4 Oct 7, 2025
4697379
follow example
juliannguyen4 Oct 7, 2025
4b5aa93
fix dockerfile path
juliannguyen4 Oct 7, 2025
b5739ab
code example uses rel path
juliannguyen4 Oct 7, 2025
22167d8
under qe-docker folder
juliannguyen4 Oct 7, 2025
b95320d
add github sha to docker image tag
juliannguyen4 Oct 7, 2025
889cdb1
Revert "add github sha to docker image tag". have to re-register test…
juliannguyen4 Oct 7, 2025
6672e34
test e2e
juliannguyen4 Oct 7, 2025
7213cac
make test scenario input required. then rename to test definition
juliannguyen4 Oct 7, 2025
79fe4a0
client perf hardware uses x86, not arm
juliannguyen4 Oct 8, 2025
287bbad
fix
juliannguyen4 Oct 8, 2025
50ad071
fix
juliannguyen4 Oct 8, 2025
d73803e
push tag prefixed with arm- since *.186 probably looks for image dige…
juliannguyen4 Oct 8, 2025
1a9044c
add separate workflow for building wheel from ft branch and running p…
juliannguyen4 Oct 8, 2025
d82a730
add new workflow to gh
juliannguyen4 Oct 8, 2025
fddbd86
Revert "add new workflow to gh"
juliannguyen4 Oct 8, 2025
0929fcf
fix
juliannguyen4 Oct 8, 2025
fddfa61
fix
juliannguyen4 Oct 8, 2025
50850b0
Give called workflow read content permissions
juliannguyen4 Oct 8, 2025
ffb1de5
allow pulling custom manylinux image from ghcr.io/aerospike
juliannguyen4 Oct 8, 2025
fb1b217
no longer needed
juliannguyen4 Oct 9, 2025
bc76834
calling workflow may be dev-to-stage
juliannguyen4 Oct 9, 2025
caaebd4
workflow should only be run manually when we want to use a jfrog wheel
juliannguyen4 Oct 9, 2025
1117ba8
prevent race condition
juliannguyen4 Oct 14, 2025
552d133
Set at workflow level. A subsequent docker image build job may overri…
juliannguyen4 Oct 14, 2025
61bd884
Show run name with inputs
juliannguyen4 Oct 14, 2025
7d5a0ae
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Nov 12, 2025
2d48795
Copy register file from test repo. This should be used as a template …
juliannguyen4 Nov 14, 2025
fffe7a6
Add ability to parametrize QE tests at runtime without pushing commit…
juliannguyen4 Nov 14, 2025
801227e
Fix
juliannguyen4 Nov 14, 2025
09434b7
fix
juliannguyen4 Nov 14, 2025
096c7ab
Fix
juliannguyen4 Nov 14, 2025
b1b3829
fix
juliannguyen4 Nov 14, 2025
31da5db
fix
juliannguyen4 Nov 14, 2025
0d4bb06
fix
juliannguyen4 Nov 14, 2025
ab66a65
rm
juliannguyen4 Nov 14, 2025
29e72ff
debug
juliannguyen4 Nov 14, 2025
832a3f0
Add proper attributes
juliannguyen4 Nov 15, 2025
30ca2a9
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Nov 20, 2025
47357c7
Add title so we can more easily identify workflow inputs
juliannguyen4 Nov 20, 2025
3a4b470
Add intermediate step to print stdout while also saving stdout to var…
juliannguyen4 Nov 20, 2025
010ea1b
Workaround: use intermediate file
juliannguyen4 Nov 20, 2025
0b1c04e
debug
juliannguyen4 Nov 20, 2025
eeb50fb
Log into tailscale
juliannguyen4 Nov 21, 2025
c68af95
Reuse ACMS's credentials for tailscale login. Make exit node a variable
juliannguyen4 Nov 21, 2025
31a3830
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Jan 7, 2026
a7c7ecc
Add stepsecurity steps
juliannguyen4 Jan 8, 2026
58e8377
Devops team has now set up OIDC
juliannguyen4 Jan 9, 2026
3b6a034
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Jan 9, 2026
e16f8b3
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Jan 9, 2026
bd85ec1
fix permissions
juliannguyen4 Jan 9, 2026
0911c05
Merge remote-tracking branch 'origin/dev' into cicd-performance-regre…
juliannguyen4 Jan 13, 2026
e8c15a2
Temporary workaround until test-register returns an error code when i…
juliannguyen4 Jan 13, 2026
5e42215
Fail if error str not found
juliannguyen4 Jan 13, 2026
c8a5257
Pipe has higher precedence than or operator
juliannguyen4 Jan 13, 2026
b2864d7
Just wait for Minting to add a fix to test-register
juliannguyen4 Jan 13, 2026
7ba3e61
Add digest to test container using env var...
juliannguyen4 Jan 22, 2026
b9ba057
fix
juliannguyen4 Jan 23, 2026
2498a13
Fix
juliannguyen4 Jan 23, 2026
3965e24
path already includes perf_regression
juliannguyen4 Jan 23, 2026
a5df6b5
Add ability to run any revision of the qe tests
juliannguyen4 Jan 23, 2026
976e72b
When running test-enqueue we need to specify the correct test code re…
juliannguyen4 Jan 23, 2026
3bcea64
fix
juliannguyen4 Jan 23, 2026
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
29 changes: 29 additions & 0 deletions .github/workflows/build-wheel-and-run-perf-regression-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
permissions:
statuses: write
contents: read
packages: read

on:
workflow_dispatch:
inputs:
test-definition:
required: true
description: Test definition

jobs:
build-wheel-for-feature-branch:
uses: ./.github/workflows/build-wheels.yml
with:
# TODO: single source
platform-tag: manylinux_x86_64
python-tags: '["cp310"]'
sha-to-build-and-test: ${{ github.sha }}
secrets: inherit

run-qe-test:
needs: build-wheel-for-feature-branch
uses: ./.github/workflows/run-qe-test.yml
with:
get-wheel-from-jfrog: false
test-definition: ${{ inputs.test-definition }}
secrets: inherit
357 changes: 357 additions & 0 deletions .github/workflows/run-qe-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,357 @@
run-name: "Run QE test (python-client-version=${{ inputs.python-client-version-in-jfrog-to-test }}, feature=${{ inputs.feature }}, num_records=${{ inputs.num_records }}, insert_mode=${{ inputs.insert_mode }})"

permissions:
contents: read
id-token: write

on:
workflow_dispatch:
inputs:
python-client-version-in-jfrog-to-test:
type: string
required: true
description: Python client version
test-definition:
type: string
required: true
description: "Test definition without the branch (i.e remove '<branch>@')"
test-code-revision:
type: string
required: true
description: "Test code revision"
feature:
required: true
description: "Client feature to test"
num_records:
type: number
default: 1000000
description: Number of records to use in workload
insert_mode:
required: true
type: choice
description: Insert mode means don't check for outliers.
options:
- insert
- outlier
workflow_call:
inputs:
# workflow_call hack
is-workflow-call:
type: boolean
default: true
required: false
get-wheel-from-jfrog:
type: boolean
default: true
required: false
# Optional since calling workflow can also pass in their own wheel built from a feature branch
python-client-version-in-jfrog-to-test:
type: string
required: false
description: Python client version
test-code-revision:
type: string
required: true
description: "Test code revision"
test-definition:
type: string
required: true
description: "Test definition without the branch (i.e remove '<branch>@')"

# Prevent another job from overriding the Docker image
concurrency:
group: ${{ github.workflow }}

jobs:
# For this job, I used Andrew Kim's workflow in qe-docker repo as a reference
# https://github.com/citrusleaf/qe-docker/commit/d72f2d3fda70e199e24f4f670811d6e33e7f92be
add-python-client-to-qe-test-image-for-performance-regression-tests:
env:
WHEEL_ARCH: x86_64
outputs:
new-test-image-digest: ${{ steps.build.outputs.digest }}
runs-on: ubuntu-24.04-arm
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Get Github action to download wheel from JFrog
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
path: aerospike-client-python

- name: Get Github actions workflow to build Docker image
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: citrusleaf/qe-docker
path: qe-docker
ref: cicd-client-performance-regression-tests-requirements-txt
token: ${{ secrets.CLIENT_BOT_PAT }}

- uses: ./aerospike-client-python/.github/actions/get-artifact-for-stage-tests
with:
# Calling workflow only builds wheel from source
get_from_jfrog: ${{ inputs.is-workflow-call == false && true || inputs.get-wheel-from-jfrog }}
jfrog_build_version: ${{ inputs.python-client-version-in-jfrog-to-test }}
dist_type_to_get: 'wheel'
wheel_python_version: '3.10'
wheel_os: manylinux
wheel_cpu_arch: ${{ env.WHEEL_ARCH }}
JFROG_PLATFORM_URL: ${{ secrets.JFROG_PLATFORM_URL }}
JFROG_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }}
JFROG_REPO_NAME: ${{ vars.JFROG_REPO_NAME }}

- name: Add wheel to staging folder for building Docker image
run: mv *linux*${{ env.WHEEL_ARCH }}*.whl qe-docker/test/python/_files/

- name: Log in to QE's Docker registry to download base image and publish new image
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ secrets.QE_DOCKER_REGISTRY_URL }}
username: ${{ secrets.QE_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.QE_DOCKER_REGISTRY_PASSWORD }}

# No way to set our own tag
# - run: ./bin/build -b -p -m test/python/3.11-mavenAnsible-client.Dockerfile

- name: Build and push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
id: build
with:
push: true
# TODO: set branch in tag
file: ./qe-docker/test/python/${{ env.TEST_IMAGE_TAG }}.Dockerfile
# Although our client perf test definitions state the test images where the tag doesn't have the arm- prefix
# Bob seems to look for the same tag from the test definition, but prefixed with arm-
tags: ${{ secrets.QE_DOCKER_REGISTRY_URL }}/test/python:arm-${{ env.TEST_IMAGE_TAG }}
context: ./qe-docker/test/python/_files
env:
TEST_IMAGE_TAG: 3.11-mavenAnsible-client

register-test-definition-with-custom-env-var-parameters:
needs: add-python-client-to-qe-test-image-for-performance-regression-tests
runs-on: ubuntu-24.04
env:
REGISTER_FILE_PATH_IN_REPO: perf_regression/register-client-tests.yaml
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
# TODO: composite action for this would be helpful
# TODO: need special testctl not in jfrog yet
- name: Get test-register
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: citrusleaf/qe-tools
token: ${{ secrets.CLIENT_BOT_PAT }}
path: qe-tools
sparse-checkout: |
bin/test-register
sparse-checkout-cone-mode: false

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

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

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

- 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

- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
# Entire repo must be cloned because the test definition includes this repo
repository: citrusleaf/aerospike-tests-python
token: ${{ secrets.CLIENT_BOT_PAT }}
path: aerospike-tests-python
ref: ${{ inputs.test-code-revision }}
fetch-depth: 0

- run: cp ${{ env.REGISTER_FILE_PATH_IN_REPO }}.template ${{ env.REGISTER_FILE_PATH_IN_REPO }}
working-directory: aerospike-tests-python/

- name: Environment variable overrides
run: |
yq eval ".perf_regression/client_centered.environment.MODE = \"${{ inputs.insert_mode }}\"" -i ${{ env.REGISTER_FILE_PATH_IN_REPO }}
yq eval ".perf_regression/client_centered.environment.NUM_RECORDS = \"${{ inputs.num_records }}\"" -i ${{ env.REGISTER_FILE_PATH_IN_REPO }}
yq eval ".perf_regression/client_centered.environment.FEATURE = \"${{ inputs.feature }}\"" -i ${{ env.REGISTER_FILE_PATH_IN_REPO }}
yq eval ".perf_regression/client_centered.environment.TEST_IMAGE_DIGEST = \"${{ needs.add-python-client-to-qe-test-image-for-performance-regression-tests.outputs.new-test-image-digest }}\"" -i ${{ env.REGISTER_FILE_PATH_IN_REPO }}
cat ${{ env.REGISTER_FILE_PATH_IN_REPO }}
working-directory: aerospike-tests-python

- uses: tailscale/github-action@53acf823325fe9ca47f4cdaa951f90b4b0de5bb9
with:
oauth-client-id: ${{ vars.TAILSCALE_OIDC_CLIENT_ID }}
audience: ${{ vars.TAILSCALE_OIDC_AUDIENCE }}
tags: tag:aerospike-oidc
args: --exit-node=${{ vars.TAILSCALE_EXIT_NODE}}
version: 1.92.5

- run: test-register --config staging ./${{ env.REGISTER_FILE_PATH_IN_REPO }}
working-directory: aerospike-tests-python

run-qe-test:
env:
TEST_CONFIG_FILE_NAME: client_perf.yaml
TESTCTL_BINARY_NAME: testctl
runs-on: ubuntu-24.04
needs: [
register-test-definition-with-custom-env-var-parameters
]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
# - 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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@5b06f730cc5a6f55d78b30753f8583454b08c0aa # v4.8.1
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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

- name: Set the test code revision to run.
run: yq -i '.definitions.std.[0] = "${{ inputs.test-code-revision }}@${{ inputs.test-definition }}"' ${{ env.TEST_CONFIG_FILE_NAME }}
working-directory: aerospike-client-python/test/

- name: Tailscale VPN
uses: tailscale/github-action@53acf823325fe9ca47f4cdaa951f90b4b0de5bb9
with:
oauth-client-id: ${{ vars.TAILSCALE_OIDC_CLIENT_ID }}
audience: ${{ vars.TAILSCALE_OIDC_AUDIENCE }}
tags: tag:aerospike-oidc
args: --exit-node=${{ vars.TAILSCALE_EXIT_NODE}}
version: 1.92.5

- name: Enqueue test run and fail fast if unable to enqueue
# if: ${{ false }}
run: |
test-enqueue --config staging --deployment perf_client ${{ env.TEST_CONFIG_FILE_NAME }} | tee test-enqueue-output.log
enqueue_count=$(grep "COUNT:" test-enqueue-output.log | 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/

# - name: Print test logs in real time
# 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/stage-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: Stage tests
# The purpose is to test that our artifacts work on the Linux distros / OS versions that the client supports
# and QE doesn't have enough disk space for more Linux distros, so we have some tests here in Github Actions

permissions:
contents: read

on:
workflow_call:
inputs:
Expand Down
Loading
Loading