Skip to content

Commit

Permalink
clean up field-reference-parser (#12466)
Browse files Browse the repository at this point in the history
remove field-reference-parser for version 8
Fixed: #12355
  • Loading branch information
kaisecheng authored Nov 24, 2020
1 parent f4bfbd3 commit 69451e5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 30 deletions.
16 changes: 16 additions & 0 deletions docs/static/breaking-changes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ NOTE: Migrating directly between non-consecutive major versions (5.x to

See these topics for a description of breaking changes:

* <<breaking-8.0>>
* <<breaking-7.0>>
* <<breaking-pq>>
* <<breaking-6.0>>
Expand All @@ -24,6 +25,21 @@ See also <<releasenotes>>.
//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

Expand Down
6 changes: 0 additions & 6 deletions logstash-core/lib/logstash/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion logstash-core/lib/logstash/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 0 additions & 5 deletions logstash-core/lib/logstash/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
18 changes: 0 additions & 18 deletions logstash-core/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69451e5

Please sign in to comment.