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

The SDKv2 Bridge swallows resource init errors when run under PlanResourceChange #2696

Closed
VenelinMartinov opened this issue Dec 6, 2024 · 4 comments · Fixed by #2695 or #2713
Closed
Assignees
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed

Comments

@VenelinMartinov
Copy link
Contributor

What happened?

Under PlanResourceChange, the SDKv2 bridge incorrectly returns just an error to the engine in cases where the resource has been partially initialized. It should instead return both the error and the partial state, including the ID so that the engine can save the resource and re-attempt to update it on the next up.

References:

PRC:

resp, err := p.server.ApplyResourceChange(ctx, t, ty, cfg, st, pl, priv, meta)

non-PRC:

state, diags := r.Apply(ctx, state, diffFromShim(d), p.tf.Meta())

Discovered in pulumi/pulumi-gcp#2700

Example

Discovered in pulumi/pulumi-gcp#2700

Output of pulumi about

.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@VenelinMartinov VenelinMartinov added impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec labels Dec 6, 2024
@VenelinMartinov VenelinMartinov changed the title The SDKv2 Bridge swallows partial init errors when run under PlanResourceChange The SDKv2 Bridge swallows resource init errors when run under PlanResourceChange Dec 6, 2024
@VenelinMartinov VenelinMartinov self-assigned this Dec 6, 2024
@flostadler
Copy link
Contributor

Causes pulumi/pulumi-aws#4759

@VenelinMartinov VenelinMartinov added the p1 A bug severe enough to be the next item assigned to an engineer label Dec 9, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 9, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2695 and shipped in release v3.97.0.

@iwahbe iwahbe reopened this Dec 10, 2024
@iwahbe
Copy link
Member

iwahbe commented Dec 10, 2024

This change had to be reverted.

@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2713 and shipped in release v3.98.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
4 participants