redpanda-data / redpanda-data/benthos
Error handling in the `retry` processor
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
Currently, the retry processor scrubs the error of the origin message. This can be confusing for users. Maybe it would be better to not scrub it at all and make sure it's set back to its original value if one of the child processors clears it? Or maybe it's best to scrub it and set it back if the child processors don't set some other error? Or append to it the error coming from child processors? Not sure what's the best tradeoff...
Here's a sample config to experiment with:
input:
generate:
count: 1
mapping: root = ""
processors:
- mapping: root = throw("kaboom")
processors:
- log:
message: 'Before: ${! error() }'
- retry:
processors:
- log:
message: 'Inside: ${! error() }'
- log:
message: 'After: ${! error() }'
output:
drop: {}
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 with internal/impl/pure/processor_retry.go around the cited error scrubbing and run the sample YAML configuration to observe the error before, inside, and after retry. Decide the intended error-preservation tradeoff with maintainers, then add regression coverage for the agreed behavior; done means the retry processor's error semantics are explicit and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100