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

[phase 4] Viper Framework #11788

Closed
4 tasks
ajm188 opened this issue Nov 22, 2022 · 1 comment
Closed
4 tasks

[phase 4] Viper Framework #11788

ajm188 opened this issue Nov 22, 2022 · 1 comment
Assignees
Labels
Component: CLI Component: General Changes throughout the code base Type: Feature Type: RFC Request For Comment

Comments

@ajm188
Copy link
Contributor

ajm188 commented Nov 22, 2022

This issue tracks the laying out of a standard framework of using viper within the Vitess codebase.

Motivation

Vitess is a huge codebase with lots of different areas and conventions and ways of doing things. Configuration is one of the few aspects that really, truly benefits from a consistency of expectations for both developers ("I need to add a new flag/option, where/how do I put it" and "I need to change a default value / mark something as deprecated, what's the Right Way ™️ ") and users ("I need to change/set a timeout/threshold/whatever, how can I do that" and "how do I see all the possible options").

Standardizing on some framework helps to satisfy both sides of this equation, while hopefully minimizing the costs introduced (namely: friction for net-new work; problems are harder to google ("is it the underlying viper code or the framework that's buggy"); and the full feature set of the underlying library the framework sits in front of is usually limited/hampered in some way).

Goals

  • Provide a single method to configure values backed by viper instance(s).
  • Provide options to provide custom getters/unmarshalers for reading values that aren't primitive Go types.
  • Provide a mechanism to support dynamic config loading, making it opt-in per value (N.B. config watching/loading is not thread safe in viper, so there's an inherent cost to making it so; therefore some use cases may want to opt out of this and read a value once, or some middle ground where they periodically check if there's been a (thread safe) update to the dynamic value)
  • Move in the direction of being able to fully-automate the documentation of all configuration options / flags / environment variables / defaults for all Vitess binaries.
@ajm188 ajm188 self-assigned this Nov 22, 2022
@ajm188 ajm188 added Type: Feature Type: RFC Request For Comment Component: General Changes throughout the code base Component: CLI labels Nov 22, 2022
@frouioui frouioui added this to v16.0.0 Nov 23, 2022
@frouioui frouioui moved this to Backlog in v16.0.0 Nov 23, 2022
@frouioui frouioui added this to v17.0.0 Feb 8, 2023
@frouioui frouioui moved this to Backlog in v17.0.0 Feb 8, 2023
@frouioui frouioui removed this from v16.0.0 Feb 8, 2023
@ajm188 ajm188 moved this from Backlog to In Progress in v17.0.0 Feb 14, 2023
@frouioui frouioui added this to v18.0.0 Jun 30, 2023
@frouioui frouioui moved this to In Progress in v18.0.0 Jun 30, 2023
@frouioui frouioui removed this from v17.0.0 Jun 30, 2023
@deepthi
Copy link
Member

deepthi commented Feb 3, 2025

This is marked as Done, hence closing. Fixed by #11456.

@deepthi deepthi closed this as completed Feb 3, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in v18.0.0 Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CLI Component: General Changes throughout the code base Type: Feature Type: RFC Request For Comment
Projects
Status: Done
Status: Done
Development

No branches or pull requests

2 participants