-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Plan for fully removing dependency on deasync and entirely removing this avenue for hangs/crashes. #3528
Comments
Tagging @lukehoban @pgavlin |
Can you elaborate on this? |
yes: pulumi/sdk/nodejs/stackReference.ts Lines 164 to 179 in a600d16
if the stack-reference name is itself an async-input, then we are forced to use deasync (the calls to Does that help? Do you see any serious concerns around deprecatin the ability to pass in async-names to StackReference? |
The thing that worries me is the inconsistency. I would have imagined that rather than deprecate the ability to pass in the name as an |
Yes, that sounds reasonable. I will update the plan and i can start this on monday. |
Also allow passsing a parent to inherit provider from. Part of pulumi/pulumi#3528.
Also allow passsing a parent to inherit provider from. Part of pulumi/pulumi#3528.
This standardizes all data source calls to pass `async: true` to avoid potential for hangs. See pulumi/pulumi#3528.
This standardizes all data source calls to pass `async: true` to avoid potential for hangs. See pulumi/pulumi#3528.
Also allow passsing a parent to inherit provider from. Part of pulumi/pulumi#3528.
We landed pulumi/pulumi-awsx#470 which was one of the biggest pieces of this work. Given progress, closing this out - and will track remaining work in the issues linked above. |
This standardizes all data source calls to pass `async: true` to avoid potential for hangs. See pulumi/pulumi#3528.
Here's the current plan - original details below for historical context.
Phase 1 (Q4'19):
tf2pulumi
generated code (including all docs)Phase 2 (H1'20):
.getFoo
method in TypeScript/JavaScript) as part of Pulumi 2.0.Note: requires breaking changes in Pulumi APIs and will require updates to user programs.
First, the list of work necessary is as follows:
invoke
codepath. Remove 'deasync' entirely from our SDK. #3598Justifications for the above work:
Currently, it is still possible for users to run into hangs/crashes due to deasync doing normal development using Pulumi. This can happen when a user uses a ProviderResource (like aws.Provider) and either:
This issue is one that users can work around, but not in a pleasant manner. First, the normal development model we recommend can lead to them hitting this instead of avoiding it. Second, the workaround for the issue (calling
await ProviderResource.register
) is both undiscoverable and often unpleasant to contort the code into. This workaround is definitely necessary to have to give people a way to cheaply deal with the issue, but is not a healthy place for our platform and sdks for the medium and long term.A longer term solution is necessary where this problem no longer exists. Fundamentally, due to the need to actually support async providers (very important for k8s scenarios), our hands are forced, and we must bubble up asynchrony through our platform and then through components built on top of that. To that end, a full solution to this issue looks like the following:
1.1. No more synchronous data-source 'invoke' (very impactful). (async invokes will exist).
1.2. No more 'StackReference-getOutputSync' on a stack reference. (there will be a way to get the values asynchronously).
3.1 Even if a component api does not need any data-sources, it may end up needing that in the future, warranting a breaking change if we don't start with it being async.
3.2 This likely means constructors for component resources are not directly exposed. Instead, async
factory methods will be needed to ensre that components can asynchronously get the information they need for async-data-sources and then perform their necessary flow-control off of them.
Fundamentally, this is just pushing an async model through data-sources/components. Because of the viral nature of async, it is likely this will push the user to need to be async throughout their program. While JS/Node are inching toward a future where that is fully supported and pleasant, they will likely not get there for some time. It will also only be pleasant for those on the bleeding edge of Node. Because of this, we should likely also include #3321 in our work. This PR makes it possible for a user to export a top level async function as the start of their Pulumi program. i.e.:
While not as attractively simple as just a plain synchronous JS/TS app, this is very low friction for the user. Specifically, practically any existing Pulumi program can transition to this with mostly mechanical effort.
This entire effort will fundamentally break/deprecate existing code that performs synchronous data-source calls or uses our synchronous components. It will need to come with a major semver update. Along with that, we will need to update our docs/examples accordingly.
The text was updated successfully, but these errors were encountered: