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

Assume unknown key is project config key on convert #392

Closed
wants to merge 5 commits into from

Conversation

aq17
Copy link
Contributor

@aq17 aq17 commented Nov 1, 2022

No description provided.

@aq17 aq17 requested a review from iwahbe November 1, 2022 23:59
@aq17
Copy link
Contributor Author

aq17 commented Nov 1, 2022

@iwahbe still looking into this right now, this gets past PrepareTemplate but not ImportTemplate -> importExpr yet

pkg/pulumiyaml/sort.go Outdated Show resolved Hide resolved
@@ -166,11 +167,18 @@ func topologicallySortedResources(t *ast.TemplateDecl, externalConfig []configNo

e, ok := intermediates[name.Value]
if !ok {
diags.Extend(ast.ExprError(name, fmt.Sprintf("resource %q not found", name.Value), ""))
return false
if isPotentialConfig(name.Value) {
Copy link
Member

Choose a reason for hiding this comment

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

We will always need to generate the diagnostic. The difference is we will inject a dummy node instead of stopping the algorithm. The caller of topologicallySortedResources can then choose to ignore diags (which we will do for eject and get plugins, but nothing else).

Co-authored-by: Ian Wahbe <ian@wahbe.com>
@aq17 aq17 added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Nov 2, 2022
@aq17 aq17 closed this Nov 2, 2022
@aq17
Copy link
Contributor Author

aq17 commented Nov 2, 2022

Closed in favor of #393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants