Closed
Conversation
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Reduce the dependencies on the core of vitess for vtgateproxy by moving the way in which we register command line flags out of the core codebase and explicitly part of the vtgateproxy binary. Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
7f1818e to
1c945b0
Compare
jscheinblum
reviewed
Aug 15, 2025
| } | ||
|
|
||
| func registerFlags(fs *pflag.FlagSet) { | ||
| func RegisterFlags(fs *pflag.FlagSet) { |
There was a problem hiding this comment.
does this need to be made public? I maybe misunderstand how this works
Author
There was a problem hiding this comment.
Ya - This is part of the upstream PR vitessio#18551 and is consistent with a bunch of the other submodules.
That way the vtgateproxy binary can bind the flags in init like it does for the other dependencies it wants to pull in.
jscheinblum
approved these changes
Aug 15, 2025
venkatraju
approved these changes
Sep 5, 2025
|
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
|
This PR was closed because it has been stale for 7 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As part of reducing the touch points for vtgateproxy inside the main vitess codebase, change the way that the binary registers the various command line flags so that it explicitly calls the various register functions rather than relying on having the binary name in the internal list.
IMHO this would be a better way for all the vitess binaries to manage registering their flags, as I feel like the hard-coded list of strings feels somewhat odd, but that's a question for the maintainers upstream and doesn't really affect us here.
Testing
Confirmed that the output of
vtgateproxy --helpis the same before and after the change so this registers all the same flagsBenefits
With this patch in place, the proxy-specific diffs on this branch include:
With this diff in place, the only upstream changes are those in
go/mysqlandgo/vt/vtgatefor which I opened upstream PRs here:vitessio#18548
vitessio#18551
So between those two changes and the patches in this branch, we should be better positioned to maintain the proxy outside of the main repo.