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

[workflow] extract migration targets from wrangler #7934

Merged

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Apr 22, 2021

Description

This is the first in a series of PRs to make VDiff runnable from the new grpcvtctldserver (in order to do that we eventually need the vdiff struct to be defined outside of package wrangler so that both wrangler and grpcvtctldserver can use it, so that's where this is headed).

To start, I extracted buildTargets as a publicly exported function, and then updated all callsites to work on the new types. These should be functionally equivalent.

In the next PR, I'll be looking at moving parts of trafficSwitcher struct to package workflow

Related Issue(s)

Checklist

  • Should this PR be backported? No
  • Tests were added or are not required (other tests should be covered by other wrangler/vrep tests)
  • Documentation was added or is not required

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

@ajm188 ajm188 requested a review from deepthi as a code owner April 22, 2021 17:15
@ajm188 ajm188 changed the title Am extract migration targets from wrangler [workflow] extract migration targets from wrangler Apr 22, 2021
@ajm188
Copy link
Contributor Author

ajm188 commented Apr 22, 2021

Going to set this back to draft while I take time to look into the tests. I thought it was just a query formatting issue, but there might be something else going on.

@ajm188 ajm188 marked this pull request as draft April 22, 2021 19:18
@ajm188
Copy link
Contributor Author

ajm188 commented Apr 22, 2021

oooookay that was fun. re-opening!!

@ajm188 ajm188 marked this pull request as ready for review April 22, 2021 20:31
@ajm188 ajm188 force-pushed the am_extract_migration_targets_from_wrangler branch from 2689685 to df30470 Compare April 22, 2021 20:32
Copy link
Member

@rafael rafael left a comment

Choose a reason for hiding this comment

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

This is really straightforward from my perspective and makes sense. I think we should get @rohit-nayak-ps eyes just to make sure we get his input on this approach as well.

@ajm188
Copy link
Contributor Author

ajm188 commented Apr 24, 2021

Organizational note: I'm planning on squashing this one. The commits are mainly there to break up the diff into reasonably-small chunks but this change really only makes sense logistically as one atomic commit.

@ajm188
Copy link
Contributor Author

ajm188 commented Apr 26, 2021

I'm going to rebase on master to try to get that tabletmanager_tablegc check to actually start (there's not even a button for me to retrigger it from what i can tell)

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
…arget} types

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
…ckage, delete old func

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
…xact error strings

Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 force-pushed the am_extract_migration_targets_from_wrangler branch from df30470 to 55f8aab Compare April 26, 2021 15:44
Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps left a comment

Choose a reason for hiding this comment

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

lgtm
nice set of refactors

// NewMigrationSource returns a MigrationSource for the given shard and primary.
//
// (TODO|@ajm188): do we always want to start with (position:"", journaled:false)?
func NewMigrationSource(si *topo.ShardInfo, primary *topo.TabletInfo) *MigrationSource {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that there is no corresponding NewMigrationTarget() ... Is it because it only used in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there has to be some temporarily public functions so that I can move things piecemeal (I think this is going to be temporary anyway, and if not I can come back and add the corresponding NewMigrationTarget!)

@ajm188 ajm188 merged commit 31d84d6 into vitessio:master Apr 27, 2021
@ajm188 ajm188 added this to In progress in Vtctld Service via automation May 7, 2021
@ajm188 ajm188 moved this from In progress to Done in Vtctld Service May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants