Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental: Multi-tenant import support in Vitess #15128

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7b97add
Initial commit for adding filter clause to MoveTables. Working e2e test.
rohit-nayak-ps Feb 4, 2024
f680c67
Fix failing unit tests
rohit-nayak-ps Feb 5, 2024
5a89e9c
Fix failing unit and e2e tests
rohit-nayak-ps Feb 5, 2024
633e817
fix failing unit tests
rohit-nayak-ps Feb 5, 2024
9767c52
Fix incorrect logic for getting reverse replication filter
rohit-nayak-ps Feb 5, 2024
645a313
Fix vreplication unit tests
rohit-nayak-ps Feb 6, 2024
764d39b
Fix logic for adding additional filter in reverse workflows
rohit-nayak-ps Feb 6, 2024
82412b4
Fix a bunch of failing unit tests
rohit-nayak-ps Feb 6, 2024
95c7742
Add Keyspace Routing Rules to proto and functions to get/put the rules
rohit-nayak-ps Feb 6, 2024
04327be
Use keyspace routing rules in vtgate
rohit-nayak-ps Feb 6, 2024
416cb18
Remove compressed rules for now, until we come up with a better abstr…
rohit-nayak-ps Feb 7, 2024
8c21354
Add flags for keyspace routing rules in MoveTables. Add rules when cr…
rohit-nayak-ps Feb 7, 2024
092d5b0
Working e2e test for single tenant migration with keyspace routing ru…
rohit-nayak-ps Feb 9, 2024
91481b9
Protect map access with mutexes in e2e test. Make function scope priv…
rohit-nayak-ps Feb 9, 2024
e81e873
Make proto
rohit-nayak-ps Feb 9, 2024
d2617f6
Fix failing unit tests
rohit-nayak-ps Feb 9, 2024
dade06e
Generate flags help text
rohit-nayak-ps Feb 9, 2024
b753df4
Fix failing unit tests
rohit-nayak-ps Feb 10, 2024
f46061f
Improve e2e test by creating more tenants and randomize the workflow …
rohit-nayak-ps Feb 12, 2024
c34783f
Compression tests
rohit-nayak-ps Mar 4, 2024
ba8e428
Revert compression test. For now we are going to assume keyspace rout…
rohit-nayak-ps Mar 5, 2024
55c7df6
Address a couple of review comments
rohit-nayak-ps Mar 5, 2024
9b6b640
Address more review comments. Refactor the e2e test.The refactor of F…
rohit-nayak-ps Mar 5, 2024
eedb210
Allow creating new MoveTables workflows when there are previous Froze…
rohit-nayak-ps Mar 5, 2024
afaa323
Fix unit tests for removal of the frozen check
rohit-nayak-ps Mar 5, 2024
3343c15
Reduce number of tenants in e2e test to make it run in a reasonable t…
rohit-nayak-ps Mar 5, 2024
6ab42cc
Fix check in reverse traffic to account for keyspace routing rules. A…
rohit-nayak-ps Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 172 additions & 0 deletions .github/workflows/cluster_endtoend_vreplication_multi_tenant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows"

name: Cluster (vreplication_multi_tenant)
on: [push, pull_request]
concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_multi_tenant)')
cancel-in-progress: true

permissions: read-all

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}"

jobs:
build:
name: Run endtoend tests on Cluster (vreplication_multi_tenant)
runs-on: gh-hosted-runners-4cores-1

steps:
- name: Skip CI
run: |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi

- name: Check if workflow needs to be skipped
id: skip-workflow
run: |
skip='false'
if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then
skip='true'
fi
echo Skip ${skip}
echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT

PR_DATA=$(curl \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}")
draft=$(echo "$PR_DATA" | jq .draft -r)
echo "is_draft=${draft}" >> $GITHUB_OUTPUT

- name: Check out code
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: actions/checkout@v3

- name: Check for changes in relevant files
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: dorny/paths-filter@v3.0.1
id: changes
with:
token: ''
filters: |
end_to_end:
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'go/test/endtoend/onlineddl/vrepl_suite/**'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml'

- name: Set up Go
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@v4
with:
go-version: 1.22.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@v4

- name: Tune the OS
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
# Limit local port range to not use ports that overlap with server side
# ports that we listen on.
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
# Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio
echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf

- name: Get dependencies
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |

# Get key to latest MySQL repo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C
# Setup MySQL 8.0
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config*
sudo apt-get update
# Install everything else we need, and configure
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata xz-utils libncurses5

sudo service mysql stop
sudo service etcd stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
go mod download

# install JUnit report formatter
go install github.com/vitessio/go-junit-report@HEAD

- name: Setup launchable dependencies
if: steps.skip-workflow.outputs.is_draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main'
run: |
# Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up
pip3 install --user launchable~=1.0 > /dev/null

# verify that launchable setup is all correct.
launchable verify || true

# Tell Launchable about the build you are producing and testing
launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source .

- name: Run cluster endtoend test
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file
# which musn't be more than 107 characters long.
export VTDATAROOT="/tmp/"
source build.env

set -exo pipefail

# Increase our open file descriptor limit as we could hit this
ulimit -n 65536
cat <<-EOF>>./config/mycnf/mysql80.cnf
innodb_buffer_pool_dump_at_shutdown=OFF
innodb_buffer_pool_in_core_file=OFF
innodb_buffer_pool_load_at_startup=OFF
innodb_buffer_pool_size=64M
innodb_doublewrite=OFF
innodb_flush_log_at_trx_commit=0
innodb_flush_method=O_DIRECT
innodb_numa_interleave=ON
innodb_adaptive_hash_index=OFF
sync_binlog=0
sync_relay_log=0
performance_schema=OFF
slow-query-log=OFF
EOF

cat <<-EOF>>./config/mycnf/mysql80.cnf
binlog-transaction-compression=ON
EOF

# run the tests however you normally do, then produce a JUnit XML file
eatmydata -- go run test.go -docker=false -follow -shard vreplication_multi_tenant | tee -a output.txt | go-junit-report -set-exit-code > report.xml

- name: Print test output and Record test result in launchable if PR is not a draft
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always()
run: |
if [[ "${{steps.skip-workflow.outputs.is_draft}}" == "false" ]]; then
# send recorded tests to launchable
launchable record tests --build "$GITHUB_RUN_ID" go-test . || true
fi

# print test output
cat output.txt
157 changes: 157 additions & 0 deletions go/cmd/vtctldclient/command/keyspace_routing_rules.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*
Copyright 2024 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 command

import (
"errors"
"fmt"
"os"
"strings"

"github.com/spf13/cobra"

"vitess.io/vitess/go/cmd/vtctldclient/cli"
"vitess.io/vitess/go/json2"

vschemapb "vitess.io/vitess/go/vt/proto/vschema"
vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata"
)

var (
// ApplyKeyspaceRoutingRules makes an ApplyKeyspaceRoutingRules gRPC call to a vtctld.
ApplyKeyspaceRoutingRules = &cobra.Command{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about extending ApplyRoutingRules and GetRoutingRules to take optional keyspace and shard arguments? Then we won't have so many separate commands. We can then also deprecate and delete ApplyShardRoutingRules and GetShardRoutingRules.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Keyspace, Routing and Shard rules are quite different in terms of functionality. It might be better to have them separate because of that.

We can't have a table routing rule just for a shard for example. Also each of these takes a rules file and those files cannot contain a combination of table and keyspace for example.

Maybe we can have think of a RoutingRule umbrella command: table, keyspace and shardsubcommands and apply andget actions. But it will be a non-trivial refactor.

Use: "ApplyKeyspaceRoutingRules {--rules RULES | --rules-file RULES_FILE} [--cells=c1,c2,...] [--skip-rebuild] [--dry-run]",
Short: "Applies the provided keyspace routing rules.",
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
RunE: commandApplyKeyspaceRoutingRules,
}
// GetKeyspaceRoutingRules makes a GetKeyspaceRoutingRules gRPC call to a vtctld.
GetKeyspaceRoutingRules = &cobra.Command{
Use: "GetKeyspaceRoutingRules",
Short: "Displays the currently active keyspace routing rules as a JSON document.",
Long: "Displays the currently active keyspace routing rules as a JSON document.",
DisableFlagsInUseLine: true,
Args: cobra.NoArgs,
RunE: commandGetKeyspaceRoutingRules,
}
)

var applyKeyspaceRoutingRulesOptions = struct {
Rules string
RulesFilePath string
Cells []string
SkipRebuild bool
DryRun bool
}{}

func commandApplyKeyspaceRoutingRules(cmd *cobra.Command, args []string) error {
if applyKeyspaceRoutingRulesOptions.Rules != "" && applyKeyspaceRoutingRulesOptions.RulesFilePath != "" {
return fmt.Errorf("cannot pass both --rules (=%s) and --rules-file (=%s)", applyKeyspaceRoutingRulesOptions.Rules, applyKeyspaceRoutingRulesOptions.RulesFilePath)

Check warning on line 64 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L62-L64

Added lines #L62 - L64 were not covered by tests
}

if applyKeyspaceRoutingRulesOptions.Rules == "" && applyKeyspaceRoutingRulesOptions.RulesFilePath == "" {
return errors.New("must pass exactly one of --rules or --rules-file")

Check warning on line 68 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L67-L68

Added lines #L67 - L68 were not covered by tests
}

cli.FinishedParsing(cmd)

Check warning on line 71 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L71

Added line #L71 was not covered by tests

var rulesBytes []byte
if applyKeyspaceRoutingRulesOptions.RulesFilePath != "" {
data, err := os.ReadFile(applyKeyspaceRoutingRulesOptions.RulesFilePath)
if err != nil {
return err

Check warning on line 77 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L73-L77

Added lines #L73 - L77 were not covered by tests
}

rulesBytes = data
} else {
rulesBytes = []byte(applyKeyspaceRoutingRulesOptions.Rules)

Check warning on line 82 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L80-L82

Added lines #L80 - L82 were not covered by tests
}

srr := &vschemapb.KeyspaceRoutingRules{}
if err := json2.Unmarshal(rulesBytes, &srr); err != nil {
return err

Check warning on line 87 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L85-L87

Added lines #L85 - L87 were not covered by tests
}
// Round-trip so when we display the result it's readable.
data, err := cli.MarshalJSON(srr)
if err != nil {
return err

Check warning on line 92 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L90-L92

Added lines #L90 - L92 were not covered by tests
}

if applyKeyspaceRoutingRulesOptions.DryRun {
fmt.Printf("[DRY RUN] Would have saved new KeyspaceRoutingRules object:\n%s\n", data)

Check warning on line 96 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L95-L96

Added lines #L95 - L96 were not covered by tests

if applyRoutingRulesOptions.SkipRebuild {
fmt.Println("[DRY RUN] Would not have rebuilt VSchema graph, would have required operator to run RebuildVSchemaGraph for changes to take effect.")
} else {
fmt.Print("[DRY RUN] Would have rebuilt the VSchema graph")
if len(applyRoutingRulesOptions.Cells) == 0 {
fmt.Print(" in all cells\n")
} else {
fmt.Printf(" in the following cells: %s.\n", strings.Join(applyKeyspaceRoutingRulesOptions.Cells, ", "))

Check warning on line 105 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L98-L105

Added lines #L98 - L105 were not covered by tests
}
}

return nil

Check warning on line 109 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L109

Added line #L109 was not covered by tests
}

_, err = client.ApplyKeyspaceRoutingRules(commandCtx, &vtctldatapb.ApplyKeyspaceRoutingRulesRequest{
KeyspaceRoutingRules: srr,
SkipRebuild: applyKeyspaceRoutingRulesOptions.SkipRebuild,
RebuildCells: applyKeyspaceRoutingRulesOptions.Cells,
})
if err != nil {
return err

Check warning on line 118 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L112-L118

Added lines #L112 - L118 were not covered by tests
}

fmt.Printf("New KeyspaceRoutingRules object:\n%s\nIf this is not what you expected, check the input data (as JSON parsing will skip unexpected fields).\n", data)

Check warning on line 121 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L121

Added line #L121 was not covered by tests

if applyRoutingRulesOptions.SkipRebuild {
fmt.Println("Skipping rebuild of VSchema graph as requested, you will need to run RebuildVSchemaGraph for the changes to take effect.")

Check warning on line 124 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L123-L124

Added lines #L123 - L124 were not covered by tests
}

return nil

Check warning on line 127 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L127

Added line #L127 was not covered by tests
}

func commandGetKeyspaceRoutingRules(cmd *cobra.Command, args []string) error {
cli.FinishedParsing(cmd)

Check warning on line 131 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L130-L131

Added lines #L130 - L131 were not covered by tests

resp, err := client.GetKeyspaceRoutingRules(commandCtx, &vtctldatapb.GetKeyspaceRoutingRulesRequest{})
if err != nil {
return err

Check warning on line 135 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L133-L135

Added lines #L133 - L135 were not covered by tests
}

data, err := cli.MarshalJSON(resp.KeyspaceRoutingRules)
if err != nil {
return err

Check warning on line 140 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L138-L140

Added lines #L138 - L140 were not covered by tests
}

fmt.Printf("%s\n", data)

Check warning on line 143 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L143

Added line #L143 was not covered by tests

return nil

Check warning on line 145 in go/cmd/vtctldclient/command/keyspace_routing_rules.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/keyspace_routing_rules.go#L145

Added line #L145 was not covered by tests
}

func init() {
ApplyKeyspaceRoutingRules.Flags().StringVarP(&applyKeyspaceRoutingRulesOptions.Rules, "rules", "r", "", "Shard routing rules, specified as a string")
ApplyKeyspaceRoutingRules.Flags().StringVarP(&applyKeyspaceRoutingRulesOptions.RulesFilePath, "rules-file", "f", "", "Path to a file containing shard routing rules specified as JSON")
ApplyKeyspaceRoutingRules.Flags().StringSliceVarP(&applyKeyspaceRoutingRulesOptions.Cells, "cells", "c", nil, "Limit the VSchema graph rebuilding to the specified cells. Ignored if --skip-rebuild is specified.")
ApplyKeyspaceRoutingRules.Flags().BoolVar(&applyKeyspaceRoutingRulesOptions.SkipRebuild, "skip-rebuild", false, "Skip rebuilding the SrvVSchema objects.")
ApplyKeyspaceRoutingRules.Flags().BoolVarP(&applyKeyspaceRoutingRulesOptions.DryRun, "dry-run", "d", false, "Validate the specified shard routing rules and note actions that would be taken, but do not actually apply the rules to the topo.")
Root.AddCommand(ApplyKeyspaceRoutingRules)

Root.AddCommand(GetKeyspaceRoutingRules)
}
54 changes: 28 additions & 26 deletions go/cmd/vtctldclient/command/vreplication/movetables/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@

var (
createOptions = struct {
SourceKeyspace string
SourceShards []string
ExternalClusterName string
AllTables bool
IncludeTables []string
ExcludeTables []string
SourceTimeZone string
NoRoutingRules bool
AtomicCopy bool
SourceKeyspace string
SourceShards []string
ExternalClusterName string
AllTables bool
IncludeTables []string
ExcludeTables []string
SourceTimeZone string
NoRoutingRules bool
AtomicCopy bool
VReplicationWorkflowOptions vtctldatapb.VReplicationWorkflowOptions
}{}

// create makes a MoveTablesCreate gRPC call to a vtctld.
Expand Down Expand Up @@ -92,23 +93,24 @@
cli.FinishedParsing(cmd)

req := &vtctldatapb.MoveTablesCreateRequest{
Workflow: common.BaseOptions.Workflow,
TargetKeyspace: common.BaseOptions.TargetKeyspace,
SourceKeyspace: createOptions.SourceKeyspace,
SourceShards: createOptions.SourceShards,
SourceTimeZone: createOptions.SourceTimeZone,
Cells: common.CreateOptions.Cells,
TabletTypes: common.CreateOptions.TabletTypes,
TabletSelectionPreference: tsp,
AllTables: createOptions.AllTables,
IncludeTables: createOptions.IncludeTables,
ExcludeTables: createOptions.ExcludeTables,
OnDdl: common.CreateOptions.OnDDL,
DeferSecondaryKeys: common.CreateOptions.DeferSecondaryKeys,
AutoStart: common.CreateOptions.AutoStart,
StopAfterCopy: common.CreateOptions.StopAfterCopy,
NoRoutingRules: createOptions.NoRoutingRules,
AtomicCopy: createOptions.AtomicCopy,
Workflow: common.BaseOptions.Workflow,
TargetKeyspace: common.BaseOptions.TargetKeyspace,
SourceKeyspace: createOptions.SourceKeyspace,
SourceShards: createOptions.SourceShards,
SourceTimeZone: createOptions.SourceTimeZone,
Cells: common.CreateOptions.Cells,
TabletTypes: common.CreateOptions.TabletTypes,
TabletSelectionPreference: tsp,
AllTables: createOptions.AllTables,
IncludeTables: createOptions.IncludeTables,
ExcludeTables: createOptions.ExcludeTables,
OnDdl: common.CreateOptions.OnDDL,
DeferSecondaryKeys: common.CreateOptions.DeferSecondaryKeys,
AutoStart: common.CreateOptions.AutoStart,
StopAfterCopy: common.CreateOptions.StopAfterCopy,
NoRoutingRules: createOptions.NoRoutingRules,
AtomicCopy: createOptions.AtomicCopy,
VReplicationWorkflowOptions: &createOptions.VReplicationWorkflowOptions,

Check warning on line 113 in go/cmd/vtctldclient/command/vreplication/movetables/create.go

View check run for this annotation

Codecov / codecov/patch

go/cmd/vtctldclient/command/vreplication/movetables/create.go#L96-L113

Added lines #L96 - L113 were not covered by tests
}

resp, err := common.GetClient().MoveTablesCreate(common.GetCommandCtx(), req)
Expand Down
Loading
Loading