elastic / elastic/logstash

Parameters no longer support string representation for numeric values in LS 2.2+

Open
#4,692 2 comments 0 reactions 1 assignee Claimed by @andrewvc View on GitHub
discuss
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Starting in LS 2.2.x, if you have a workers parameter set to a string representation, it now treats it as an invalid configuration and LS will not start up:

```
output
{
elasticsearch{
workers => "1"
}
}
```

The following is reported by --configtest:

```
./logstash -f generator.conf --configtest
The error reported is:
comparison of String with 1 failed
```

The above configuration works in versions prior to LS 2.2. This is likely introduced as part of https://github.com/elastic/logstash/pull/4391 . We used to accept string representation for numeric values.

This is marked as discuss currently to determine the right course of action:
1. If we intend to support string representation for numeric values when defining parameters, then this is really a product bug when parsing/evaluating numeric parameter values.
2. If we do not intend to support string representation for numeric values anymore starting in LS 2.2, please document this as a breaking change in documentation.

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.