Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Slack vitess 2021.01.11 release #193

Closed
wants to merge 116 commits into from
Closed

Conversation

ajm188
Copy link

@ajm188 ajm188 commented Jan 12, 2021

For vtctld, just to get the diff reviewed and approved. We shouldn't merge this to tinyspeck/master.

Contains the following PRs:

I ran make build at each cherry-pick; the code is buildable and I can run the local example at hit a grpc endpoint:

❯ vtctldclient --server "localhost:15999" FindAllShardsInKeyspace commerce | jq '.'
{
  "shards": {
    "0": {
      "keyspace": "commerce",
      "name": "0",
      "shard": {
        "master_alias": {
          "cell": "zone1",
          "uid": 100
        },
        "master_term_start_time": {
          "seconds": 1610323010,
          "nanoseconds": 829901000
        },
        "is_master_serving": true
      }
    }
  }
}

And the retaining of the legacy format (note vtctlclient not vtctldclient here):

❯ vtctlclient -server "localhost:15999" FindAllShardsInKeyspace commerce
{
  "0": {
    "master_alias": {
      "cell": "zone1",
      "uid": 100
    },
    "master_term_start_time": {
      "seconds": 1610412569,
      "nanoseconds": 995650000
    },
    "is_master_serving": true
  }
}

harshit-gangal and others added 30 commits July 27, 2020 22:28
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
[java] bump java version to 7.0 for release-7.0
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
…ment

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Do not add tablet that is going down.

Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Backport: Make sure lookup vindexes are queryable inside transaction
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
… failure

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
…tessio#6546)

* tablet_picker: keep trying to find a tablet until context expires

Signed-off-by: deepthi <deepthi@planetscale.com>

* tablet_picker: keyspace/shard/cells must be provided

Signed-off-by: deepthi <deepthi@planetscale.com>

* tablet picker: return ks/cell/shard in test result for TestShardMigrateMainflow

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* tablet picker: fix wrangler tests by choosing a valid source per-test

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* tablet picker: fix worker and testlib tests

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* tablet_picker: gofmted

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* tablet picker: fix test races

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* tablet picker: gofmt

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* tablet picker: gofmt

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* healthcheck: cleanup test code where we were setting the same flag twice

Signed-off-by: deepthi <deepthi@planetscale.com>

Co-authored-by: Rohit Nayak <rohit@planetscale.com>
Backport: HandleSet in executor to handle multiple settings in single set statement
…t in dml query

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
rohit-nayak-ps and others added 12 commits February 11, 2021 08:16
[vtctld] Migrate ListBackups as GetBackups in new vtctld server
[vtctld] Migrate GetVSchema to VtctldServer
…ce_errors

[vtctldclient] Set `SilenceErrors` on the root command, so we don't double-log
Provide named function for squashing usage errors; start using it
Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188
Copy link
Author

ajm188 commented Feb 11, 2021

@setassociative @doeg I've updated this branch to include the following:

  • #7302
  • #7311
  • #7321 — with the InitShardPrimary command removed
  • #7334
  • #7346 — Note this should be a transparent refactor of the legacy GetSchema; also ripped out the small change to a vtadmin test file
  • #7352 — s/ListBackups/GetBackups/
  • #7360
  • #7395 — This is the big topo-management one you both already reviewed separately. I had to remove some GenericVExec that tmclient.TabletManagerClient doesn't have yet in our branch
  • #7404

Here are the relevant test results:

❯ go test -v ./go/vt/vtctl/... ./go/vt/wrangler/... | grep -E '^ok'
ok      vitess.io/vitess/go/vt/vtctl    (cached)
ok      vitess.io/vitess/go/vt/vtctl/endtoend   (cached)
ok      vitess.io/vitess/go/vt/vtctl/fakevtctlclient    (cached)
ok      vitess.io/vitess/go/vt/vtctl/grpcvtctlclient    (cached)
ok      vitess.io/vitess/go/vt/vtctl/grpcvtctldclient   (cached)
ok      vitess.io/vitess/go/vt/vtctl/grpcvtctldserver   (cached)
ok      vitess.io/vitess/go/vt/wrangler (cached)
ok      vitess.io/vitess/go/vt/wrangler/testlib (cached)

If you want the diff between the last deploy and now: slack-vitess-2021.01.11.rc1...slack-vitess-2021.01.11-release

doeg
doeg previously approved these changes Feb 11, 2021
Copy link

@doeg doeg left a comment

Choose a reason for hiding this comment

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

:rubber_stamp:

@ajm188
Copy link
Author

ajm188 commented Feb 11, 2021

And against the local example

GetTablets + GetSchema
❯ vtctldclient --server "localhost:15999" GetTablets
zone1-0000000100 commerce 0 master SFO-M-AMASON02:15100 SFO-M-AMASON02:17100 [] 2021-02-11T16:59:35Z
zone1-0000000101 commerce 0 replica SFO-M-AMASON02:15101 SFO-M-AMASON02:17101 [] <null>
zone1-0000000102 commerce 0 rdonly SFO-M-AMASON02:15102 SFO-M-AMASON02:17102 [] <null>
❯ vtctldclient --server "localhost:15999" GetSchema zone1-0000000100
{
  "database_schema": "CREATE DATABASE /*!32312 IF NOT EXISTS*/ {{.DatabaseName}} /*!40100 DEFAULT CHARACTER SET utf8 */",
  "table_definitions": [
    {
      "name": "corder",
      "schema": "CREATE TABLE `corder` (\n  `order_id` bigint(20) NOT NULL AUTO_INCREMENT,\n  `customer_id` bigint(20) DEFAULT NULL,\n  `sku` varbinary(128) DEFAULT NULL,\n  `price` bigint(20) DEFAULT NULL,\n  PRIMARY KEY (`order_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8",
      "columns": [
        "order_id",
        "customer_id",
        "sku",
        "price"
      ],
      "primary_key_columns": [
        "order_id"
      ],
      "type": "BASE TABLE",
      "data_length": "16384",
      "row_count": "0",
      "fields": [
        {
          "name": "order_id",
          "type": "INT64",
          "table": "corder",
          "org_table": "corder",
          "database": "vt_commerce",
          "org_name": "order_id",
          "column_length": 20,
          "charset": 63,
          "decimals": 0,
          "flags": 49667
        },
        {
          "name": "customer_id",
          "type": "INT64",
          "table": "corder",
          "org_table": "corder",
          "database": "vt_commerce",
          "org_name": "customer_id",
          "column_length": 20,
          "charset": 63,
          "decimals": 0,
          "flags": 32768
        },
        {
          "name": "sku",
          "type": "VARBINARY",
          "table": "corder",
          "org_table": "corder",
          "database": "vt_commerce",
          "org_name": "sku",
          "column_length": 128,
          "charset": 63,
          "decimals": 0,
          "flags": 128
        },
        {
          "name": "price",
          "type": "INT64",
          "table": "corder",
          "org_table": "corder",
          "database": "vt_commerce",
          "org_name": "price",
          "column_length": 20,
          "charset": 63,
          "decimals": 0,
          "flags": 32768
        }
      ]
    },
    {
      "name": "customer",
      "schema": "CREATE TABLE `customer` (\n  `customer_id` bigint(20) NOT NULL AUTO_INCREMENT,\n  `email` varbinary(128) DEFAULT NULL,\n  PRIMARY KEY (`customer_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8",
      "columns": [
        "customer_id",
        "email"
      ],
      "primary_key_columns": [
        "customer_id"
      ],
      "type": "BASE TABLE",
      "data_length": "16384",
      "row_count": "0",
      "fields": [
        {
          "name": "customer_id",
          "type": "INT64",
          "table": "customer",
          "org_table": "customer",
          "database": "vt_commerce",
          "org_name": "customer_id",
          "column_length": 20,
          "charset": 63,
          "decimals": 0,
          "flags": 49667
        },
        {
          "name": "email",
          "type": "VARBINARY",
          "table": "customer",
          "org_table": "customer",
          "database": "vt_commerce",
          "org_name": "email",
          "column_length": 128,
          "charset": 63,
          "decimals": 0,
          "flags": 128
        }
      ]
    },
    {
      "name": "product",
      "schema": "CREATE TABLE `product` (\n  `sku` varbinary(128) NOT NULL,\n  `description` varbinary(128) DEFAULT NULL,\n  `price` bigint(20) DEFAULT NULL,\n  PRIMARY KEY (`sku`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8",
      "columns": [
        "sku",
        "description",
        "price"
      ],
      "primary_key_columns": [
        "sku"
      ],
      "type": "BASE TABLE",
      "data_length": "16384",
      "row_count": "0",
      "fields": [
        {
          "name": "sku",
          "type": "VARBINARY",
          "table": "product",
          "org_table": "product",
          "database": "vt_commerce",
          "org_name": "sku",
          "column_length": 128,
          "charset": 63,
          "decimals": 0,
          "flags": 20611
        },
        {
          "name": "description",
          "type": "VARBINARY",
          "table": "product",
          "org_table": "product",
          "database": "vt_commerce",
          "org_name": "description",
          "column_length": 128,
          "charset": 63,
          "decimals": 0,
          "flags": 128
        },
        {
          "name": "price",
          "type": "INT64",
          "table": "product",
          "org_table": "product",
          "database": "vt_commerce",
          "org_name": "price",
          "column_length": 20,
          "charset": 63,
          "decimals": 0,
          "flags": 32768
        }
      ]
    }
  ],
  "version": "4a696261cc73c605a887ad6a547dce18"
}

setassociative
setassociative previously approved these changes Feb 11, 2021
@ajm188
Copy link
Author

ajm188 commented Feb 11, 2021

Tagged current branch HEAD as slack-vitess-2021.01.11.rc2

@ajm188 ajm188 dismissed stale reviews from setassociative and doeg via 814f29a March 5, 2021 15:09
deepthi and others added 3 commits March 5, 2021 10:13
[vtctld | tests only] testtmclient refactor
Conflicts:
	go/vt/vtadmin/api_test.go
	go/vt/vtctl/reparentutil/emergency_reparenter_test.go
	go/vt/vtctl/reparentutil/planned_reparenter_test.go

Resolved by `git rm -f` those files.

Note: Also includes a change to grpcvtctldclient/client_test.go, not in the
cherry-picked commit, to use the testutil constructor for vtctldservers.

Signed-off-by: Andrew Mason <amason@slack-corp.com>

wip test fixes

Signed-off-by: Andrew Mason <amason@slack-corp.com>
[vtctld] Add v0 GetWorkflows rpc and workflow/vexec packages

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Conflicts:
      go/vt/proto/vtctldata/vtctldata.pb.go
      go/vt/proto/vtctlservice/vtctlservice.pb.go
      go/vt/vtctl/grpcvtctldclient/client_gen.go
      go/vt/vtctl/grpcvtctldserver/server.go
      go/vt/wrangler/vexec.go
      proto/vtctldata.proto
      proto/vtctlservice.proto
Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 force-pushed the slack-vitess-2021.01.11-release branch from 814f29a to cd78f4e Compare March 5, 2021 15:14
@ajm188
Copy link
Author

ajm188 commented Mar 5, 2021

I've pushed up 2 more cherry-picks to allow us to start working with the new workflows API!

Contains:

  • #7518
  • #7575
  • A rewrite of the new query-planner to use the old types in sqlparser, not in any cherry-pick.
    • Aside: @setassociative maybe this is related to the parser issues you were having?

Testing:

❯ make build && go test -count=1 ./go/vt/vtctl/grpcvtctldserver/... ./go/vt/vtctl/grpcvtctldclient/... ./go/vt/vtctl/workflow/...
Fri Mar 5 10:14:17 EST 2021: Building source tree
ok      vitess.io/vitess/go/vt/vtctl/grpcvtctldserver   0.480s
?       vitess.io/vitess/go/vt/vtctl/grpcvtctldserver/testutil  [no test files]
ok      vitess.io/vitess/go/vt/vtctl/grpcvtctldclient   0.674s
?       vitess.io/vitess/go/vt/vtctl/grpcvtctldclient/codegen   [no test files]
?       vitess.io/vitess/go/vt/vtctl/workflow   [no test files]
ok      vitess.io/vitess/go/vt/vtctl/workflow/vexec     0.318s
?       vitess.io/vitess/go/vt/vtctl/workflow/vexec/testutil    [no test files]

@setassociative @doeg mind taking a look? Then I'll tag it and start to deploy.

@doeg
Copy link

doeg commented Mar 5, 2021

@ajm188 looks reasonable to me! Thank you for doing this. Are the test failures significant or is that "expected"?

@ajm188
Copy link
Author

ajm188 commented Mar 5, 2021

......... "expected" unfortunately

@ajm188
Copy link
Author

ajm188 commented Mar 5, 2021

Tagged current branch as slack-vitess-2021.01.11.rc3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.