redpanda-data / redpanda-data/benthos
Benthos templates should do some linting on config fields for components
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
Currently, setting a non-existent field on a component in a template does not trigger a linter error. For example:
test.tmpl.yaml
name: test
type: input
status: experimental
mapping: |
#!blobl
root.generate.count = 0
root.generate.foobar = "kaboom"
root.generate.mapping = "root = \"\""
test.yaml
input:
test: {}
output:
stdout: {}
$ benthos run --templates ./test.tmpl.yaml test.yaml
doesn't complain about generate.foobar being an invalid field.
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
Start by reproducing the issue with test.tmpl.yaml and test.yaml using benthos run --templates ./test.tmpl.yaml test.yaml. Trace how template mappings and component configuration fields are validated; done means an unknown field such as generate.foobar produces a linter error while valid fields continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100