Skip to content

feldera-types: resolve env vars in connector config#5836

Open
abhizer wants to merge 3 commits intomainfrom
issue5799
Open

feldera-types: resolve env vars in connector config#5836
abhizer wants to merge 3 commits intomainfrom
issue5799

Conversation

@abhizer
Copy link
Copy Markdown
Contributor

@abhizer abhizer commented Mar 16, 2026

Describe Manual Test Plan

Manually tested by creating a pipeline with env vars in connector config and setting env vars via the pipeline config.

Fixes: #5799

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

abhizer added 2 commits March 16, 2026 13:53
Fixes: #5799

Follows the same scheme as the kubernetes secret resolver.
To resolve an env var successfully, the string must start with: `${env:`
and end with `}`.

The env var name then has to start from a valid alphabet, or underscore.
The name then may contain numbers.

Example: `"table": "${env:TABLE_NAME}"`

Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
@abhizer abhizer requested a review from snkas March 16, 2026 14:31
@abhizer abhizer changed the title Issue5799 feldera-types: resolve env vars in connector config Mar 16, 2026
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
@gz
Copy link
Copy Markdown
Contributor

gz commented Mar 16, 2026

what's stopping us from having a canonical default as @jpadilla suggests #5799 that gets used in case it's set?

Ok(value) => Ok(value),
Err(env::VarError::NotPresent) | Err(env::VarError::NotUnicode(_)) => {
Err(SecretRefResolutionError::EnvVarNotSet {
env_ref: secret_ref,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When env::var returns VarError::NotUnicode, the variable is set — it just contains non-UTF-8 bytes. Mapping it to EnvVarNotSet produces a misleading error: the user will check env | grep VAR, see it set, and wonder why Feldera says otherwise.

Consider a separate error variant, or at minimum tweak the message to "is not set or contains non-UTF-8 bytes".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve env variables in connector configs

4 participants