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
#259 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.