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

Add missing return in vtctld-* DSN case, and log any flag that gets ignored #7872

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Apr 15, 2021

Description

A short-and-sweet one! I noticed we were missing a return nil in the case where a flag in the cluster DSN began with vtctld-, which meant that we were both correctly sending that flag off to the VtctldClientProxy for later parsing, but also falling through and attempting to match it against the discovery regexp (which, thankfully, would promptly fail to match). (Compare this block against the block just above where the flag begins with vtsql- to see the difference).

This PR adds in that missing return, and also logs any flag that falls through to the discovery case that does not match the regexp, so we can more easily catch (relatively harmless) issues like this if they happen in the future.

Related Issue(s)

Checklist

  • Should this PR be backported? no
  • Tests were added or are not required n/a
  • Documentation was added or is not required n/a

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

… ignored

Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 requested a review from doeg April 15, 2021 01:43
@ajm188 ajm188 added this to In progress in VTAdmin via automation Apr 15, 2021
@ajm188 ajm188 merged commit 556ff45 into vitessio:master Apr 15, 2021
VTAdmin automation moved this from In progress to Done Apr 15, 2021
@ajm188 ajm188 deleted the am_vtadmin_flags_fix branch April 15, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants