-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[RFC] Add version-info to tablet tags in the topo #8973
Conversation
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
I like this approach overall. It's in line with the topo being a discovery mechanism and enhances that philosophy. The only future concern would be bloat. As for overrides, there are probably arguments both ways. But I lean towards having the command line options overriding the internals, because it allows you to change behavior you otherwise cannot change. |
Met with Deepthi about this today; plan is to remove the For this:
100% agree. I think two options:
I prefer (2) for the flexibility, and it's not that much extra work on top of (1) to implement, but wanted to document the thought process anyway. |
Signed-off-by: Andrew Mason <amason@slack-corp.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Do you plan to add a flag as a separate PR?
…t record Signed-off-by: Andrew Mason <amason@slack-corp.com>
Added in this one; it was pretty straightforward. After implementing, I applied the following diff (to show both regexp and exact modes):
And after starting the local cluster:
|
@mattlord hello! yes this was intentional, maybe we should update Note you can also turn this off entirely with the (new) flag set to |
@ajm188 my main concerns are that
Maybe we could not show them by default but only with a -v or -b option to be more verbose / show build info? If everyone else is fine with it then I'm ok too. FWIW, I had only ever really parsed out the first 6 columns anyway and used them. |
And I apologize for bringing this up after the fact. I had skimmed the RFC and I liked the general idea of having this info available in the topo, I just didn't realize it would affect the default |
Whether we decide to output it by default or not, any new fields in vtctl command outputs need to go at the end because people have scripts, and we have tried to keep things |
Created vitessio/website#872 to actually create a review guide. |
@mattlord no problem at all! it's a fair callout! @deepthi we haven't actually added any new fields here, the format has always been so, how do we go forward? my proposal: in 13.0
in 14.0
i will also point out that this is workable via awk (which is how tablet output has always meant to be parsed) such as |
@ajm188 I think that sounds fine, although I'm unsure why we wouldn't do the 14.0 plan in 13.0 since we're so early on in the 13.0 lifecycle? |
Because currently the output of |
IMO we need to keep the column, it's just a matter of whether we show any tags in the column or not. I think that the columns should be stable and any new columns added at the end. That's the general contract for unstructured output like this, otherwise you break lots of random things for users (e.g. SHOW commands in MySQL). |
I agree in general, but I don't see how we support that in these commands without potentially breaking someone. Some potential scenarios:
that's why i think we make "7 columns + no buildinfo tags in the topo" the default in 13.0, and provide migration paths (via those flags) for 14.0 |
After thinking about it a bit more... I think we should simply make |
Thank you for pointing this out, I got it wrong :) |
Signed-off-by: Andrew Mason amason@slack-corp.com
Description
This PR is both a feature request and the implementation (I will retcon an issue, but in this case the code was so small I found it was easier to discuss the concrete implementation than the abstract description).
This modifies both
servenv.versionInfo
andtabletmanager.BuildTabletFromInput
to the aim of getting the metadata in the tablet process'sservenv.AppVersion
into the topo, so that others can access it (without needing tocurl $tablet/debug/vars | jq '.BuildHost'
, for e.g.)Demo
Use case(s)
Open Questions From Me:
servenv.versionInfo
have its fields made public? I can't see a reason other than "we're worried someone will write code to modify this at runtime" but I feel like we can catch that in code review.init_tags
takes precedence over the tags fromservenv.AppVersion.ToStringMap()
. So, for example, if a user specifies a tag calledversion
, then the vitess build version will not be present in the topo. Should we make the buildinfo tags take precedence instead?Related Issue(s)
Issue TBD
Checklist
Deployment Notes