{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/comments/108728080","pull_request_review_id":29778770,"id":108728080,"diff_hunk":"@@ -315,26 +308,27 @@ func (w *Workflow) FromFile(file string) error {\n // Run runs a workflow.\n func (w *Workflow) Run() error {\n \tif err := w.populate(); err != nil {\n-\t\tw.Cancel()\n+\t\tclose(w.Cancel)\n \t\treturn err\n \t}\n \n \tw.logger.Print(\"Validating workflow\")\n \tif err := w.validate(); err != nil {\n \t\tw.logger.Printf(\"Error validating workflow: %v\", err)\n-\t\tw.Cancel()\n+\t\tclose(w.Cancel)\n \t\treturn err\n \t}\n \tw.logger.Print(\"Uploading sources\")\n \tif err := w.uploadSources(); err != nil {\n \t\tw.logger.Printf(\"Error uploading sources: %v\", err)\n-\t\tw.Cancel()\n+\t\tclose(w.Cancel)\n \t\treturn err\n \t}\n \tw.logger.Print(\"Running workflow\")\n+\tdefer w.cleanup()","path":"daisy/workflow/workflow.go","position":69,"original_position":69,"commit_id":"1e08592293f024e8199e220e10777909c94bc0c7","original_commit_id":"1e08592293f024e8199e220e10777909c94bc0c7","user":{"login":"adjackura","id":17150539,"avatar_url":"https://avatars2.githubusercontent.com/u/17150539?v=3","gravatar_id":"","url":"https://api.github.com/users/adjackura","html_url":"https://github.com/adjackura","followers_url":"https://api.github.com/users/adjackura/followers","following_url":"https://api.github.com/users/adjackura/following{/other_user}","gists_url":"https://api.github.com/users/adjackura/gists{/gist_id}","starred_url":"https://api.github.com/users/adjackura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adjackura/subscriptions","organizations_url":"https://api.github.com/users/adjackura/orgs","repos_url":"https://api.github.com/users/adjackura/repos","events_url":"https://api.github.com/users/adjackura/events{/privacy}","received_events_url":"https://api.github.com/users/adjackura/received_events","type":"User","site_admin":false},"body":"Moved it right after validate in case we add any of that.","created_at":"2017-03-29T16:48:15Z","updated_at":"2017-03-29T16:48:15Z","html_url":"https://github.com/GoogleCloudPlatform/compute-image-tools/pull/15#discussion_r108728080","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/comments/108728080"},"html":{"href":"https://github.com/GoogleCloudPlatform/compute-image-tools/pull/15#discussion_r108728080"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15","id":113099847,"html_url":"https://github.com/GoogleCloudPlatform/compute-image-tools/pull/15","diff_url":"https://github.com/GoogleCloudPlatform/compute-image-tools/pull/15.diff","patch_url":"https://github.com/GoogleCloudPlatform/compute-image-tools/pull/15.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues/15","number":15,"state":"open","locked":false,"title":"Fix cancel, add logging of serial output","user":{"login":"adjackura","id":17150539,"avatar_url":"https://avatars2.githubusercontent.com/u/17150539?v=3","gravatar_id":"","url":"https://api.github.com/users/adjackura","html_url":"https://github.com/adjackura","followers_url":"https://api.github.com/users/adjackura/followers","following_url":"https://api.github.com/users/adjackura/following{/other_user}","gists_url":"https://api.github.com/users/adjackura/gists{/gist_id}","starred_url":"https://api.github.com/users/adjackura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adjackura/subscriptions","organizations_url":"https://api.github.com/users/adjackura/orgs","repos_url":"https://api.github.com/users/adjackura/repos","events_url":"https://api.github.com/users/adjackura/events{/privacy}","received_events_url":"https://api.github.com/users/adjackura/received_events","type":"User","site_admin":false},"body":"Don't use context.WithCancel for handling stopping of workflows, this caused issues because the cleanup function relied on that context.\r\nStream serial port 1 to GCS when WaitForInstancesStopped is called\r\nRemove steps that are better suited for subworkflows","created_at":"2017-03-29T01:17:52Z","updated_at":"2017-03-29T16:48:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7af64dc5370c41e29f4ba1a1549f530753ed1d0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues/15/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/statuses/1e08592293f024e8199e220e10777909c94bc0c7","head":{"label":"adjackura:master","ref":"master","sha":"1e08592293f024e8199e220e10777909c94bc0c7","user":{"login":"adjackura","id":17150539,"avatar_url":"https://avatars2.githubusercontent.com/u/17150539?v=3","gravatar_id":"","url":"https://api.github.com/users/adjackura","html_url":"https://github.com/adjackura","followers_url":"https://api.github.com/users/adjackura/followers","following_url":"https://api.github.com/users/adjackura/following{/other_user}","gists_url":"https://api.github.com/users/adjackura/gists{/gist_id}","starred_url":"https://api.github.com/users/adjackura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adjackura/subscriptions","organizations_url":"https://api.github.com/users/adjackura/orgs","repos_url":"https://api.github.com/users/adjackura/repos","events_url":"https://api.github.com/users/adjackura/events{/privacy}","received_events_url":"https://api.github.com/users/adjackura/received_events","type":"User","site_admin":false},"repo":{"id":84998168,"name":"compute-image-tools","full_name":"adjackura/compute-image-tools","owner":{"login":"adjackura","id":17150539,"avatar_url":"https://avatars2.githubusercontent.com/u/17150539?v=3","gravatar_id":"","url":"https://api.github.com/users/adjackura","html_url":"https://github.com/adjackura","followers_url":"https://api.github.com/users/adjackura/followers","following_url":"https://api.github.com/users/adjackura/following{/other_user}","gists_url":"https://api.github.com/users/adjackura/gists{/gist_id}","starred_url":"https://api.github.com/users/adjackura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adjackura/subscriptions","organizations_url":"https://api.github.com/users/adjackura/orgs","repos_url":"https://api.github.com/users/adjackura/repos","events_url":"https://api.github.com/users/adjackura/events{/privacy}","received_events_url":"https://api.github.com/users/adjackura/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adjackura/compute-image-tools","description":"Tools and scripts for Google Compute Engine images.","fork":true,"url":"https://api.github.com/repos/adjackura/compute-image-tools","forks_url":"https://api.github.com/repos/adjackura/compute-image-tools/forks","keys_url":"https://api.github.com/repos/adjackura/compute-image-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adjackura/compute-image-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adjackura/compute-image-tools/teams","hooks_url":"https://api.github.com/repos/adjackura/compute-image-tools/hooks","issue_events_url":"https://api.github.com/repos/adjackura/compute-image-tools/issues/events{/number}","events_url":"https://api.github.com/repos/adjackura/compute-image-tools/events","assignees_url":"https://api.github.com/repos/adjackura/compute-image-tools/assignees{/user}","branches_url":"https://api.github.com/repos/adjackura/compute-image-tools/branches{/branch}","tags_url":"https://api.github.com/repos/adjackura/compute-image-tools/tags","blobs_url":"https://api.github.com/repos/adjackura/compute-image-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adjackura/compute-image-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adjackura/compute-image-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/adjackura/compute-image-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adjackura/compute-image-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/adjackura/compute-image-tools/languages","stargazers_url":"https://api.github.com/repos/adjackura/compute-image-tools/stargazers","contributors_url":"https://api.github.com/repos/adjackura/compute-image-tools/contributors","subscribers_url":"https://api.github.com/repos/adjackura/compute-image-tools/subscribers","subscription_url":"https://api.github.com/repos/adjackura/compute-image-tools/subscription","commits_url":"https://api.github.com/repos/adjackura/compute-image-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/adjackura/compute-image-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/adjackura/compute-image-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/adjackura/compute-image-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/adjackura/compute-image-tools/contents/{+path}","compare_url":"https://api.github.com/repos/adjackura/compute-image-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adjackura/compute-image-tools/merges","archive_url":"https://api.github.com/repos/adjackura/compute-image-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adjackura/compute-image-tools/downloads","issues_url":"https://api.github.com/repos/adjackura/compute-image-tools/issues{/number}","pulls_url":"https://api.github.com/repos/adjackura/compute-image-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/adjackura/compute-image-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/adjackura/compute-image-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adjackura/compute-image-tools/labels{/name}","releases_url":"https://api.github.com/repos/adjackura/compute-image-tools/releases{/id}","deployments_url":"https://api.github.com/repos/adjackura/compute-image-tools/deployments","created_at":"2017-03-14T21:19:07Z","updated_at":"2017-03-14T21:19:09Z","pushed_at":"2017-03-29T01:14:28Z","git_url":"git://github.com/adjackura/compute-image-tools.git","ssh_url":"git@github.com:adjackura/compute-image-tools.git","clone_url":"https://github.com/adjackura/compute-image-tools.git","svn_url":"https://github.com/adjackura/compute-image-tools","homepage":"https://cloud.google.com/compute/docs/images","size":151,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"332a49d8d8e31c3b50796ab3797b199b692a9570","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars3.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":81856040,"name":"compute-image-tools","full_name":"GoogleCloudPlatform/compute-image-tools","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars3.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/compute-image-tools","description":"Tools and scripts for Google Compute Engine images.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/deployments","created_at":"2017-02-13T18:18:27Z","updated_at":"2017-03-16T04:02:03Z","pushed_at":"2017-03-29T01:17:53Z","git_url":"git://github.com/GoogleCloudPlatform/compute-image-tools.git","ssh_url":"git@github.com:GoogleCloudPlatform/compute-image-tools.git","clone_url":"https://github.com/GoogleCloudPlatform/compute-image-tools.git","svn_url":"https://github.com/GoogleCloudPlatform/compute-image-tools","homepage":"https://cloud.google.com/compute/docs/images","size":135,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15"},"html":{"href":"https://github.com/GoogleCloudPlatform/compute-image-tools/pull/15"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues/15"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/compute-image-tools/statuses/1e08592293f024e8199e220e10777909c94bc0c7"}}}}
{"actor":{"display_login":"adjackura"}}