Skip to content

feat(config)!: Add enviroment variables interpolation for env_{KEY}#546

Merged
5K1PY merged 2 commits intomasterfrom
feat/env-interpolation
Dec 5, 2025
Merged

feat(config)!: Add enviroment variables interpolation for env_{KEY}#546
5K1PY merged 2 commits intomasterfrom
feat/env-interpolation

Conversation

@5K1PY
Copy link
Copy Markdown
Collaborator

@5K1PY 5K1PY commented Dec 1, 2025

Fixes #540

@5K1PY 5K1PY requested a review from SvizelPritula December 1, 2025 18:05
@5K1PY 5K1PY self-assigned this Dec 1, 2025
@5K1PY 5K1PY added high priority Urgent configs Configs, config hiearchies, config validation,... run Changes to how user programs are run labels Dec 1, 2025
result[-1][-1] += char
elif char == "\\":
result.append(["escape", ""])
elif val[i : i + 2] == "${":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do character escapes use an intermediate state while this looks two characters ahead?

)

def interpolate(key: str, val: str) -> str:
result: list[list[str]] = [["normal", ""]]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is a parser state really a homogenous sequence of strings of variable length?

If this is the result, why isn't it returned?

Copy link
Copy Markdown
Contributor

@SvizelPritula SvizelPritula left a comment

Choose a reason for hiding this comment

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

LGTM

@5K1PY 5K1PY force-pushed the feat/env-interpolation branch from 7ed8c64 to a73389a Compare December 5, 2025 11:02
@5K1PY 5K1PY merged commit fd82b14 into master Dec 5, 2025
2 checks passed
@5K1PY 5K1PY deleted the feat/env-interpolation branch December 5, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configs Configs, config hiearchies, config validation,... high priority Urgent run Changes to how user programs are run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

env interpolation

2 participants