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 NewDefaultFoo for configurations #9508

Closed
5 of 6 tasks
mx-psi opened this issue Feb 7, 2024 · 1 comment
Closed
5 of 6 tasks

Add NewDefaultFoo for configurations #9508

mx-psi opened this issue Feb 7, 2024 · 1 comment
Labels
area:config good first issue Good for newcomers release:required-for-ga Must be resolved before GA release

Comments

@mx-psi
Copy link
Member

mx-psi commented Feb 7, 2024

          [...] We should add a `NewDefaultFoo` for all configs, so that we can easily add new fields and set the right default value. 

So we can say that in order to guarantee "backwards compatible behavior" user should always initialize the config with default and overwrite anything as needed instead of creating a struct with "initial value" and leave others unset.

Originally posted by @bogdandrutu in #9478 (comment)

We should add this to the contributing guidelines and, once approved, create subissues to address this on configtls, configgrpc and confighttp.

@mx-psi mx-psi added release:required-for-ga Must be resolved before GA release area:config labels Feb 7, 2024
@andrzej-stencel andrzej-stencel added the good first issue Good for newcomers label Feb 16, 2024
dmitryax pushed a commit that referenced this issue Feb 27, 2024
**Description:** 
Adds new rules for configuration packages and a `NewDefault*` function
to enable backwards-compatible use of the configuration.

**Link to tracking Issue:** 
Related to
#9508
@codeboten
Copy link
Contributor

The decision has been made and individual module PRs have been opened, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config good first issue Good for newcomers release:required-for-ga Must be resolved before GA release
Projects
Status: Done
Development

No branches or pull requests

4 participants