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

[vtadmin-web] Display shard state on Tablets view + extract tablet utilities #7999

Merged
merged 2 commits into from
Apr 30, 2021

Conversation

doeg
Copy link
Contributor

@doeg doeg commented Apr 29, 2021

Description

A few more small changes that will come in handy for the Keyspace + Workflow views:

  • Extracts some Tablet formatters + other utils to utils/tablets.ts
  • Displays shard serving status on the Tablets view

Before:

Screen Shot 2021-04-29 at 4 00 40 PM

After:

Screen Shot 2021-04-29 at 4 00 49 PM

Related Issue(s)

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

N/A

Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
Signed-off-by: Sara Bee <855595+doeg@users.noreply.github.com>
@doeg doeg added this to In progress in VTAdmin via automation Apr 29, 2021
@doeg doeg changed the title [vtadmin] Display shard state on Tablets view + extract tablet utilities [vtadmin-web] Display shard state on Tablets view + extract tablet utilities Apr 29, 2021
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.

lgtm

Comment on lines +21 to +24
// The distinction between "is loading" and "is_master_serving is undefined"
// is useful, as it's common for the shard `shard.is_master_serving` to be
// excluded from API responses for non-serving shards (instead of being
// explicitly false.)
Copy link
Contributor

Choose a reason for hiding this comment

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

If it will make your life easier (or more pleasant!) I'm pretty sure we can change the JSON marshaling in the http adapter to not omit fields with zero values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh that's good to know! Definitely not a blocker but seems useful for boolean + numeric values... perhaps one day I will change it, but in the meantime it doesn't really matter much. I made a card anyway: https://github.com/vitessio/vitess/projects/12#card-60142070 😎

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(That said, this made me think of a small change I want to make, so I'll do that real quick.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

......... okay, so I did the change and it turns out I like it way less, so I think this is fine to merge as-is. Once this unit test passes anyway, haha.

@ajm188 ajm188 merged commit 264a1f0 into vitessio:master Apr 30, 2021
VTAdmin automation moved this from In progress to Done Apr 30, 2021
@doeg doeg deleted the sarabee-vtadmin-web-tablet-utils branch April 30, 2021 01:16
@askdba askdba added the Component: VTAdmin VTadmin interface label May 3, 2021
@ajm188 ajm188 added the Type: Enhancement Logical improvement (somewhere between a bug and feature) label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: VTAdmin VTadmin interface Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants