From 69451e5017c93cc3571abf5ff85bfd1ea5d75350 Mon Sep 17 00:00:00 2001 From: kaisecheng <69120390+kaisecheng@users.noreply.github.com> Date: Tue, 24 Nov 2020 17:58:10 +0100 Subject: [PATCH] clean up field-reference-parser (#12466) remove field-reference-parser for version 8 Fixed: #12355 --- docs/static/breaking-changes.asciidoc | 16 ++++++++++++++++ logstash-core/lib/logstash/agent.rb | 6 ------ logstash-core/lib/logstash/environment.rb | 1 - logstash-core/lib/logstash/runner.rb | 5 ----- logstash-core/locales/en.yml | 18 ------------------ 5 files changed, 16 insertions(+), 30 deletions(-) diff --git a/docs/static/breaking-changes.asciidoc b/docs/static/breaking-changes.asciidoc index e93490c2392..6cfc29537af 100644 --- a/docs/static/breaking-changes.asciidoc +++ b/docs/static/breaking-changes.asciidoc @@ -15,6 +15,7 @@ NOTE: Migrating directly between non-consecutive major versions (5.x to See these topics for a description of breaking changes: +* <> * <> * <> * <> @@ -24,6 +25,21 @@ See also <>. //NOTE: The notable-breaking-changes tagged regions are re-used in the //Installation and Upgrade Guide +[[breaking-8.0]] +=== Breaking changes in 8.0 +Here are the breaking changes for 8.0. + +[float] +==== Changes in Logstash Core + +[float] +[[field-reference-parser]] +===== Field Reference parser removed +The Field Reference parser by default was STRICT in version 7. This configuration is removed permanently. +Logstash keeps the behaviour as if the default setting, which interprets references to fields in your pipelines and plugins, +and rejects inputs that are either ambiguous or illegal. + + [[breaking-7.0]] === Breaking changes in 7.0 diff --git a/logstash-core/lib/logstash/agent.rb b/logstash-core/lib/logstash/agent.rb index d1f4743f999..a76d643f8d5 100644 --- a/logstash-core/lib/logstash/agent.rb +++ b/logstash-core/lib/logstash/agent.rb @@ -69,12 +69,6 @@ def initialize(settings = LogStash::SETTINGS, source_loader = nil) # Generate / load the persistent uuid id - # Set the global FieldReference parsing mode - if @settings.set?('config.field_reference.parser') - # TODO: i18n - logger.warn("deprecated setting `config.field_reference.parser` set; field reference parsing is strict by default") - end - if @settings.set?('pipeline.ecs_compatibility') ecs_compatibility_value = settings.get('pipeline.ecs_compatibility') if ecs_compatibility_value != 'disabled' diff --git a/logstash-core/lib/logstash/environment.rb b/logstash-core/lib/logstash/environment.rb index 8e22d051775..7af03fbd29b 100644 --- a/logstash-core/lib/logstash/environment.rb +++ b/logstash-core/lib/logstash/environment.rb @@ -49,7 +49,6 @@ module Environment Setting::Boolean.new("config.reload.automatic", false), Setting::TimeValue.new("config.reload.interval", "3s"), # in seconds Setting::Boolean.new("config.support_escapes", false), - Setting::String.new("config.field_reference.parser", "STRICT", true, %w(STRICT)), Setting::Boolean.new("metric.collect", true), Setting::String.new("pipeline.id", "main"), Setting::Boolean.new("pipeline.system", false), diff --git a/logstash-core/lib/logstash/runner.rb b/logstash-core/lib/logstash/runner.rb index 9a0cf1bcf56..6d9d974be11 100644 --- a/logstash-core/lib/logstash/runner.rb +++ b/logstash-core/lib/logstash/runner.rb @@ -84,11 +84,6 @@ class LogStash::Runner < Clamp::StrictCommand :default => LogStash::SETTINGS.get_default("config.string"), :attribute_name => "config.string" - option ["--field-reference-parser"], "MODE", - I18n.t("logstash.runner.flag.field-reference-parser"), - :attribute_name => "config.field_reference.parser", - :default => LogStash::SETTINGS.get_default("config.field_reference.parser") - # Module settings option ["--modules"], "MODULES", I18n.t("logstash.runner.flag.modules"), diff --git a/logstash-core/locales/en.yml b/logstash-core/locales/en.yml index 8890d9ecd0f..88ecb7e9ef8 100644 --- a/logstash-core/locales/en.yml +++ b/logstash-core/locales/en.yml @@ -228,24 +228,6 @@ en: "%{default_output}" If you wish to use both defaults, please use the empty string for the '-e' flag. - field-reference-parser: |+ - (DEPRECATED) This option is no longer - configurable. - - Use the given MODE when parsing field - references. - - The field reference parser is used to expand - field references in your pipeline configs, - and has become more strict to better handle - ambiguous- and illegal-syntax inputs. - - The only available MODE is: - - `STRICT`: parse in a strict manner; when - given ambiguous- or illegal-syntax input, - raises a runtime exception that should - be handled by the calling plugin. - modules: |+ Load Logstash modules. Modules can be defined using multiple instances