{"action":"created","comment":{"url":"https://api.github.com/repos/pulumi/pulumi/pulls/comments/215779861","pull_request_review_id":153122706,"id":215779861,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTc3OTg2MQ==","diff_hunk":"@@ -443,6 +451,24 @@ func (sg *stepGenerator) GenerateDeletes() []Step {\n \treturn dels\n }\n \n+// GeneratePendingDeletes generates delete steps for all resources that are pending deletion. This function should be\n+// called at the start of a plan in order to find all resources that are pending deletion from the prevous plan.\n+func (sg *stepGenerator) GeneratePendingDeletes() []Step {\n+\tvar dels []Step\n+\tif prev := sg.plan.prev; prev != nil {\n+\t\tlogging.V(7).Infof(\"stepGenerator.GeneratePendingDeletes(): scanning previous snapshot for pending deletes\")\n+\t\tfor i := len(prev.Resources) - 1; i >= 0; i-- {\n+\t\t\tres := prev.Resources[i]\n+\t\t\tif res.Delete {\n+\t\t\t\tlogging.V(7).Infof(\"stepGenerator.GeneratePendingDeletes(): resource %s is pending deletion\", res.URN)","path":"pkg/resource/deploy/step_generator.go","position":62,"original_position":62,"commit_id":"bf850bbc5af6df93de8480d951475641efab984e","original_commit_id":"bf850bbc5af6df93de8480d951475641efab984e","user":{"login":"pgavlin","id":1224093,"node_id":"MDQ6VXNlcjEyMjQwOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1224093?v=4","gravatar_id":"","url":"https://api.github.com/users/pgavlin","html_url":"https://github.com/pgavlin","followers_url":"https://api.github.com/users/pgavlin/followers","following_url":"https://api.github.com/users/pgavlin/following{/other_user}","gists_url":"https://api.github.com/users/pgavlin/gists{/gist_id}","starred_url":"https://api.github.com/users/pgavlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgavlin/subscriptions","organizations_url":"https://api.github.com/users/pgavlin/orgs","repos_url":"https://api.github.com/users/pgavlin/repos","events_url":"https://api.github.com/users/pgavlin/events{/privacy}","received_events_url":"https://api.github.com/users/pgavlin/received_events","type":"User","site_admin":false},"body":"Same feedback re: including the ID.","created_at":"2018-09-06T21:11:16Z","updated_at":"2018-09-06T21:11:36Z","html_url":"https://github.com/pulumi/pulumi/pull/1886#discussion_r215779861","pull_request_url":"https://api.github.com/repos/pulumi/pulumi/pulls/1886","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pulumi/pulumi/pulls/comments/215779861"},"html":{"href":"https://github.com/pulumi/pulumi/pull/1886#discussion_r215779861"},"pull_request":{"href":"https://api.github.com/repos/pulumi/pulumi/pulls/1886"}}},"pull_request":{"url":"https://api.github.com/repos/pulumi/pulumi/pulls/1886","id":213428128,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDI4MTI4","html_url":"https://github.com/pulumi/pulumi/pull/1886","diff_url":"https://github.com/pulumi/pulumi/pull/1886.diff","patch_url":"https://github.com/pulumi/pulumi/pull/1886.patch","issue_url":"https://api.github.com/repos/pulumi/pulumi/issues/1886","number":1886,"state":"open","locked":false,"title":"Retire pending deletions at start of plan","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},"body":"Instead of letting pending deletions pile up to be retired at the end of\r\na plan, this commit eagerly disposes of any pending deletions that were\r\npending at the end of the previous plan. This is a nice usability win\r\nand also reclaims an invariant that at most one resource with a given\r\nURN is live and at most one is pending deletion at any point in time.\r\n\r\nHere's a video of the UX of this change in action. The setup here is that I have created an update that causes a bunch of resources to be replaced, but the update fails halfway through and leaves a number of objects in the snapshot in the pending delete state. The next update deletes them first before performing the rest of the update. https://asciinema.org/a/psJd5Te8GTtzRFiHctP3L1iz3.","created_at":"2018-09-05T21:07:29Z","updated_at":"2018-09-06T21:11:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cef7014bcb1d126f0dc982394ee96d72a17e6ff1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lukehoban","id":223467,"node_id":"MDQ6VXNlcjIyMzQ2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/223467?v=4","gravatar_id":"","url":"https://api.github.com/users/lukehoban","html_url":"https://github.com/lukehoban","followers_url":"https://api.github.com/users/lukehoban/followers","following_url":"https://api.github.com/users/lukehoban/following{/other_user}","gists_url":"https://api.github.com/users/lukehoban/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehoban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehoban/subscriptions","organizations_url":"https://api.github.com/users/lukehoban/orgs","repos_url":"https://api.github.com/users/lukehoban/repos","events_url":"https://api.github.com/users/lukehoban/events{/privacy}","received_events_url":"https://api.github.com/users/lukehoban/received_events","type":"User","site_admin":false},{"login":"CyrusNajmabadi","id":4564579,"node_id":"MDQ6VXNlcjQ1NjQ1Nzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4564579?v=4","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pulumi/pulumi/pulls/1886/commits","review_comments_url":"https://api.github.com/repos/pulumi/pulumi/pulls/1886/comments","review_comment_url":"https://api.github.com/repos/pulumi/pulumi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulumi/pulumi/issues/1886/comments","statuses_url":"https://api.github.com/repos/pulumi/pulumi/statuses/bf850bbc5af6df93de8480d951475641efab984e","head":{"label":"pulumi:swgillespie/pending-deletes","ref":"swgillespie/pending-deletes","sha":"bf850bbc5af6df93de8480d951475641efab984e","user":{"login":"pulumi","id":21992475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTkyNDc1","avatar_url":"https://avatars0.githubusercontent.com/u/21992475?v=4","gravatar_id":"","url":"https://api.github.com/users/pulumi","html_url":"https://github.com/pulumi","followers_url":"https://api.github.com/users/pulumi/followers","following_url":"https://api.github.com/users/pulumi/following{/other_user}","gists_url":"https://api.github.com/users/pulumi/gists{/gist_id}","starred_url":"https://api.github.com/users/pulumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulumi/subscriptions","organizations_url":"https://api.github.com/users/pulumi/orgs","repos_url":"https://api.github.com/users/pulumi/repos","events_url":"https://api.github.com/users/pulumi/events{/privacy}","received_events_url":"https://api.github.com/users/pulumi/received_events","type":"Organization","site_admin":false},"repo":{"id":72477752,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ3Nzc1Mg==","name":"pulumi","full_name":"pulumi/pulumi","owner":{"login":"pulumi","id":21992475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTkyNDc1","avatar_url":"https://avatars0.githubusercontent.com/u/21992475?v=4","gravatar_id":"","url":"https://api.github.com/users/pulumi","html_url":"https://github.com/pulumi","followers_url":"https://api.github.com/users/pulumi/followers","following_url":"https://api.github.com/users/pulumi/following{/other_user}","gists_url":"https://api.github.com/users/pulumi/gists{/gist_id}","starred_url":"https://api.github.com/users/pulumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulumi/subscriptions","organizations_url":"https://api.github.com/users/pulumi/orgs","repos_url":"https://api.github.com/users/pulumi/repos","events_url":"https://api.github.com/users/pulumi/events{/privacy}","received_events_url":"https://api.github.com/users/pulumi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulumi/pulumi","description":"Pulumi is a cloud native infrastructure as code platform. Build cloud apps and infrastructure in your favorite language, and continuously deploy them to any cloud, no YAML required.","fork":false,"url":"https://api.github.com/repos/pulumi/pulumi","forks_url":"https://api.github.com/repos/pulumi/pulumi/forks","keys_url":"https://api.github.com/repos/pulumi/pulumi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulumi/pulumi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulumi/pulumi/teams","hooks_url":"https://api.github.com/repos/pulumi/pulumi/hooks","issue_events_url":"https://api.github.com/repos/pulumi/pulumi/issues/events{/number}","events_url":"https://api.github.com/repos/pulumi/pulumi/events","assignees_url":"https://api.github.com/repos/pulumi/pulumi/assignees{/user}","branches_url":"https://api.github.com/repos/pulumi/pulumi/branches{/branch}","tags_url":"https://api.github.com/repos/pulumi/pulumi/tags","blobs_url":"https://api.github.com/repos/pulumi/pulumi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulumi/pulumi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulumi/pulumi/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulumi/pulumi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulumi/pulumi/statuses/{sha}","languages_url":"https://api.github.com/repos/pulumi/pulumi/languages","stargazers_url":"https://api.github.com/repos/pulumi/pulumi/stargazers","contributors_url":"https://api.github.com/repos/pulumi/pulumi/contributors","subscribers_url":"https://api.github.com/repos/pulumi/pulumi/subscribers","subscription_url":"https://api.github.com/repos/pulumi/pulumi/subscription","commits_url":"https://api.github.com/repos/pulumi/pulumi/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulumi/pulumi/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulumi/pulumi/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulumi/pulumi/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulumi/pulumi/contents/{+path}","compare_url":"https://api.github.com/repos/pulumi/pulumi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulumi/pulumi/merges","archive_url":"https://api.github.com/repos/pulumi/pulumi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulumi/pulumi/downloads","issues_url":"https://api.github.com/repos/pulumi/pulumi/issues{/number}","pulls_url":"https://api.github.com/repos/pulumi/pulumi/pulls{/number}","milestones_url":"https://api.github.com/repos/pulumi/pulumi/milestones{/number}","notifications_url":"https://api.github.com/repos/pulumi/pulumi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulumi/pulumi/labels{/name}","releases_url":"https://api.github.com/repos/pulumi/pulumi/releases{/id}","deployments_url":"https://api.github.com/repos/pulumi/pulumi/deployments","created_at":"2016-10-31T21:02:47Z","updated_at":"2018-09-06T20:55:15Z","pushed_at":"2018-09-06T21:00:20Z","git_url":"git://github.com/pulumi/pulumi.git","ssh_url":"git@github.com:pulumi/pulumi.git","clone_url":"https://github.com/pulumi/pulumi.git","svn_url":"https://github.com/pulumi/pulumi","homepage":"https://pulumi.io","size":18857,"stargazers_count":1159,"watchers_count":1159,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":38,"open_issues":263,"watchers":1159,"default_branch":"master"}},"base":{"label":"pulumi:master","ref":"master","sha":"30fccc0773f2f6554da8f94bb06f80f1e7b9925e","user":{"login":"pulumi","id":21992475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTkyNDc1","avatar_url":"https://avatars0.githubusercontent.com/u/21992475?v=4","gravatar_id":"","url":"https://api.github.com/users/pulumi","html_url":"https://github.com/pulumi","followers_url":"https://api.github.com/users/pulumi/followers","following_url":"https://api.github.com/users/pulumi/following{/other_user}","gists_url":"https://api.github.com/users/pulumi/gists{/gist_id}","starred_url":"https://api.github.com/users/pulumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulumi/subscriptions","organizations_url":"https://api.github.com/users/pulumi/orgs","repos_url":"https://api.github.com/users/pulumi/repos","events_url":"https://api.github.com/users/pulumi/events{/privacy}","received_events_url":"https://api.github.com/users/pulumi/received_events","type":"Organization","site_admin":false},"repo":{"id":72477752,"node_id":"MDEwOlJlcG9zaXRvcnk3MjQ3Nzc1Mg==","name":"pulumi","full_name":"pulumi/pulumi","owner":{"login":"pulumi","id":21992475,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTkyNDc1","avatar_url":"https://avatars0.githubusercontent.com/u/21992475?v=4","gravatar_id":"","url":"https://api.github.com/users/pulumi","html_url":"https://github.com/pulumi","followers_url":"https://api.github.com/users/pulumi/followers","following_url":"https://api.github.com/users/pulumi/following{/other_user}","gists_url":"https://api.github.com/users/pulumi/gists{/gist_id}","starred_url":"https://api.github.com/users/pulumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulumi/subscriptions","organizations_url":"https://api.github.com/users/pulumi/orgs","repos_url":"https://api.github.com/users/pulumi/repos","events_url":"https://api.github.com/users/pulumi/events{/privacy}","received_events_url":"https://api.github.com/users/pulumi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulumi/pulumi","description":"Pulumi is a cloud native infrastructure as code platform. Build cloud apps and infrastructure in your favorite language, and continuously deploy them to any cloud, no YAML required.","fork":false,"url":"https://api.github.com/repos/pulumi/pulumi","forks_url":"https://api.github.com/repos/pulumi/pulumi/forks","keys_url":"https://api.github.com/repos/pulumi/pulumi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulumi/pulumi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulumi/pulumi/teams","hooks_url":"https://api.github.com/repos/pulumi/pulumi/hooks","issue_events_url":"https://api.github.com/repos/pulumi/pulumi/issues/events{/number}","events_url":"https://api.github.com/repos/pulumi/pulumi/events","assignees_url":"https://api.github.com/repos/pulumi/pulumi/assignees{/user}","branches_url":"https://api.github.com/repos/pulumi/pulumi/branches{/branch}","tags_url":"https://api.github.com/repos/pulumi/pulumi/tags","blobs_url":"https://api.github.com/repos/pulumi/pulumi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulumi/pulumi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulumi/pulumi/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulumi/pulumi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulumi/pulumi/statuses/{sha}","languages_url":"https://api.github.com/repos/pulumi/pulumi/languages","stargazers_url":"https://api.github.com/repos/pulumi/pulumi/stargazers","contributors_url":"https://api.github.com/repos/pulumi/pulumi/contributors","subscribers_url":"https://api.github.com/repos/pulumi/pulumi/subscribers","subscription_url":"https://api.github.com/repos/pulumi/pulumi/subscription","commits_url":"https://api.github.com/repos/pulumi/pulumi/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulumi/pulumi/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulumi/pulumi/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulumi/pulumi/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulumi/pulumi/contents/{+path}","compare_url":"https://api.github.com/repos/pulumi/pulumi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulumi/pulumi/merges","archive_url":"https://api.github.com/repos/pulumi/pulumi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulumi/pulumi/downloads","issues_url":"https://api.github.com/repos/pulumi/pulumi/issues{/number}","pulls_url":"https://api.github.com/repos/pulumi/pulumi/pulls{/number}","milestones_url":"https://api.github.com/repos/pulumi/pulumi/milestones{/number}","notifications_url":"https://api.github.com/repos/pulumi/pulumi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulumi/pulumi/labels{/name}","releases_url":"https://api.github.com/repos/pulumi/pulumi/releases{/id}","deployments_url":"https://api.github.com/repos/pulumi/pulumi/deployments","created_at":"2016-10-31T21:02:47Z","updated_at":"2018-09-06T20:55:15Z","pushed_at":"2018-09-06T21:00:20Z","git_url":"git://github.com/pulumi/pulumi.git","ssh_url":"git@github.com:pulumi/pulumi.git","clone_url":"https://github.com/pulumi/pulumi.git","svn_url":"https://github.com/pulumi/pulumi","homepage":"https://pulumi.io","size":18857,"stargazers_count":1159,"watchers_count":1159,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":38,"open_issues":263,"watchers":1159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulumi/pulumi/pulls/1886"},"html":{"href":"https://github.com/pulumi/pulumi/pull/1886"},"issue":{"href":"https://api.github.com/repos/pulumi/pulumi/issues/1886"},"comments":{"href":"https://api.github.com/repos/pulumi/pulumi/issues/1886/comments"},"review_comments":{"href":"https://api.github.com/repos/pulumi/pulumi/pulls/1886/comments"},"review_comment":{"href":"https://api.github.com/repos/pulumi/pulumi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulumi/pulumi/pulls/1886/commits"},"statuses":{"href":"https://api.github.com/repos/pulumi/pulumi/statuses/bf850bbc5af6df93de8480d951475641efab984e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pgavlin"}}