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

Pulumi runs an import for every refresh, even when not necessary #11099

Closed
iwahbe opened this issue Oct 20, 2022 · 0 comments · Fixed by #11100
Closed

Pulumi runs an import for every refresh, even when not necessary #11099

iwahbe opened this issue Oct 20, 2022 · 0 comments · Fixed by #11100
Assignees
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

Comments

@iwahbe
Copy link
Member

iwahbe commented Oct 20, 2022

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.

if importPendingCreates != nil {

Testing confirms that cobra populates it here, even if nothing was passed:

importPendingCreates = cmd.PersistentFlags().StringArray(
"import-pending-creates", nil,
"A list of form [[URN ID]...] describing the provider IDs of pending creates")

We observe that importPendingCreates is never actually nil. 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).

@iwahbe iwahbe added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 20, 2022
@iwahbe iwahbe self-assigned this Oct 20, 2022
@iwahbe iwahbe added area/cli UX of using the CLI (args, output, logs) and removed needs-triage Needs attention from the triage team labels Oct 20, 2022
@iwahbe iwahbe added this to the 0.79 milestone Oct 20, 2022
@bors bors bot closed this as completed in 973740b Oct 20, 2022
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants