-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Helm] Service resource Output.apply does not wait for resource to actually exist #1215
Comments
The panic seems odd and unexpected, but looking at your outputs, shouldn't you be trying to access |
OK, yeah I fixed the clusterIP thing and now the |
@leezen thanks for the quick response. I dug further and found out exactly when issues come up.
Here's the relevant stack trace:
This happens during the preview. It shouldn't be trying to run this during the preview though. |
This also applies when using the value for other resources. I'm doing something similar to register DNS in Route53 and getting the same thing. |
OK, so the original title might be accurate? Just as a silly example here's the new reproduction code minus the first 26 lines which are the same from the previous example:
It looks like if the |
No, in general, the callback to an apply is invoked when the output is known. The resource graph is constructed such that dependencies are tracked so that the callbacks are invoked when needed. @lblackstone I would expect cluster_ip to depend on |
We likely have a bug in the Python SDK. As you said, the apply should wait until the resources are ready. |
Thanks for looking at this @lblackstone . Do you think this will get fixed in the next release or so? |
Related to #861 |
I experience similar behavior. The Version:
How to reproduce
|
You can use the |
The ability to wait for the resources to actually exist is fixed in Chart v4, using the ordinary depends_on option. |
Problem description
I am using the Helm resource to deploy a helm chart. I am then grabbing a particular Service that helm chart provides. I then want to grab whatever IP/NodePorts exist in that Service. Instead of waiting for the Service to exist the
.apply
methods simply returns right away with user input. If you deploy a Service then Kubernetes will update the YAML with the IP's and NodePorts.Errors & Logs
This is the FINAL
TICK TOCK
from the logs.This looks like line 17 in the example below.
Affected product version(s)
v2.6.1
Reproducing the issue
Should be something like this:
Debug output will show that only the user input (yaml) will be returned. I feel like the debug shouldn't run because it should wait for the resource to exist before running the apply, but it's clearly running during preview.
Suggestions for a fix
I'm not a Pulumi expert, but other Pulumi resources will definitely wait prior to running
.apply
until the resource actually exists.EDIT:
The actual code I'm working with has too much context to paste here. I rewrote the example above to simplify what I'm trying to do. With this smaller example it seems like I'm getting the inverted issue, but I'm actually not entirely sure. All I know is the final lambda/_write out are never executing.
The text was updated successfully, but these errors were encountered: