add invalidation via stream to redis #80
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
name: Cluster (upgrade) | |
on: [push, pull_request] | |
jobs: | |
build: | |
if: github.repository == 'vitessio/vitess' | |
name: Run endtoend tests on Cluster (upgrade) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.16 | |
- name: Tune the OS | |
run: | | |
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range | |
# TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 | |
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | |
run: | | |
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | |
# DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! | |
- name: Check out v9.0.0 | |
uses: actions/checkout@v2 | |
with: | |
ref: v9.0.0 | |
- name: Get dependencies | |
run: | | |
# This prepares general purpose binary dependencies | |
# as well as v9.0.0 specific go modules | |
sudo DEBIAN_FRONTEND="noninteractive" apt-get update | |
# Uninstall any previously installed MySQL first | |
sudo systemctl stop apparmor | |
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 mysql80 | |
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb | |
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections | |
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* | |
sudo apt-get update | |
sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server mysql-client | |
# Install everything else we need, and configure | |
sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata | |
sudo service mysql stop | |
sudo service etcd stop | |
sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 | |
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | |
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" | |
go mod download | |
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb | |
sudo apt-get install -y gnupg2 | |
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb | |
sudo apt-get update | |
sudo apt-get install percona-xtrabackup-24 | |
- name: Building v9.0.0 binaries | |
timeout-minutes: 10 | |
run: | | |
# We build v9.0.0 binaries and save them in a temporary location | |
source build.env | |
make build | |
mkdir -p /tmp/vitess-build-v9.0.0/ | |
cp -R bin /tmp/vitess-build-v9.0.0/ | |
- name: Check out HEAD | |
uses: actions/checkout@v2 | |
- name: Run cluster endtoend test v9.0.0 (create cluster) | |
timeout-minutes: 5 | |
run: | | |
# By checking out we deleted bin/ directory. We now restore our pre-built v9.0.0 binaries | |
cp -R /tmp/vitess-build-v9.0.0/bin . | |
# create the directory where we store test data; ensure it is empty: | |
rm -rf /tmp/vtdataroot | |
mkdir -p /tmp/vtdataroot | |
source build.env | |
# We pass -skip-build so that we use the v9.0.0 binaries, not HEAD binaries | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 | |
- name: Check out HEAD | |
uses: actions/checkout@v2 | |
- name: Building HEAD binaries | |
timeout-minutes: 10 | |
run: | | |
go mod download | |
source build.env | |
make build | |
mkdir -p /tmp/vitess-build-head/ | |
cp -R bin /tmp/vitess-build-head/ | |
- name: Run cluster endtoend test HEAD based on v9.0.0 data (upgrade path) | |
timeout-minutes: 5 | |
run: | | |
# /tmp/vtdataroot exists from previous test | |
source build.env | |
# We built HEAD binaries manually in previous step and there's no need for the test to build. | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 | |
- name: Run cluster endtoend test HEAD (create cluster) | |
timeout-minutes: 5 | |
run: | | |
# create the directory where we store test data; ensure it is empty: | |
rm -rf /tmp/vtdataroot | |
mkdir -p /tmp/vtdataroot | |
source build.env | |
# We still have the binaries from previous step. No need to build | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 | |
- name: Run cluster endtoend test v9.0.0 based on HEAD data (downgrade path) | |
timeout-minutes: 5 | |
run: | | |
# /tmp/vtdataroot exists from previous test | |
cp -R /tmp/vitess-build-v9.0.0/bin . | |
source build.env | |
# We again built manually and there's no need for the test to build. | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 |