elastic / elastic/logstash

Add a new type of validation for defining a `pipeline_id`

Open
#8,164 1 comment 1 reaction 0 assignees View on GitHub
discuss v6.1.0
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
1d 4h
Merged PRs (30d)
88

Description

The current validation when defining a `pipeline_id` is really minimal, I should say non-existent, we accept everything that can be _coerced_ to a string. This means the following string identifier are valid pipeline_id.

- 1
- 2pipeline
- 3pipeline####!
- 😴🙄🤔🤥
- hola (space at the end of a string)

I think we should do the following:
- Limit the possible charsets to lowercase a-z, hyphens, numbers.
- Create a concrete type that the Java code and the settings validator can use.
- Refactor the config management to use that type
- strip whitespace at the end and beginning.
- Derive an Array type from the concrete type, (id must be unique)
- Maybe accept any characters that a uuid v3 can accept? This will make it more compatible with GUI tools.

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.