Skip to content

[vtadmin-api] Reorganize tablet-related functions into vtadmin/cluster/cluster.go#7553

Merged
rohit-nayak-ps merged 8 commits intovitessio:masterfrom
tinyspeck:sarabee-vtadmin-api-tidying
Feb 26, 2021
Merged

[vtadmin-api] Reorganize tablet-related functions into vtadmin/cluster/cluster.go#7553
rohit-nayak-ps merged 8 commits intovitessio:masterfrom
tinyspeck:sarabee-vtadmin-api-tidying

Conversation

@doeg
Copy link
Contributor

@doeg doeg commented Feb 25, 2021

Description

Here's the refactoring I promised to do for #7528 (comment).

Changes:

  • Moves everything out of tablets.go into cluster.go so functions have a signature of func (c *Cluster) ...
  • Moves getTablets, findTablet, and findNTablets out of api.go and into cluster.go + adds tests
  • Moves errors.go out of package vtadmin and into package errors so that it can be shared by api.go + cluster.go

I staged this internally + it works as expected.

Related Issue(s)

Checklist

  • Should this PR be backported? No
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

N/A

Impacted Areas in Vitess

Components that this PR will affect:

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

doeg added 7 commits February 24, 2021 20:02
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: 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>
Copy link
Contributor

@ajm188 ajm188 left a comment

Choose a reason for hiding this comment

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

I like this separation a lot better; thank you for doing it!! I have a couple small comments but looks great

Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
@doeg
Copy link
Contributor Author

doeg commented Feb 25, 2021

@ajm188 this is ready for another pass, when you get a sec.

@rohit-nayak-ps rohit-nayak-ps merged commit 89766bd into vitessio:master Feb 26, 2021
@askdba askdba added the Component: VTAdmin VTadmin interface label Feb 26, 2021
@askdba askdba added this to the v10.0 milestone Feb 26, 2021
@doeg doeg deleted the sarabee-vtadmin-api-tidying branch March 1, 2021 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: VTAdmin VTadmin interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants