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 API] Replace underscores with dashes in cluster ID #15722

Draft
wants to merge 10,000 commits into
base: main
Choose a base branch
from

Conversation

notfelineit
Copy link
Contributor

@notfelineit notfelineit commented Apr 15, 2024

Description

VTAdmin API fails to connect to VTGate and vtctld when there are underscores _ in the VTGate & vtctld custom name resolvers. The custom name is based on the cluster ID, so this PR switches underscores for dashes - in the initial cluster ID.

This PR should be backported, since it fixes a bug that exists in v17-present.

Related Issue(s)

Fixes #15721

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

N/A

frouioui and others added 30 commits February 6, 2024 17:56
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com>
Co-authored-by: Andrew Mason <amason@hey.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
…5124)

Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
…tessio#15168)

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Co-authored-by: frouioui <frouioui@users.noreply.github.com>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Andrés Taylor <andres@taylor.se>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com>
…n keys (vitessio#15163)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…led (vitessio#15176)

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Jacques Grove <aquarapid@gmail.com>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Co-authored-by: aquarapid <aquarapid@gmail.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Co-authored-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: William Huang <mail.william.huang@gmail.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
… over shard routing (vitessio#15172)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
@notfelineit
Copy link
Contributor Author

notfelineit commented Apr 19, 2024

Ok, I'm back working on this!

@mattlord and @dbussink , I didn't originally intend to bundle the full fix with this PR, but I will now. The reason being I didn't want to make a decision on "break" or "fix silently" when users pass in an invalid cluster name. However, I think a reasonable first step might be to:

  • Maintain old behavior on "bad" cluster names (still spin up VTAdmin, vtctld and vtgate won't work) but add a log/notification letting the user know they should use a different cluster name

That changes things a bit, because I'm not sure if this PR should still automatically change _ to - then, because we should probably treat all invalid characters in the same way.

@ajm188 what do you think? Should we:

  • autofix the names
  • allow bad names and just notify the user
  • combination of the two: correct _ and warn on the rest

@dbussink
Copy link
Contributor

  • Maintain old behavior on "bad" cluster names (still spin up VTAdmin, vtctld and vtgate won't work) but add a log/notification letting the user know they should use a different cluster name

What about we add warning for now to not immediately break people and then we turn it into an error if you use an invalid name for the next release (v21)? That way we don't have to do anything here trying to interpret what the user intended long term.

@notfelineit
Copy link
Contributor Author

notfelineit commented Apr 22, 2024

@dbussink Yeah, I think that's a good way to go about it. Including what @ajm188 said too! Here's the plan taken from everyone's input:

  1. v20: Add warning (log & warning in the UI) on invalid cluster name
  2. v21: Turn warning into an error on vtadmin-api boot up

And for clarification, we won't plan to auto format any cluster names!

Copy link
Contributor

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:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. and removed Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. labels May 23, 2024
@deepthi deepthi marked this pull request as draft May 31, 2024 16:47
@deepthi
Copy link
Member

deepthi commented May 31, 2024

Moving to draft until all changes are complete.

Copy link
Contributor

github-actions bot commented Aug 2, 2024

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:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. and removed Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. labels Aug 2, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

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:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. and removed Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. labels Sep 2, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

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:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. label Oct 3, 2024
@vitess-bot vitess-bot modified the milestones: v21.0.0, v22.0.0 Oct 8, 2024
@github-actions github-actions bot removed the Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. label Oct 9, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

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:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. label Nov 9, 2024
@github-actions github-actions bot removed the Stale Marks PRs as stale after a period of inactivity, which are then closed after a grace period. label Nov 12, 2024
@harshit-gangal harshit-gangal force-pushed the replace-underscores-with-dashes-vtadmin branch from 3dce263 to 76b4ab3 Compare December 4, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport to: release-19.0 Needs to be back ported to release-19.0 Component: VTAdmin VTadmin interface go Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Report: gRPC custom name resolvers don't work with underscores