elastic / elastic/logstash

Leading space in logstash.yml silently ignores the rest of the file.

Open
#8,434 1 comment 0 reactions 0 assignees View on GitHub
bug v6.0.1
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

A simple document like this, with a mistake of adding leading space:

```yaml
pipeline.workers: 8
queue.type: persisted
```

The leading space of the first entry convinces the YAML parser that all elements must lead with the same space. We can see this in Ruby by doing the following:

```
>> YAML.load(" one: one\ntwo: two\n it doesn't matter what goes here")
=> {"one"=>"one"}
```

No syntax error. No warnings. The remainder of the user input is simply ignored! This is a bad user experience.

Proposed behavior:

* This scenario should be a configuration error and should cause Logstash to fail when processing this yaml.
* When reporting this error, we should provide an actionable message for the human.

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.