Skip to content

Do not resolve params of irrelevant stages - #425

Merged
GrahamCampbell merged 6 commits into
4.xfrom
defer-irrelevant-stage-params
Aug 4, 2026
Merged

Do not resolve params of irrelevant stages#425
GrahamCampbell merged 6 commits into
4.xfrom
defer-irrelevant-stage-params

Conversation

@mnapoli

@mnapoli mnapoli commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Variables in params.<stage> sections are now only resolved for the effective stage (and default). Params of other stages are left untouched: their sources are not invoked (no wasted SSM/remote calls) and their errors (unknown sources, missing env vars, etc.) no longer fail the command.

Explicit references like ${self:params.prod.domain} still resolve the targeted property on demand, exactly as before. Variable syntax errors are still reported for all stages, including ones surfaced late (e.g. in an object resolved from a plugin-provided source).

Known limitation: when a whole section is defined with a single variable (e.g. params: ${file(./params.yml)} or params.prod: ${file(./prod-params.yml)}), that variable itself is still resolved, as the configuration schema requires these sections to be objects. Values nested in the resolved object are however only resolved for the effective stage.

@GrahamCampbell
GrahamCampbell force-pushed the defer-irrelevant-stage-params branch from a9de240 to b0c2f96 Compare August 4, 2026 15:46
@GrahamCampbell
GrahamCampbell merged commit ce1787a into 4.x Aug 4, 2026
8 checks passed
@GrahamCampbell
GrahamCampbell deleted the defer-irrelevant-stage-params branch August 4, 2026 15:50
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.

2 participants