Pulumi runs an import
for every refresh, even when not necessary
#11099
Labels
area/cli
UX of using the CLI (args, output, logs)
kind/bug
Some behavior is incorrect or out of spec
resolution/fixed
This issue was fixed
Milestone
What happened?
We observed in the service that running
pulumi refresh
triggered an import without cause.Steps to reproduce
Run
pulumi refresh
with nothing to import. Observe that a refresh was silently triggered.Expected Behavior
Pulumi only communicates an
import
state change during refresh when it needs to resolve pending creates.Actual Behavior
An
import
is always run.Output of
pulumi about
Version 3.43.1
Additional context
We have this check, where importPendingCreates is of type
*[]string
.pulumi/pkg/cmd/pulumi/refresh.go
Line 166 in a7cea59
Testing confirms that cobra populates it here, even if nothing was passed:
pulumi/pkg/cmd/pulumi/refresh.go
Lines 306 to 308 in a7cea59
We observe that
importPendingCreates
is never actuallynil
. It is instead&[]
when nothing is passed.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).
The text was updated successfully, but these errors were encountered: