-
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
[vtctldserver] migrate ExecuteHook #9024
[vtctldserver] migrate ExecuteHook #9024
Conversation
proto/vtctlservice.proto
Outdated
@@ -79,6 +80,8 @@ service Vtctld { | |||
// EmergencyReparentShard reparents the shard to the new primary. It assumes | |||
// the old primary is dead or otherwise not responding. | |||
rpc EmergencyReparentShard(vtctldata.EmergencyReparentShardRequest) returns (vtctldata.EmergencyReparentShardResponse) {}; | |||
// ExecuteHook runs the hook on the tablet. | |||
rpc ExecuteHook(vtctldata.ExecuteHookRequest) returns (tabletmanagerdata.ExecuteHookResponse); |
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.
This seems non-intuitive. IIUC, vtctldata.ExecuteHookRequest wraps around a tabletmanagerdata.ExecuteHookRequest. Was this done to avoid breaking cross-version compatibility?
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.
Huh, I thought we did this in more places in this file, but I guess that's just vtadmin.
The reason we're wrapping around is because we need to include the tablet alias with the actual hook request for the vtctld version. Then, we wrap the alias with the tabletmanagerdata request because protobuf won't let you embed structs/messages, and I don't want to copy-paste the fields in case they drift over time.
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.
ok that makes sense :)
5598fc3
to
6f7971c
Compare
6f7971c
to
9df0a29
Compare
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>
9df0a29
to
04039a3
Compare
Protobuf messages marshal to json differently than pure Go structs, so I'm trying this out to see that has changed things in a way that is breaking endtoend tests Signed-off-by: Andrew Mason <amason@slack-corp.com>
Description
This migrates ExecuteHook to vtctldserver and updates the legacy commands to use it.
Related Issue(s)
Closes #9023
Checklist
Deployment Notes