This message was deleted.
# general
s
This message was deleted.
w
You mean preview vs. update? There is a
pulumi.runtime.isDryRun()
(https://pulumi.io/reference/pkg/nodejs/@pulumi/pulumi/runtime/#isDryRun) function which will answer that. This can be useful for simple things, but for more complex things you generally end up wanting to use a dynamic provider to be able to participate fully in the resource lifecycle.
c
Yes preview vs update thanks...I am still learning terminology
Luke, in python I got True in both case
This is my code
🙂 it is pretty simple
this is the CLI output
What I miss? 🙂
w
Hmm - that’s doesn’t look right. Do you need the bool conversion there? I would have expected you to need that. We use this ourselves in the implementation, so it should work correctly: https://github.com/pulumi/pulumi/search?utf8=✓&q=is_dry_run&type= Cc also @incalculable-sundown-82514
c
same without bool casting, I just like to do that 🙂 but i can remove it
Here is the code again
I am checking your link
I have changed the code for this
but same result
python modules
Thanks 😉
i
i’m just catching up on this thread, are you still seeing the problem?
c
Yes Sean
i
Can you print out the value of
runtime.is_dry_run
when doing a preview?
c
@incalculable-sundown-82514
i
And it’s false when doing an update?
c
@incalculable-sundown-82514 It's never false at me. I think there are 2 stages on the picture above, but please correct me if not. There is a preview stage with return value "True" and there is an update stage with return value True too and I think this last one is the problem. So in both case I got True. Maybe I miss something, I dont know, this is why I came to ask.
If I skip the preview I get also True
i
hmm, that’s super strange - i’ll take a look today.
opened https://github.com/pulumi/pulumi/issues/2360 at high priority - thanks for the report, and sorry for the delay in following-up here!
c
Thanks Sean
i
I have a fix for the issue here: https://github.com/pulumi/pulumi/pull/2361. It’ll be in the next release of Pulumi, but if you’re blocked on this issue you can make this change https://github.com/pulumi/pulumi/pull/2361/files#diff-c136b8e513dc228c53777067bc4a87fd to this file, located in your installation adjacent to the
pulumi
binary