Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow missing nodes in template #617

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Allow missing nodes in template #617

merged 2 commits into from
Sep 3, 2024

Conversation

julienp
Copy link
Contributor

@julienp julienp commented Aug 27, 2024

When a node can not be found, add a missingNode as a placeholder. When walking the graph, VisitMissing can be used to customize the behaviour for these nodes. For typechecking and program evaluation missing nodes are always an error.

During GetRequiredPlugins we do not have the program's config available to us. Previously we would abort the graph walk as soon as we hit a missing configuration reference. With this PR, we ignore missing nodes and continue the walk. This allows us detect plugin configuration on resources.

This approach is partially inspired by previous work allowing incomplete templates #393.

Fixes #603

When a node can not be found, add a missingNode as a placeholder. When
walking the graph, VisitMissing can customize the behaviour for these
nodes. For typechecking and program evaluation missing nodes are always
an error.

During `GetRequiredPlugins` we do not have the program's config
available to us. Previously we would abort the graph walk as soon as we
hit a missing configuration reference. With this PR, we ignore missing
nodes and continue the walk. This allows us detect plugins configured on
resources.
@julienp julienp marked this pull request as ready for review August 27, 2024 13:27
@julienp julienp requested a review from a team as a code owner August 27, 2024 13:27
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

This looks fine to me.

@julienp julienp merged commit 1cbffc5 into main Sep 3, 2024
5 checks passed
@julienp julienp deleted the julienp/required-plugins branch September 3, 2024 14:58
@pulumi-bot
Copy link

This PR has been shipped in release v1.10.0.

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.

pulumi ignores pluginDownloadURL if program yaml file has resources that reference config variables.
4 participants