redpanda-data / redpanda-data/connect
Environment variables interpolated in commented-out YAML
Open
Nobody has claimed this yet.
annoying
- Dominant language
- Go
- Stars
- 8.8k
- Forks
- 969
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 64
Description
The following config causes a linter fail in 4.18.0:
#metrics:
# statsd:
# address: "${STATS_HOST}"
# flush_period: 100ms
# tag_format: datadog
Resulting error:
benthos_1 | level=info msg="Running main config from specified file" @service=benthos path=/benthos.yaml
benthos_1 | level=error msg="Config lint error" @service=benthos lint="(1,1) required environment variables were not set: [STATS_HOST]"
benthos_1 | level=error msg="Shutting down due to linter errors, to prevent shutdown run Benthos with --chilled" @service=benthos
This indicates that environment variables are being interpolated in commented YAML configuration.
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 reported configuration-lint failure with the commented YAML and an unset STATS_HOST environment variable. Start by tracing the YAML parsing and configuration-lint entry points to determine where commented content is interpolated; done means commented-out variables no longer trigger the required-environment-variable error while active variables retain their validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100