Backport PR #13244 to 8.1: i18n: alias logstash.runner.configuration.* under logstash.agent.configuration #13842
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.
Backport PR #13244 to 8.1 branch. Original message:
A number of plugins reach into Logstash's i18n translations to "helpfully" communicate certain configuration errors, but rely on translations that were moved in #3872 from logstash.agent to logstash.runner. Since then, it is possible to hit obtuse error messages about failing to load a translation instead of the intended helpful message:
By moving the
logstash.agent
definition to after thelogstash.runner
definition, we can use YAML tooling to name thelogstash.runner.configuration
node and then merge its contents intologstash.agent.configuration
. This effectively allows us to keep a single definition of those translations while making them available at both addresses.Release notes
Fixed an issue where some improperly-configured plugins would attempt to provide helpful guidance but fail to load the correct help-text.
What does this PR do?
Aliases each of the translation keys in the
en.logstash.runner.configuration
intoen.logstash.agent.configuration
so that plugins that still rely on the old location of those help-texts will be able to find them.Why is it important/What is the impact to the user?
Turns an obtuse error like:
Int a more helpful one like:
Checklist
[ ] I have made corresponding change to the default configuration files (and/or docker env variables)[ ] I have added tests that prove my fix is effective or that my feature worksHow to test this PR locally
The Date Filter is one of many plugins that uses Logstash's i18n and attempts to lookup the
logstash.agent.configuration. invalid_plugin_register
when provided incorrectly-shaped input. Looking into Logstash'svendor
directory will yield many more. We can intentionally hit one of these like:Without this patch, our error is an obtuse one about failing to look up a translation, and with this patch the error is marginally more helpful.