-
Notifications
You must be signed in to change notification settings - Fork 2k
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
config: fix client.template
config merging with defaults
#20165
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tgross
added
type/bug
theme/template
theme/config
backport/1.5.x
backport to 1.5.x release line
backport/1.6.x
backport to 1.6.x release line
backport/1.7.x
backport to 1.7.x release line
theme/consul-template
labels
Mar 19, 2024
tgross
force-pushed
the
b-config-template-merge
branch
from
March 19, 2024 19:02
3fb53ad
to
90edb62
Compare
When loading the client configuration, the user-specified `client.template` block was not properly merged with the default values. As a result, if the user set any `client.template` field, all the other field defaulted to their zero values instead of the documented defaults. This changeset: * Adds the missing `Merge` method for the client template config and ensures it's called. * Makes a single source of truth for the default template configuration, instead of two different constructors. * Extends the tests to cover the merge of a partial block better. Fixes: #20164
tgross
force-pushed
the
b-config-template-merge
branch
from
March 19, 2024 19:43
90edb62
to
9eda3bf
Compare
schmichael
reviewed
Mar 19, 2024
Juanadelacuesta
approved these changes
Mar 20, 2024
shoenig
reviewed
Mar 20, 2024
This was referenced Mar 20, 2024
Merged
tgross
added a commit
that referenced
this pull request
Mar 20, 2024
When loading the client configuration, the user-specified `client.template` block was not properly merged with the default values. As a result, if the user set any `client.template` field, all the other field defaulted to their zero values instead of the documented defaults. This changeset: * Adds the missing `Merge` method for the client template config and ensures it's called. * Makes a single source of truth for the default template configuration, instead of two different constructors. * Extends the tests to cover the merge of a partial block better. Fixes: #20164
tgross
added a commit
that referenced
this pull request
Mar 20, 2024
When loading the client configuration, the user-specified `client.template` block was not properly merged with the default values. As a result, if the user set any `client.template` field, all the other field defaulted to their zero values instead of the documented defaults. This changeset: * Adds the missing `Merge` method for the client template config and ensures it's called. * Makes a single source of truth for the default template configuration, instead of two different constructors. * Extends the tests to cover the merge of a partial block better. Fixes: #20164
tgross
added a commit
that referenced
this pull request
Mar 20, 2024
When loading the client configuration, the user-specified `client.template` block was not properly merged with the default values. As a result, if the user set any `client.template` field, all the other field defaulted to their zero values instead of the documented defaults. This changeset: * Adds the missing `Merge` method for the client template config and ensures it's called. * Makes a single source of truth for the default template configuration, instead of two different constructors. * Extends the tests to cover the merge of a partial block better. Fixes: #20164
philrenaud
pushed a commit
that referenced
this pull request
Apr 18, 2024
When loading the client configuration, the user-specified `client.template` block was not properly merged with the default values. As a result, if the user set any `client.template` field, all the other field defaulted to their zero values instead of the documented defaults. This changeset: * Adds the missing `Merge` method for the client template config and ensures it's called. * Makes a single source of truth for the default template configuration, instead of two different constructors. * Extends the tests to cover the merge of a partial block better. Fixes: #20164
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.5.x
backport to 1.5.x release line
backport/1.6.x
backport to 1.6.x release line
backport/1.7.x
backport to 1.7.x release line
theme/config
theme/consul-template
theme/template
type/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When loading the client configuration, the user-specified
client.template
block was not properly merged with the default values. As a result, if the user set anyclient.template
field, all the other field defaulted to their zero values instead of the documented defaults.This changeset:
Merge
method for the client template config and ensures it's called.Fixes: #20164