Backport: Testing version upgrade/downgrade path from/to 8.0#7323
Merged
deepthi merged 1 commit intovitessio:release-9.0from Jan 20, 2021
Merged
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
8 tasks
deepthi
approved these changes
Jan 20, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Backport of #7294
Copy of comment from #7294 :
Followup to team discussion, we wish to add CI (endtoend) tests that validate an upgrade from a previous tagged version.
This PR introduces
endtoendversion upgrade test, specifically testing an upgrade path fromv8.0.0. (side note,v9.0.0will be released later this month, and then we will add a test for av9.0.0upgrade path).The test verifies that a vitess cluster which was built, started and populated by a
v8.0.0release, is readable by aHEAD(the PR branch) build.The way this works:
.github/workflows/cluster_endtoend_upgrade.ymlis the workflow filev8.0.0, and builds the binariesHEADv8.0.0go/test/endtoend/versionupgrade/upgrade_test.go-keep-data)HEADagain, cleaning up the workflow running directoryHEADetcd2loads from existing datamysqldstarts with existing datavttablets start with existing data (and are already inSERVINGmode)So this test basically starts a "latest" version of Vitess on top of preexisting
v8.0.0data, andSELECTs data from tables to prove the upgrade is good.We may add additional tests to verify the upgrade path is good.
What kind of changes were made:
endtoendtests intentionally randomized paths, ports, etc. But we have to be able to run two vitess clusters on exact same paths, ports etc. To that effect we introduce these flags:-force-vtdataroot(path)-force-port-start(port number)-force-base-tablet-uid(number)With these three supplied, all locations and ports are idempotent.
test.gohas a-skip-buildflag; this is required because we want to be able to run the latest upgrade test, on a past release, which may not have this test (specifically,v8.0.0does not have this test). We use this to run a latest test on top of pre-builtv8.0.0binaries.LocalProcessClusterhas a field calledReusingVTDATAROOTwhich indicates whether this cluster started from empty, and initialized itself (false), or whether the cluster reused an existing dataset (true)cluster_process.gouses that field to decide whether it should initializemysql, or create keyspaces, or what state it expects tablet to start with, etc.-
go/test/endtoend/cluster/vtctlclient_process.gouses that field to determine if it needs to populate database tables and data or not.Symmetrically, the workflow also tests a downgrade path.
Checklist
Impacted Areas in Vitess
Components that this PR will affect: