redpanda-data / redpanda-data/connect

Environment variables interpolated in commented-out YAML

Open
#2,043 1 comment 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.