{"action":"created","issue":{"url":"https://api.github.com/repos/pulumi/pulumi/issues/1645","repository_url":"https://api.github.com/repos/pulumi/pulumi","labels_url":"https://api.github.com/repos/pulumi/pulumi/issues/1645/labels{/name}","comments_url":"https://api.github.com/repos/pulumi/pulumi/issues/1645/comments","events_url":"https://api.github.com/repos/pulumi/pulumi/issues/1645/events","html_url":"https://github.com/pulumi/pulumi/issues/1645","id":342442971,"node_id":"MDU6SXNzdWUzNDI0NDI5NzE=","number":1645,"title":"Pending deletion is problematic","user":{"login":"swgillespie","id":1871912,"node_id":"MDQ6VXNlcjE4NzE5MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1871912?v=4","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"labels":[{"id":472686215,"node_id":"MDU6TGFiZWw0NzI2ODYyMTU=","url":"https://api.github.com/repos/pulumi/pulumi/labels/area/core","name":"area/core","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"swgillespie","id":1871912,"node_id":"MDQ6VXNlcjE4NzE5MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1871912?v=4","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"assignees":[{"login":"swgillespie","id":1871912,"node_id":"MDQ6VXNlcjE4NzE5MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1871912?v=4","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/pulumi/pulumi/milestones/31","html_url":"https://github.com/pulumi/pulumi/milestone/31","labels_url":"https://api.github.com/repos/pulumi/pulumi/milestones/31/labels","id":3434004,"node_id":"MDk6TWlsZXN0b25lMzQzNDAwNA==","number":31,"title":"0.17","description":"","creator":{"login":"joeduffy","id":3953235,"node_id":"MDQ6VXNlcjM5NTMyMzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3953235?v=4","gravatar_id":"","url":"https://api.github.com/users/joeduffy","html_url":"https://github.com/joeduffy","followers_url":"https://api.github.com/users/joeduffy/followers","following_url":"https://api.github.com/users/joeduffy/following{/other_user}","gists_url":"https://api.github.com/users/joeduffy/gists{/gist_id}","starred_url":"https://api.github.com/users/joeduffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeduffy/subscriptions","organizations_url":"https://api.github.com/users/joeduffy/orgs","repos_url":"https://api.github.com/users/joeduffy/repos","events_url":"https://api.github.com/users/joeduffy/events{/privacy}","received_events_url":"https://api.github.com/users/joeduffy/received_events","type":"User","site_admin":false},"open_issues":100,"closed_issues":0,"state":"open","created_at":"2018-06-18T22:42:09Z","updated_at":"2018-07-30T18:05:22Z","due_on":"2018-08-26T07:00:00Z","closed_at":null},"comments":3,"created_at":"2018-07-18T18:32:27Z","updated_at":"2018-07-30T21:42:27Z","closed_at":null,"author_association":"MEMBER","body":"We've seen empirically that pending deletes in the snapshot are buggy and generally problematic.\r\n\r\n* https://github.com/pulumi/pulumi/issues/1503 - Duplicated resource leading to assert from `computeDeletes`\r\n* https://github.com/pulumi/pulumi/issues/1597 - No way to fix resources in \"pending delete\" status which cannot be deleted without property changes\r\n* https://github.com/pulumi/pulumi/issues/1598 - pulumi refresh fails when there are pending deletes\r\n* https://github.com/pulumi/pulumi/issues/1596 - Deletions of \"pending delete\" resources are not shown in preview\r\n\r\nThere are a couple fundamental problems with the way that we address pending deletes today:\r\n\r\n1. Pending deletes are considered a \"delete-replacement\" by the engine, which means that from a UI perspective they are rendered as the culmination of a resource replacement. This causes problems in that it is difficult to ascertain via a preview whether or not pending delete deletions are occurring, since they are masked as replacements.\r\n2. Pending deletes are retired at the end of a plan. If a user plan repeatedly creates new pending deletions and does not completely succeed, we will increase the amount of pending deletions without ever having a chance to delete them. This can cause the list of pending deletes to be arbitrarily large.\r\n3. It is empirically possible today to have multiple pending delete resources with the same URN be in the snapshot at a single point in time.\r\n\r\nI don't think there's a magic bullet that addresses all of the above issues, but I do think that there are a few concrete things that we can do that will improve the user experience around pending deletes:\r\n\r\n1. (Credit to @pgavlin who also thought of this) We should consider retiring all pending deletions at the start of a plan, *before* handling any incoming resource registrations. Doing this before user code is run gives the engine a chance to ensure that there are no pending delete resources in the snapshot before starting a plan. It also ensures that the set of pending delete resources does not expand indefinitely.\r\n2. We should consider some sort of CLI gesture that allows users to remove or edit select resources in the snapshot. There is currently no good solution for #1597 short of editing the snapshot directly, and forcing users to edit the snapshot directly means that we have failed. Terraform has the [`terraform state`](https://www.terraform.io/docs/commands/state/index.html) that gives power users the tools to fix their state file without having to edit the JSON directly.\r\n3. We should reclaim the invariant that there can be at most one resource with a given URN present in the pending delete set. This is only going to become more complicated as we introduce additional resource states (https://github.com/pulumi/pulumi/issues/1626) and invariants allow us to better reason about the behavior of the engine."},"comment":{"url":"https://api.github.com/repos/pulumi/pulumi/issues/comments/409021324","html_url":"https://github.com/pulumi/pulumi/issues/1645#issuecomment-409021324","issue_url":"https://api.github.com/repos/pulumi/pulumi/issues/1645","id":409021324,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTAyMTMyNA==","user":{"login":"ericrudder","id":8387010,"node_id":"MDQ6VXNlcjgzODcwMTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8387010?v=4","gravatar_id":"","url":"https://api.github.com/users/ericrudder","html_url":"https://github.com/ericrudder","followers_url":"https://api.github.com/users/ericrudder/followers","following_url":"https://api.github.com/users/ericrudder/following{/other_user}","gists_url":"https://api.github.com/users/ericrudder/gists{/gist_id}","starred_url":"https://api.github.com/users/ericrudder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericrudder/subscriptions","organizations_url":"https://api.github.com/users/ericrudder/orgs","repos_url":"https://api.github.com/users/ericrudder/repos","events_url":"https://api.github.com/users/ericrudder/events{/privacy}","received_events_url":"https://api.github.com/users/ericrudder/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T21:42:26Z","updated_at":"2018-07-30T21:42:26Z","author_association":"MEMBER","body":"OK, i will give ... it's precisely because we would \"deal with them first\"\n(including UI) that makes me like the idea ... no mas.\n\nOn Mon, Jul 30, 2018 at 2:37 PM, Sean Gillespie <notifications@github.com>\nwrote:\n\n> I think that, now that #1503\n> <https://github.com/pulumi/pulumi/issues/1503> has been addressed, there\n> aren't any pressing issues that would be remediated by retiring deletes\n> first. We'll also need to think about the UX here - right now pending\n> deletes render pretty poorly (i.e. don't show up at all) in the CLI and I\n> think we'd want to fix that in tandem with retiring deletes first, since\n> otherwise it'll appear that the CLI is unresponsive for a while as things\n> get deleted.\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/pulumi/pulumi/issues/1645#issuecomment-409020028>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AH_5wruCPUT4N11Ykltqpadib22DK_uEks5uL3yAgaJpZM4VVF-A>\n> .\n>\n"}}
{"actor":{"display_login":"ericrudder"}}