-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Testing upgrade path from / downgrade path to v8.0.0 #7294
Merged
shlomi-noach
merged 32 commits into
vitessio:master
from
planetscale:ci-version-upgrade
Jan 20, 2021
Merged
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c22820d
WIP: testing version upgrade
shlomi-noach f6b2e1a
add test to endtoend list
shlomi-noach fbb713c
add workflow file
shlomi-noach 54503c8
test file
shlomi-noach 28a755e
refactor test structure
shlomi-noach 895077c
force vtdataroot path, base tablet uid, base port
shlomi-noach f10861a
skip creating keyspace
shlomi-noach 2d37ac8
avoid initializing mysql if reusing data; expect tablets to be SERVIN…
shlomi-noach 1c60d40
only creating and populating table if we created mysql in the first p…
shlomi-noach b52d1cf
renamed test. there's nothing 8.0 specific about it
shlomi-noach b59281c
renamed versionupgrade directory
shlomi-noach b47c567
some comments explaining the purpose of upgrade_test
shlomi-noach 2ea57f0
supply force flags for versionupgrade test
shlomi-noach 95bc6ce
run PR vs v8.0.0
shlomi-noach f56f458
a bit of debug info
shlomi-noach 6177d1f
keep-data on test.go level
shlomi-noach b12482b
skip build
shlomi-noach e3837db
adding debug info
shlomi-noach 7556694
adding debug info
shlomi-noach d8a5229
backup and restore bin/ dir
shlomi-noach 38546d6
adding debug info
shlomi-noach a85e9e0
building HEAD branch, and then copying v8.0.0 binaries on top
shlomi-noach e6bd0e4
explicit ddl_strategy
shlomi-noach 4da6114
temporary: trying with normal HEAD build
shlomi-noach 9a5814d
do not pass -ddl_strategy for v8.0.0
shlomi-noach 5077c18
copy directory
shlomi-noach e62170a
comments
shlomi-noach 447cdd5
test downgrade path
shlomi-noach 52e0bcf
build.env
shlomi-noach 510917a
refactor steps a bit to make them more symmetrical
shlomi-noach a08be65
copyright year
shlomi-noach 3c52a4c
typo
shlomi-noach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,105 @@ | ||
name: Cluster (upgrade) | ||
on: [push, pull_request] | ||
jobs: | ||
|
||
build: | ||
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.15 | ||
|
||
- name: Check out v8.0.0 | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: v8.0.0 | ||
|
||
- name: Get dependencies | ||
run: | | ||
# This prepares general purpose binary dependencies | ||
# as well as v8.0.0 specific go modules | ||
sudo apt-get update | ||
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata | ||
sudo service mysql stop | ||
sudo service etcd stop | ||
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
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 v8.0.0 binaries | ||
timeout-minutes: 10 | ||
run: | | ||
# We build v8.0.0 binaries and save them in a temporary location | ||
source build.env | ||
make build | ||
mkdir -p /tmp/vitess-build-v8.0.0/ | ||
cp -R bin /tmp/vitess-build-v8.0.0/ | ||
|
||
- name: Check out HEAD | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run cluster endtoend test v8.0.0 (create cluster) | ||
timeout-minutes: 5 | ||
run: | | ||
# By checking out we deleted bin/ directory. We now restore our pre-built v8.0.0 binaries | ||
cp -R /tmp/vitess-build-v8.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 he v8.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 v8.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 v8.0.0 based on HEAD data (downgrade path) | ||
timeout-minutes: 5 | ||
run: | | ||
# /tmp/vtdataroot exists from previous test | ||
cp -R /tmp/vitess-build-v8.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 |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.