forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CherryPick(vitessio#13799): Endtoend: stress tests for VTGate FOREIGN…
… KEY support (vitessio#3199) * cherry pick of 13799 * resolved conflict Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * make generate_ci_workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
- Loading branch information
1 parent
f0ff0b8
commit ccf4159
Showing
9 changed files
with
1,268 additions
and
15 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" | ||
|
||
name: Cluster (vtgate_foreignkey_stress) | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Run endtoend tests on Cluster (vtgate_foreignkey_stress) | ||
runs-on: ubuntu-shr | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Configure git private repo access | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PLANETSCALE_ACTIONS_BOT_TOKEN }} | ||
run: | | ||
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/" | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.1 | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
|
||
- name: Tune the OS | ||
run: | | ||
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" | ||
# Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio | ||
echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf | ||
sudo sysctl -p /etc/sysctl.conf | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get dependencies | ||
env: # Or as an environment variable | ||
AWS_ACCESS_KEY_ID: ${{ secrets.BUILDKITE_S3_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILDKITE_S3_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: us-east-1 | ||
run: | | ||
sudo apt-get update | ||
# stop any existing running instance of mysql | ||
sudo service mysql stop | ||
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
# Uninstall any previously installed MySQL first | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common | ||
sudo apt-get -y autoremove | ||
sudo apt-get -y autoclean | ||
sudo deluser mysql | ||
sudo rm -rf /var/lib/mysql | ||
sudo rm -rf /etc/mysql | ||
# install necessary tools | ||
sudo apt-get install -y make unzip g++ etcd curl git wget awscli eatmydata xz-utils libncurses5 | ||
sudo service etcd stop | ||
# Get latest version of mysql from s3 bucket | ||
LATEST_BUILD=$(aws s3api list-objects-v2 --bucket "planetscale-mysql-server-private-ci-artifacts" --prefix mysql/main/dist --query 'reverse(sort_by(Contents[?contains(Key, `jammy`)], &LastModified))[:1].Key' --output=text) | ||
echo "latest build is $LATEST_BUILD" | ||
# Pin this to 8.0.34 | ||
LAST_BUILD="mysql/main/dist/mysql-8.0.34.20230901-ps-4dc8f581f5f-jammy-linux-x86_64.tar.gz" | ||
echo "installing psdb mysql $LAST_BUILD" | ||
aws s3 cp "s3://planetscale-mysql-server-private-ci-artifacts/${LAST_BUILD}" . | ||
sudo tar xf $(basename $LAST_BUILD) -v -C /usr --strip-components=1 | ||
go mod download | ||
- name: Run cluster endtoend test | ||
timeout-minutes: 45 | ||
run: | | ||
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file | ||
# which musn't be more than 107 characters long. | ||
export VTDATAROOT="/tmp/" | ||
source build.env | ||
set -exo pipefail | ||
eatmydata -- go run test.go -docker=false -follow -shard vtgate_foreignkey_stress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.