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

Support partial resource initialization errors #210

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Apr 5, 2024

This allows a provider to indicate that it tried to Create, Update or Read a resource but was not able atomically succeed, leaving the resource in a partially initialized state.

@iwahbe iwahbe self-assigned this Apr 5, 2024
@iwahbe iwahbe force-pushed the iwahbe/support-partial-initialization branch from c1b4da4 to f5b8dbc Compare April 5, 2024 11:39
@iwahbe iwahbe requested a review from a team April 5, 2024 11:39
@iwahbe
Copy link
Member Author

iwahbe commented Apr 5, 2024

This is motivated by pulumi/pulumi-pulumiservice#84, which requires control over partial initialization.

iwahbe added 2 commits April 8, 2024 17:18
This allows a provider to indicate that it tried to Create, Update or Read a resource but
was not able atomically succeed, leaving the resource in a partially initialized state.
@iwahbe iwahbe force-pushed the iwahbe/support-partial-initialization branch from 84f8012 to c3019cb Compare April 8, 2024 15:18
@iwahbe iwahbe requested review from VenelinMartinov and removed request for blampe April 12, 2024 16:44
Copy link

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

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

Looks sensible but I'm not familiar with pulumi-go-provider.

Does this code run before the provider implementation of Update, Create etc or does it wrap the provider implementation?

infer/resource.go Show resolved Hide resolved
infer/resource.go Show resolved Hide resolved
infer/resource.go Show resolved Hide resolved
@iwahbe
Copy link
Member Author

iwahbe commented Apr 13, 2024

Does this code run before the provider implementation of Update, Create etc or does it wrap the provider implementation?

Providers based on infer doesn't implement global methods for Update, Create, etc. Instead resources each define their own version of these methods. This code wraps the resource level implementation.

@iwahbe iwahbe requested a review from VenelinMartinov April 13, 2024 20:46
@iwahbe iwahbe merged commit 6dcfbd5 into main Apr 15, 2024
6 checks passed
@iwahbe iwahbe deleted the iwahbe/support-partial-initialization branch April 15, 2024 09:29
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