Skip to content

fix(env-parser): capture clean variable names without trailing braces in bash-style defaults - #8855

Merged
andrasbacsai merged 2 commits into
nextfrom
8851-investigate-bug
Mar 10, 2026
Merged

andrasbacsai merged 2 commits into
nextfrom
8851-investigate-bug

Conversation

@andrasbacsai

Copy link
Copy Markdown
Member

Summary

  • Fixed environment variable parser incorrectly capturing trailing } in bash-style default values like ${VAR:-$SERVICE_FQDN_NAME}
  • Changed regex capture group from group 1 (with optional braces) to group 2 (clean variable name only)
  • Added proper handling for bare $VAR format in replaceVariables() to strip leading $
  • Added database cleanup to remove corrupted environment variable entries from previous parser bug
  • Added comprehensive tests for bash-style fallback parsing

Breaking Changes

None

Closes

#8851


Fixes #8851

…ent variables

Prevent unnecessary updates to existing environment variable records.
The previous implementation would update matching records, but the intent
is to retrieve or create the record without modifying existing ones.
@andrasbacsai
andrasbacsai merged commit 2019986 into next Mar 10, 2026
2 checks passed
@andrasbacsai
andrasbacsai deleted the 8851-investigate-bug branch March 10, 2026 17:06
@IRediTOTO

Copy link
Copy Markdown

hi, how to apply this quick fix?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants