elastic / elastic/package-spec

[Change Proposal] Provide mechanism for configuration migrations when upgrading packages

Open
#383 0 comments 1 reaction 0 assignees View on GitHub
discuss enhancement Team:Ecosystem
Dominant language
Go
Stars
20
Forks
93
Avg merge
15h 10m
Merged PRs (30d)
12

Description

Currently, there is no mechanism when upgrading a package specify how configurations should be migrated. When configuration is moved around (i.e., old input removed in favor of a new one), there is no way to translate the old config to something new.

As an example, I recently removed the `syslog` input from the `panw` package and switched to the `tcp` and `udp` inputs (with syslog processors). Unfortunately, this means that if the syslog input was configured with a custom listen address and port, there's no way to bring that forward into the new UDP input. The user will have to be aware of the upgrade and know to manually set the new configuration in the UDP input. If they don't do that, the default settings will be applied, but their data will stop flowing since they are no longer listening on the correct address/port. This just happened to a customer and lead to an [SDH](https://github.com/elastic/sdh-beats/issues/2309).

At minimum, it would be really helpful if we could warn the user that certain values aren't going to be copied forward (even better if we can provide a message of what values). I think something like this already exists in Kibana, but I don't think it tells you what is missing? Ideally, though, we should do this automatically for the user. Unless something has changed dramatically, our upgrade paths for packages should provide the same level of functionality as before, we just may need to translate the configuration a bit to accommodate internal changes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.