redpanda-data / redpanda-data/benthos
Parsing error with mapping processors that have a block of Bloblang in them which starts with an empty line
Open
Nobody has claimed this yet.
bloblang
bug
configuration
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
Trying to run the following config:
input:
generate:
count: 1
mapping: root.foo = "bar"
processors:
- mapping: |
root.bar = "baz"
triggers this error:
failed to generate sanitised config: yaml: line 24: did not find expected key
If we remove the empty newline from the mapping block, it works as expected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the YAML configuration shown, focusing on the mapping processor whose Bloblang block begins with an empty line. Trace the sanitised-config generation and YAML parsing path; done means this configuration parses and runs without the reported error while preserving the existing behavior for non-empty-leading blocks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, yaml
- Domain
- backend, stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100