vitess-gh/test/ci_workflow_gen.go

453 строки
12 KiB
Go
Исходник Обычный вид История

/*
Copyright 2021 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"bytes"
"fmt"
"log"
"os"
"path"
"strings"
"text/template"
)
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
type mysqlVersion string
const (
mysql57 mysqlVersion = "mysql57"
mysql80 mysqlVersion = "mysql80"
mariadb103 mysqlVersion = "mariadb103"
defaultMySQLVersion mysqlVersion = mysql57
)
type mysqlVersions []mysqlVersion
var (
defaultMySQLVersions = []mysqlVersion{defaultMySQLVersion}
mysql80OnlyVersions = []mysqlVersion{mysql80}
allMySQLVersions = []mysqlVersion{mysql57, mysql80}
)
var (
unitTestDatabases = []mysqlVersion{mysql57, mysql80, mariadb103}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
)
const (
workflowConfigDir = "../.github/workflows"
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
unitTestTemplate = "templates/unit_test.tpl"
// An empty string will cause the default non platform specific template
// to be used.
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
clusterTestTemplate = "templates/cluster_endtoend_test%s.tpl"
unitTestSelfHostedTemplate = "templates/unit_test_self_hosted.tpl"
unitTestSelfHostedDatabases = ""
dockerFileTemplate = "templates/dockerfile.tpl"
clusterTestSelfHostedTemplate = "templates/cluster_endtoend_test_self_hosted.tpl"
clusterTestDockerTemplate = "templates/cluster_endtoend_test_docker.tpl"
)
var (
// Clusters 10, 25 are executed on docker, using the docker_test_cluster 10, 25 workflows.
// Hence, they are not listed in the list below.
clusterList = []string{
"vtctlbackup_sharded_clustertest_heavy",
"12",
"13",
"ers_prs_newfeatures_heavy",
"15",
Address flakiness of vtgate_vindex.prefixfanout tests (#10216) * Wait for vtgate and tablets to be healthy in prefixfanout tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Setup already waits for vtgate proceess to be healthy Signed-off-by: Matt Lord <mattalord@gmail.com> * Let's give tablets more time to become healthy Sometimes GitHub Actions is *super* slow and our tests should still be able to pass. Signed-off-by: Matt Lord <mattalord@gmail.com> * Wait longer and check more frequently Signed-off-by: Matt Lord <mattalord@gmail.com> * Mark vtgate_vindex test as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * 60s is a more than reasonable upper limit in tablet+mysqld startup Signed-off-by: Matt Lord <mattalord@gmail.com> * Also rename 17->vtgate_general and mark as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * Update test config to match workflow renames Signed-off-by: Matt Lord <mattalord@gmail.com> * Rename 20 to xb_backup And get related files aligned Signed-off-by: Matt Lord <mattalord@gmail.com> * Actually wait for all tablets in all shards to be healthy We were waiting for 1 replica tablet when the clsuter defined for the test did not have any replica tablets. Signed-off-by: Matt Lord <mattalord@gmail.com> * We need to reset the replica and rdonly table counts for each shard Signed-off-by: Matt Lord <mattalord@gmail.com> * Add log msg and get rid of extra flags added Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests again Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests one last time for goodness sake Signed-off-by: Matt Lord <mattalord@gmail.com> * Minor correction to new Info log msg Signed-off-by: Matt Lord <mattalord@gmail.com>
2022-05-05 06:02:40 +03:00
"vtgate_general_heavy",
Add MySQL 8 Support to Backup Tests (#10691) * Add support for MySQL 8.0 in backup tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Add 8.0 workflow Signed-off-by: Matt Lord <mattalord@gmail.com> * whitespace Signed-off-by: Matt Lord <mattalord@gmail.com> * Use vtctldclient SetKeyspaceDurabilityPolicy to manage semi-sync This needed to be done after the shard was setup in order to satisfy the semantic assumptions related to semi-sync in the tests. Signed-off-by: Matt Lord <mattalord@gmail.com> * Remove extraneous changes Signed-off-by: Matt Lord <mattalord@gmail.com> * We need lz4 for TestXtrabackupStreamWithlz4Compression Signed-off-by: Matt Lord <mattalord@gmail.com> * Try using Percona Repo for MySQL 8 to align mysqld and xtrabackup versions Signed-off-by: Matt Lord <mattalord@gmail.com> * Specify stream type everywhere Signed-off-by: Matt Lord <mattalord@gmail.com> * Remove repeated server install Signed-off-by: Matt Lord <mattalord@gmail.com> * Moar... Signed-off-by: Matt Lord <mattalord@gmail.com> * Move vtctlbackup test to 8.0 Signed-off-by: Matt Lord <mattalord@gmail.com> * Rename vtbackup test and move to MySQL 8 Signed-off-by: Matt Lord <mattalord@gmail.com> * Split the xbstream tests so the workflow doesn't time out Otherwise it was going over the 10min limit and getting killed. Signed-off-by: Matt Lord <mattalord@gmail.com> * Use MySQL 8 compat method for setting passwords Signed-off-by: Matt Lord <mattalord@gmail.com> * Test increasing timeout at another level Signed-off-by: Matt Lord <mattalord@gmail.com> * Don't use the init passwords file with 8.0 mysqlctl doesn't start... This is likely due to the change in initialization behavior with MySQL 8.0 as it goes though two phases and you can't simply start up mysqld and pass it data, it has to initialize and restart first. Signed-off-by: Matt Lord <mattalord@gmail.com> * Fix incorrect password update statement for vt_repl user Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Bump timeouts for 8.0 backup tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Bump it more :( Signed-off-by: Matt Lord <mattalord@gmail.com> * Increase backup/restore timeout in backup_utils Signed-off-by: Matt Lord <mattalord@gmail.com> * Apply new 8.0 template everywhere Signed-off-by: Matt Lord <mattalord@gmail.com> * Fix bugs around how the compression flags were getting passed Signed-off-by: Matt Lord <mattalord@gmail.com> * Use 45m timeout for the workflow, 30m for the run. Signed-off-by: Matt Lord <mattalord@gmail.com> * These changes were no longer needed so limiting diff. Signed-off-by: Matt Lord <mattalord@gmail.com> * Explicitly skip new linter check Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Rohit Nayak <rohit@planetscale.com>
2022-07-20 22:54:56 +03:00
"vtbackup_transform",
"18",
Address flakiness of vtgate_vindex.prefixfanout tests (#10216) * Wait for vtgate and tablets to be healthy in prefixfanout tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Setup already waits for vtgate proceess to be healthy Signed-off-by: Matt Lord <mattalord@gmail.com> * Let's give tablets more time to become healthy Sometimes GitHub Actions is *super* slow and our tests should still be able to pass. Signed-off-by: Matt Lord <mattalord@gmail.com> * Wait longer and check more frequently Signed-off-by: Matt Lord <mattalord@gmail.com> * Mark vtgate_vindex test as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * 60s is a more than reasonable upper limit in tablet+mysqld startup Signed-off-by: Matt Lord <mattalord@gmail.com> * Also rename 17->vtgate_general and mark as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * Update test config to match workflow renames Signed-off-by: Matt Lord <mattalord@gmail.com> * Rename 20 to xb_backup And get related files aligned Signed-off-by: Matt Lord <mattalord@gmail.com> * Actually wait for all tablets in all shards to be healthy We were waiting for 1 replica tablet when the clsuter defined for the test did not have any replica tablets. Signed-off-by: Matt Lord <mattalord@gmail.com> * We need to reset the replica and rdonly table counts for each shard Signed-off-by: Matt Lord <mattalord@gmail.com> * Add log msg and get rid of extra flags added Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests again Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests one last time for goodness sake Signed-off-by: Matt Lord <mattalord@gmail.com> * Minor correction to new Info log msg Signed-off-by: Matt Lord <mattalord@gmail.com>
2022-05-05 06:02:40 +03:00
"xb_backup",
"21",
"22",
"mysql_server_vault",
"26",
"vstream_failover",
"vstream_stoponreshard_true",
"vstream_stoponreshard_false",
"vstream_with_keyspaces_to_watch",
"onlineddl_ghost",
"onlineddl_vrepl",
"onlineddl_vrepl_stress",
"onlineddl_vrepl_stress_suite",
"onlineddl_vrepl_suite",
"vreplication_migrate_vdiff2_convert_tz",
"onlineddl_revert",
"onlineddl_declarative",
"onlineddl_singleton",
"onlineddl_scheduler",
"onlineddl_revertible",
"tabletmanager_throttler",
"tabletmanager_throttler_custom_config",
"tabletmanager_tablegc",
"tabletmanager_consul",
"vtgate_concurrentdml",
"vtgate_godriver",
"vtgate_gen4",
"vtgate_readafterwrite",
"vtgate_reservedconn",
"vtgate_schema",
"vtgate_tablet_healthcheck_cache",
"vtgate_topo",
"vtgate_topo_consul",
"vtgate_topo_etcd",
"vtgate_transaction",
"vtgate_unsharded",
Address flakiness of vtgate_vindex.prefixfanout tests (#10216) * Wait for vtgate and tablets to be healthy in prefixfanout tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Setup already waits for vtgate proceess to be healthy Signed-off-by: Matt Lord <mattalord@gmail.com> * Let's give tablets more time to become healthy Sometimes GitHub Actions is *super* slow and our tests should still be able to pass. Signed-off-by: Matt Lord <mattalord@gmail.com> * Wait longer and check more frequently Signed-off-by: Matt Lord <mattalord@gmail.com> * Mark vtgate_vindex test as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * 60s is a more than reasonable upper limit in tablet+mysqld startup Signed-off-by: Matt Lord <mattalord@gmail.com> * Also rename 17->vtgate_general and mark as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * Update test config to match workflow renames Signed-off-by: Matt Lord <mattalord@gmail.com> * Rename 20 to xb_backup And get related files aligned Signed-off-by: Matt Lord <mattalord@gmail.com> * Actually wait for all tablets in all shards to be healthy We were waiting for 1 replica tablet when the clsuter defined for the test did not have any replica tablets. Signed-off-by: Matt Lord <mattalord@gmail.com> * We need to reset the replica and rdonly table counts for each shard Signed-off-by: Matt Lord <mattalord@gmail.com> * Add log msg and get rid of extra flags added Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests again Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests one last time for goodness sake Signed-off-by: Matt Lord <mattalord@gmail.com> * Minor correction to new Info log msg Signed-off-by: Matt Lord <mattalord@gmail.com>
2022-05-05 06:02:40 +03:00
"vtgate_vindex_heavy",
"vtgate_vschema",
"vtgate_queries",
"vtgate_schema_tracker",
"xb_recovery",
"mysql80",
"vreplication_across_db_versions",
"vreplication_multicell",
"vreplication_cellalias",
"vreplication_basic",
"vreplication_v2",
"schemadiff_vrepl",
"topo_connection_cache",
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
"vtgate_partial_keyspace",
}
clusterSelfHostedList = []string{
"vtorc",
"vtorc_8.0",
}
clusterDockerList = []string{}
clustersRequiringXtraBackup = []string{
Address flakiness of vtgate_vindex.prefixfanout tests (#10216) * Wait for vtgate and tablets to be healthy in prefixfanout tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Setup already waits for vtgate proceess to be healthy Signed-off-by: Matt Lord <mattalord@gmail.com> * Let's give tablets more time to become healthy Sometimes GitHub Actions is *super* slow and our tests should still be able to pass. Signed-off-by: Matt Lord <mattalord@gmail.com> * Wait longer and check more frequently Signed-off-by: Matt Lord <mattalord@gmail.com> * Mark vtgate_vindex test as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * 60s is a more than reasonable upper limit in tablet+mysqld startup Signed-off-by: Matt Lord <mattalord@gmail.com> * Also rename 17->vtgate_general and mark as heavy Signed-off-by: Matt Lord <mattalord@gmail.com> * Update test config to match workflow renames Signed-off-by: Matt Lord <mattalord@gmail.com> * Rename 20 to xb_backup And get related files aligned Signed-off-by: Matt Lord <mattalord@gmail.com> * Actually wait for all tablets in all shards to be healthy We were waiting for 1 replica tablet when the clsuter defined for the test did not have any replica tablets. Signed-off-by: Matt Lord <mattalord@gmail.com> * We need to reset the replica and rdonly table counts for each shard Signed-off-by: Matt Lord <mattalord@gmail.com> * Add log msg and get rid of extra flags added Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests again Signed-off-by: Matt Lord <mattalord@gmail.com> * run CI tests one last time for goodness sake Signed-off-by: Matt Lord <mattalord@gmail.com> * Minor correction to new Info log msg Signed-off-by: Matt Lord <mattalord@gmail.com>
2022-05-05 06:02:40 +03:00
"xb_backup",
"xb_recovery",
}
clustersRequiringMakeTools = []string{
"18",
"mysql_server_vault",
"vtgate_topo_consul",
"tabletmanager_consul",
}
)
type unitTest struct {
Name, Platform, FileName string
}
type clusterTest struct {
Name, Shard, Platform string
FileName string
MakeTools, InstallXtraBackup bool
Ubuntu20, Docker bool
LimitResourceUsage bool
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
PartialKeyspace bool
}
type selfHostedTest struct {
Name, Platform, Dockerfile, Shard, ImageName, directoryName string
FileName string
MakeTools, InstallXtraBackup, Docker bool
}
func needsUbuntu20(clusterName string, mysqlVersion mysqlVersion) bool {
return mysqlVersion == mysql80 || strings.HasPrefix(clusterName, "vtgate") || strings.HasPrefix(clusterName, "tabletmanager")
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
// clusterMySQLVersions return list of mysql versions (one or more) that this cluster needs to test against
func clusterMySQLVersions(clusterName string) mysqlVersions {
switch {
case strings.HasPrefix(clusterName, "onlineddl_"):
return allMySQLVersions
case clusterName == "schemadiff_vrepl":
return allMySQLVersions
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
case clusterName == "tabletmanager_tablegc":
return allMySQLVersions
case clusterName == "mysql80":
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
return mysql80OnlyVersions
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
case clusterName == "vtorc_8.0":
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
return mysql80OnlyVersions
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
case clusterName == "vreplication_across_db_versions":
return []mysqlVersion{mysql80}
Add MySQL 8 Support to Backup Tests (#10691) * Add support for MySQL 8.0 in backup tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Add 8.0 workflow Signed-off-by: Matt Lord <mattalord@gmail.com> * whitespace Signed-off-by: Matt Lord <mattalord@gmail.com> * Use vtctldclient SetKeyspaceDurabilityPolicy to manage semi-sync This needed to be done after the shard was setup in order to satisfy the semantic assumptions related to semi-sync in the tests. Signed-off-by: Matt Lord <mattalord@gmail.com> * Remove extraneous changes Signed-off-by: Matt Lord <mattalord@gmail.com> * We need lz4 for TestXtrabackupStreamWithlz4Compression Signed-off-by: Matt Lord <mattalord@gmail.com> * Try using Percona Repo for MySQL 8 to align mysqld and xtrabackup versions Signed-off-by: Matt Lord <mattalord@gmail.com> * Specify stream type everywhere Signed-off-by: Matt Lord <mattalord@gmail.com> * Remove repeated server install Signed-off-by: Matt Lord <mattalord@gmail.com> * Moar... Signed-off-by: Matt Lord <mattalord@gmail.com> * Move vtctlbackup test to 8.0 Signed-off-by: Matt Lord <mattalord@gmail.com> * Rename vtbackup test and move to MySQL 8 Signed-off-by: Matt Lord <mattalord@gmail.com> * Split the xbstream tests so the workflow doesn't time out Otherwise it was going over the 10min limit and getting killed. Signed-off-by: Matt Lord <mattalord@gmail.com> * Use MySQL 8 compat method for setting passwords Signed-off-by: Matt Lord <mattalord@gmail.com> * Test increasing timeout at another level Signed-off-by: Matt Lord <mattalord@gmail.com> * Don't use the init passwords file with 8.0 mysqlctl doesn't start... This is likely due to the change in initialization behavior with MySQL 8.0 as it goes though two phases and you can't simply start up mysqld and pass it data, it has to initialize and restart first. Signed-off-by: Matt Lord <mattalord@gmail.com> * Fix incorrect password update statement for vt_repl user Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Bump timeouts for 8.0 backup tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Bump it more :( Signed-off-by: Matt Lord <mattalord@gmail.com> * Increase backup/restore timeout in backup_utils Signed-off-by: Matt Lord <mattalord@gmail.com> * Apply new 8.0 template everywhere Signed-off-by: Matt Lord <mattalord@gmail.com> * Fix bugs around how the compression flags were getting passed Signed-off-by: Matt Lord <mattalord@gmail.com> * Use 45m timeout for the workflow, 30m for the run. Signed-off-by: Matt Lord <mattalord@gmail.com> * These changes were no longer needed so limiting diff. Signed-off-by: Matt Lord <mattalord@gmail.com> * Explicitly skip new linter check Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Rohit Nayak <rohit@planetscale.com>
2022-07-20 22:54:56 +03:00
case clusterName == "xb_backup":
return allMySQLVersions
case clusterName == "vtctlbackup_sharded_clustertest_heavy":
return []mysqlVersion{mysql80}
case clusterName == "vtbackup_transform":
return []mysqlVersion{mysql80}
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
case clusterName == "vtgate_partial_keyspace":
return []mysqlVersion{mysql80}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
default:
return defaultMySQLVersions
}
}
func mergeBlankLines(buf *bytes.Buffer) string {
var out []string
in := strings.Split(buf.String(), "\n")
lastWasBlank := false
for _, line := range in {
if strings.TrimSpace(line) == "" {
if lastWasBlank {
continue
}
lastWasBlank = true
} else {
lastWasBlank = false
}
out = append(out, line)
}
return strings.Join(out, "\n")
}
func main() {
generateUnitTestWorkflows()
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
generateClusterWorkflows(clusterList, clusterTestTemplate)
generateClusterWorkflows(clusterDockerList, clusterTestDockerTemplate)
// tests that will use self-hosted runners
err := generateSelfHostedUnitTestWorkflows()
if err != nil {
log.Fatal(err)
}
err = generateSelfHostedClusterWorkflows()
if err != nil {
log.Fatal(err)
}
}
func canonnizeList(list []string) []string {
var output []string
for _, item := range list {
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
if item := strings.TrimSpace(item); item != "" {
output = append(output, item)
}
}
return output
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
func parseList(csvList string) []string {
var list []string
for _, item := range strings.Split(csvList, ",") {
if item != "" {
list = append(list, strings.TrimSpace(item))
}
}
return list
}
func generateSelfHostedUnitTestWorkflows() error {
platforms := parseList(unitTestSelfHostedDatabases)
for _, platform := range platforms {
directoryName := fmt.Sprintf("unit_test_%s", platform)
test := &selfHostedTest{
Name: fmt.Sprintf("Unit Test (%s)", platform),
ImageName: fmt.Sprintf("unit_test_%s", platform),
Platform: platform,
directoryName: directoryName,
Dockerfile: fmt.Sprintf("./.github/docker/%s/Dockerfile", directoryName),
MakeTools: true,
InstallXtraBackup: false,
}
err := setupTestDockerFile(test)
if err != nil {
return err
}
test.FileName = fmt.Sprintf("unit_test_%s.yml", platform)
filePath := fmt.Sprintf("%s/%s", workflowConfigDir, test.FileName)
err = writeFileFromTemplate(unitTestSelfHostedTemplate, filePath, test)
if err != nil {
log.Print(err)
}
}
return nil
}
func generateSelfHostedClusterWorkflows() error {
clusters := canonnizeList(clusterSelfHostedList)
for _, cluster := range clusters {
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
for _, mysqlVersion := range clusterMySQLVersions(cluster) {
directoryName := fmt.Sprintf("cluster_test_%s", cluster)
test := &selfHostedTest{
Name: fmt.Sprintf("Cluster (%s)", cluster),
ImageName: fmt.Sprintf("cluster_test_%s", cluster),
Platform: "mysql57",
directoryName: directoryName,
Dockerfile: fmt.Sprintf("./.github/docker/%s/Dockerfile", directoryName),
Shard: cluster,
MakeTools: false,
InstallXtraBackup: false,
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
makeToolClusters := canonnizeList(clustersRequiringMakeTools)
for _, makeToolCluster := range makeToolClusters {
if makeToolCluster == cluster {
test.MakeTools = true
break
}
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
xtraBackupClusters := canonnizeList(clustersRequiringXtraBackup)
for _, xtraBackupCluster := range xtraBackupClusters {
if xtraBackupCluster == cluster {
test.InstallXtraBackup = true
break
}
}
if mysqlVersion == mysql80 {
test.Platform = string(mysql80)
}
mysqlVersionIndicator := ""
if mysqlVersion != defaultMySQLVersion && len(clusterMySQLVersions(cluster)) > 1 {
mysqlVersionIndicator = "_" + string(mysqlVersion)
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
err := setupTestDockerFile(test)
if err != nil {
return err
}
test.FileName = fmt.Sprintf("cluster_endtoend_%s%s.yml", cluster, mysqlVersionIndicator)
filePath := fmt.Sprintf("%s/%s", workflowConfigDir, test.FileName)
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
err = writeFileFromTemplate(clusterTestSelfHostedTemplate, filePath, test)
if err != nil {
log.Print(err)
}
}
}
return nil
}
func generateClusterWorkflows(list []string, tpl string) {
clusters := canonnizeList(list)
for _, cluster := range clusters {
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
for _, mysqlVersion := range clusterMySQLVersions(cluster) {
test := &clusterTest{
Name: fmt.Sprintf("Cluster (%s)", cluster),
Shard: cluster,
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
makeToolClusters := canonnizeList(clustersRequiringMakeTools)
for _, makeToolCluster := range makeToolClusters {
if makeToolCluster == cluster {
test.MakeTools = true
break
}
}
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
xtraBackupClusters := canonnizeList(clustersRequiringXtraBackup)
for _, xtraBackupCluster := range xtraBackupClusters {
if xtraBackupCluster == cluster {
test.InstallXtraBackup = true
break
}
}
if needsUbuntu20(cluster, mysqlVersion) {
test.Ubuntu20 = true
}
if mysqlVersion == mysql80 {
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
test.Platform = string(mysql80)
}
if strings.HasPrefix(cluster, "vreplication") || strings.HasSuffix(cluster, "heavy") {
test.LimitResourceUsage = true
}
mysqlVersionIndicator := ""
if mysqlVersion != defaultMySQLVersion && len(clusterMySQLVersions(cluster)) > 1 {
mysqlVersionIndicator = "_" + string(mysqlVersion)
test.Name = test.Name + " " + string(mysqlVersion)
}
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
if strings.Contains(test.Shard, "partial_keyspace") {
test.PartialKeyspace = true
}
workflowPath := fmt.Sprintf("%s/cluster_endtoend_%s%s.yml", workflowConfigDir, cluster, mysqlVersionIndicator)
templateFileName := tpl
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
if test.Platform != "" {
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
templateFileName = fmt.Sprintf(tpl, "_"+test.Platform)
} else if strings.Contains(templateFileName, "%s") {
templateFileName = fmt.Sprintf(tpl, "")
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
}
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
test.FileName = fmt.Sprintf("cluster_endtoend_%s%s.yml", cluster, mysqlVersionIndicator)
err := writeFileFromTemplate(templateFileName, workflowPath, test)
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
if err != nil {
log.Print(err)
}
}
}
}
func generateUnitTestWorkflows() {
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
for _, platform := range unitTestDatabases {
test := &unitTest{
Name: fmt.Sprintf("Unit Test (%s)", platform),
make generate_ci_workflows: mysql80 workflows for selected tests (#9740) * support multiple mysql versions per cluster Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * generate self-hosted runners mysql80 files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adding cluster_endtoend_onlineddl_*_mysql80 test files Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysqlversion to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add mysql version to test name Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix endtoend vrepl-related tests for mysql80 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tabletmanager_tablegc runs on all versions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * tablegc: tests outcome depend on MySQL version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix check table rows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * updated tablegc test; regenerated workflows Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fix LimitResourceUsage Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * show message on error Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle utf8, utf8mb3 in mysql8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utbmb3 does not need encoding Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * experiment: utf8 instead of utf8mb3 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'message:' is superfluous Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * can't expect PURGE tables to exist in mysql 8 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed commented code Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * allOracleMySQLVersions -> allMySQLVersions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * check view, not table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
2022-05-29 13:28:25 +03:00
Platform: string(platform),
}
test.FileName = fmt.Sprintf("unit_test_%s.yml", platform)
path := fmt.Sprintf("%s/%s", workflowConfigDir, test.FileName)
err := writeFileFromTemplate(unitTestTemplate, path, test)
if err != nil {
log.Print(err)
}
}
}
func setupTestDockerFile(test *selfHostedTest) error {
// remove the directory
relDirectoryName := fmt.Sprintf("../.github/docker/%s", test.directoryName)
err := os.RemoveAll(relDirectoryName)
if err != nil {
return err
}
// create the directory
err = os.MkdirAll(relDirectoryName, 0755)
if err != nil {
return err
}
// generate the docker file
dockerFilePath := path.Join(relDirectoryName, "Dockerfile")
err = writeFileFromTemplate(dockerFileTemplate, dockerFilePath, test)
if err != nil {
return err
}
return nil
}
func writeFileFromTemplate(templateFile, path string, test any) error {
tpl, err := template.ParseFiles(templateFile)
if err != nil {
return fmt.Errorf("Error: %s\n", err)
}
buf := &bytes.Buffer{}
err = tpl.Execute(buf, test)
if err != nil {
return fmt.Errorf("Error: %s\n", err)
}
f, err := os.Create(path)
if err != nil {
return fmt.Errorf("Error creating file: %s\n", err)
}
Partial Movetables: allow moving a table one shard at a time (#9987) * Initial Implementation of partial movetables. Implement cross-shard queries that obey shard routing rules. Refactor rss updation with routed shard and add to multi col resolution. Run vtgate and reservedconn tests for both regular and with a partially moved shard. Add ability to run tests with partial keyspaces by adding to a list in the CI generator. Implement that in test.go and cluster setup. Revert previous iteration of running partial keyspace tests in parallel. One test is failing: TestSetSystemVarAutocommitWithConnError. Add partial vtgate misc test Add partial keyspace tests to vtgate transaction Add vtgate queries partial keyspace tests Review and fix skipped tests where applicable. Refactor to allow conditional skipping of tests for partial keyspaces only so that other tests work exactly as earlier without specifying the DbName, for example Add move shards example Cache routing tables and minor refactor. Move move_shards example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add lookup index to move shards example. Comment error logs while trying to delete from missing _vt.vdiff table Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove move shards demo example Signed-off-by: Rohit Nayak <rohit@planetscale.com> Add vtgate flag to enable shard routing. Update tests to get vtparams based on partial keyspace setting, so that global routing continues to be tested as earlier without DbName being specified Signed-off-by: Rohit Nayak <rohit@planetscale.com> To create subsequent partial movetables workflows we should ignore previous partial movetables (now frozen) Signed-off-by: Rohit Nayak <rohit@planetscale.com> Remove vdiff2 deletes since they were failing unit tests etc Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use vtgate flag to enable shard routing rules Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix incorrect test setup Signed-off-by: Rohit Nayak <rohit@planetscale.com> Expect modified frozen query Signed-off-by: Rohit Nayak <rohit@planetscale.com> set vtgate param --enable_shard_routing in partial movetables test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Fix flags test Signed-off-by: Rohit Nayak <rohit@planetscale.com> Use VTParams helper for partial keyspace tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> Specify vtParams.DBName for partial keyspace queries Signed-off-by: Rohit Nayak <rohit@planetscale.com> Self-review. Remove bypass caching. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Report partial SwitchTraffic results Signed-off-by: Matt Lord <mattalord@gmail.com> * Try to address most of the upstream PR review comments From: https://github.com/vitessio/vitess/pull/9987 Signed-off-by: Matt Lord <mattalord@gmail.com> * Enforce proper routing for partial migrations Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Minor changes after self review Signed-off-by: Matt Lord <mattalord@gmail.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Account for local timezone in check for vdiff progress Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Update go version in workflows. Fix gofmt issue Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing CI tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Comment failing test for partial keyspaces Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVtGateVtExplain by specifying dbname Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix leftover debug code Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Move partial keyspace tests to a single shard. Refactor test.go to use multiple config.json files Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Improve test skip comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix failing tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Address review comments Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Try TestFunctionInDefault for partial keyspaces. Update skip comment. Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Delete temporary log lines Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Signed-off-by: Matt Lord <mattalord@gmail.com> Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-09-23 13:15:12 +03:00
if _, err := f.WriteString("# DO NOT MODIFY: THIS FILE IS GENERATED USING \"make generate_ci_workflows\"\n\n"); err != nil {
return err
}
if _, err := f.WriteString(mergeBlankLines(buf)); err != nil {
return err
}
fmt.Printf("Generated %s\n", path)
return nil
}