-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(config): Add framework for migrating deprecated plugins #13377
Conversation
@powersj assigning this to you to get your feedback and ideas... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the general layout of this all. Thank you
One comment about documenting the boolean. Can we do test cases for the cassandra migration as well?
@srebhan couple errors from tests: one lint error + new test cases error |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
return buf, nil | ||
} | ||
|
||
func (j *jolokiaAgent) fillCommon(o common.InputOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we need to a) keep this up to date with all "common" options and b) have this in each migration? or will you generalize it out after the next one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have loved to generalize this but I ran into the issue of TOML marshalling cannot marshal an embedded struct to the same level as the embedding struct. I.e. if you have
type A struct {
fielda string `toml:"a"
}
type B struct {
fieldb1 string `toml:"b1"`
fieldb2 string `toml:"b2"`
A
}
you will get
[[inputs.B]]
b1 = "foo"
b2 = "bar"
[inputs.B.A]
a = "fail"
instead of
[[inputs.B]]
b1 = "foo"
b2 = "bar"
a = "good"
Therefore I cannot generalize it and we need to do this in every migration or fix it in the TOML marshaller...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, but should not hold up merging this.
relates to ##13375
relates to ##13376
This PR adds a framework for migrating configurations containing deprecated plugins (and options). For new the use is demonstrated for the
inputs.cassandra
input plugin. The PR adds amigrate
sub-command to theconfig
command.