{"action":"closed","number":4139,"pull_request":{"url":"https://api.github.com/repos/pantsbuild/pants/pulls/4139","id":97870805,"html_url":"https://github.com/pantsbuild/pants/pull/4139","diff_url":"https://github.com/pantsbuild/pants/pull/4139.diff","patch_url":"https://github.com/pantsbuild/pants/pull/4139.patch","issue_url":"https://api.github.com/repos/pantsbuild/pants/issues/4139","number":4139,"state":"closed","locked":false,"title":"Ensure that invalid vts have results_dir cleaned before passing to ta…","user":{"login":"mateor","id":1743873,"avatar_url":"https://avatars.githubusercontent.com/u/1743873?v=3","gravatar_id":"","url":"https://api.github.com/users/mateor","html_url":"https://github.com/mateor","followers_url":"https://api.github.com/users/mateor/followers","following_url":"https://api.github.com/users/mateor/following{/other_user}","gists_url":"https://api.github.com/users/mateor/gists{/gist_id}","starred_url":"https://api.github.com/users/mateor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateor/subscriptions","organizations_url":"https://api.github.com/users/mateor/orgs","repos_url":"https://api.github.com/users/mateor/repos","events_url":"https://api.github.com/users/mateor/events{/privacy}","received_events_url":"https://api.github.com/users/mateor/received_events","type":"User","site_admin":false},"body":"Tasks that sometimes fail due to outside factors (download failures,\r\nresolve issues, etc) often would call safe_mkdir(vt.results_dir, clean=True)\r\nin order to wipe possibly truncated or crufty state.\r\n\r\nBut since vt.results_dir is a symlink, that replaced it with a real dir.\r\nThat ended up breaking caching, since the task output was therefore\r\nnever making it into the artifact cache, and other weird\r\nbugs.\r\n\r\nThis is a small change that deletes the existing directories if\r\na target is invalid, removing the need for tasks to wipe the\r\nresults_dir, and also now checks to make sure that the results_dir\r\nis legal before marking valid and passing to the artifact_caches.\r\n\r\nThe majority of the change is added test coverage around the breaks.\r\nI have a couple immediate followups that cover an additional failure\r\nstate, and reworks the cache_manager to remove some of the harder\r\nto reason about bits.\r\n\r\nCloses: #4137","created_at":"2016-12-14T01:26:45Z","updated_at":"2016-12-19T20:04:47Z","closed_at":"2016-12-19T20:04:47Z","merged_at":"2016-12-19T20:04:46Z","merge_commit_sha":"6a43414801b44ae953a2a45af12c084660e2f7eb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pantsbuild/pants/pulls/4139/commits","review_comments_url":"https://api.github.com/repos/pantsbuild/pants/pulls/4139/comments","review_comment_url":"https://api.github.com/repos/pantsbuild/pants/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pantsbuild/pants/issues/4139/comments","statuses_url":"https://api.github.com/repos/pantsbuild/pants/statuses/4fbc4d47c562a60d673d23b05d74af9164573a6f","head":{"label":"mateor:mateo.fix_results_dir-review","ref":"mateo.fix_results_dir-review","sha":"4fbc4d47c562a60d673d23b05d74af9164573a6f","user":{"login":"mateor","id":1743873,"avatar_url":"https://avatars.githubusercontent.com/u/1743873?v=3","gravatar_id":"","url":"https://api.github.com/users/mateor","html_url":"https://github.com/mateor","followers_url":"https://api.github.com/users/mateor/followers","following_url":"https://api.github.com/users/mateor/following{/other_user}","gists_url":"https://api.github.com/users/mateor/gists{/gist_id}","starred_url":"https://api.github.com/users/mateor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateor/subscriptions","organizations_url":"https://api.github.com/users/mateor/orgs","repos_url":"https://api.github.com/users/mateor/repos","events_url":"https://api.github.com/users/mateor/events{/privacy}","received_events_url":"https://api.github.com/users/mateor/received_events","type":"User","site_admin":false},"repo":{"id":19954925,"name":"pants","full_name":"mateor/pants","owner":{"login":"mateor","id":1743873,"avatar_url":"https://avatars.githubusercontent.com/u/1743873?v=3","gravatar_id":"","url":"https://api.github.com/users/mateor","html_url":"https://github.com/mateor","followers_url":"https://api.github.com/users/mateor/followers","following_url":"https://api.github.com/users/mateor/following{/other_user}","gists_url":"https://api.github.com/users/mateor/gists{/gist_id}","starred_url":"https://api.github.com/users/mateor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateor/subscriptions","organizations_url":"https://api.github.com/users/mateor/orgs","repos_url":"https://api.github.com/users/mateor/repos","events_url":"https://api.github.com/users/mateor/events{/privacy}","received_events_url":"https://api.github.com/users/mateor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mateor/pants","description":"Pants Build System","fork":true,"url":"https://api.github.com/repos/mateor/pants","forks_url":"https://api.github.com/repos/mateor/pants/forks","keys_url":"https://api.github.com/repos/mateor/pants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mateor/pants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mateor/pants/teams","hooks_url":"https://api.github.com/repos/mateor/pants/hooks","issue_events_url":"https://api.github.com/repos/mateor/pants/issues/events{/number}","events_url":"https://api.github.com/repos/mateor/pants/events","assignees_url":"https://api.github.com/repos/mateor/pants/assignees{/user}","branches_url":"https://api.github.com/repos/mateor/pants/branches{/branch}","tags_url":"https://api.github.com/repos/mateor/pants/tags","blobs_url":"https://api.github.com/repos/mateor/pants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mateor/pants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mateor/pants/git/refs{/sha}","trees_url":"https://api.github.com/repos/mateor/pants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mateor/pants/statuses/{sha}","languages_url":"https://api.github.com/repos/mateor/pants/languages","stargazers_url":"https://api.github.com/repos/mateor/pants/stargazers","contributors_url":"https://api.github.com/repos/mateor/pants/contributors","subscribers_url":"https://api.github.com/repos/mateor/pants/subscribers","subscription_url":"https://api.github.com/repos/mateor/pants/subscription","commits_url":"https://api.github.com/repos/mateor/pants/commits{/sha}","git_commits_url":"https://api.github.com/repos/mateor/pants/git/commits{/sha}","comments_url":"https://api.github.com/repos/mateor/pants/comments{/number}","issue_comment_url":"https://api.github.com/repos/mateor/pants/issues/comments{/number}","contents_url":"https://api.github.com/repos/mateor/pants/contents/{+path}","compare_url":"https://api.github.com/repos/mateor/pants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mateor/pants/merges","archive_url":"https://api.github.com/repos/mateor/pants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mateor/pants/downloads","issues_url":"https://api.github.com/repos/mateor/pants/issues{/number}","pulls_url":"https://api.github.com/repos/mateor/pants/pulls{/number}","milestones_url":"https://api.github.com/repos/mateor/pants/milestones{/number}","notifications_url":"https://api.github.com/repos/mateor/pants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mateor/pants/labels{/name}","releases_url":"https://api.github.com/repos/mateor/pants/releases{/id}","deployments_url":"https://api.github.com/repos/mateor/pants/deployments","created_at":"2014-05-19T19:34:18Z","updated_at":"2015-02-24T22:34:12Z","pushed_at":"2016-12-19T18:52:51Z","git_url":"git://github.com/mateor/pants.git","ssh_url":"git@github.com:mateor/pants.git","clone_url":"https://github.com/mateor/pants.git","svn_url":"https://github.com/mateor/pants","homepage":"http://pantsbuild.github.io/","size":86390,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"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":"pantsbuild:master","ref":"master","sha":"75ba41c0ef57f541aeead74d58f219532bf0f45f","user":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":7209075,"name":"pants","full_name":"pantsbuild/pants","owner":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pantsbuild/pants","description":"Pants Build System","fork":false,"url":"https://api.github.com/repos/pantsbuild/pants","forks_url":"https://api.github.com/repos/pantsbuild/pants/forks","keys_url":"https://api.github.com/repos/pantsbuild/pants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pantsbuild/pants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pantsbuild/pants/teams","hooks_url":"https://api.github.com/repos/pantsbuild/pants/hooks","issue_events_url":"https://api.github.com/repos/pantsbuild/pants/issues/events{/number}","events_url":"https://api.github.com/repos/pantsbuild/pants/events","assignees_url":"https://api.github.com/repos/pantsbuild/pants/assignees{/user}","branches_url":"https://api.github.com/repos/pantsbuild/pants/branches{/branch}","tags_url":"https://api.github.com/repos/pantsbuild/pants/tags","blobs_url":"https://api.github.com/repos/pantsbuild/pants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pantsbuild/pants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pantsbuild/pants/git/refs{/sha}","trees_url":"https://api.github.com/repos/pantsbuild/pants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pantsbuild/pants/statuses/{sha}","languages_url":"https://api.github.com/repos/pantsbuild/pants/languages","stargazers_url":"https://api.github.com/repos/pantsbuild/pants/stargazers","contributors_url":"https://api.github.com/repos/pantsbuild/pants/contributors","subscribers_url":"https://api.github.com/repos/pantsbuild/pants/subscribers","subscription_url":"https://api.github.com/repos/pantsbuild/pants/subscription","commits_url":"https://api.github.com/repos/pantsbuild/pants/commits{/sha}","git_commits_url":"https://api.github.com/repos/pantsbuild/pants/git/commits{/sha}","comments_url":"https://api.github.com/repos/pantsbuild/pants/comments{/number}","issue_comment_url":"https://api.github.com/repos/pantsbuild/pants/issues/comments{/number}","contents_url":"https://api.github.com/repos/pantsbuild/pants/contents/{+path}","compare_url":"https://api.github.com/repos/pantsbuild/pants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pantsbuild/pants/merges","archive_url":"https://api.github.com/repos/pantsbuild/pants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pantsbuild/pants/downloads","issues_url":"https://api.github.com/repos/pantsbuild/pants/issues{/number}","pulls_url":"https://api.github.com/repos/pantsbuild/pants/pulls{/number}","milestones_url":"https://api.github.com/repos/pantsbuild/pants/milestones{/number}","notifications_url":"https://api.github.com/repos/pantsbuild/pants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pantsbuild/pants/labels{/name}","releases_url":"https://api.github.com/repos/pantsbuild/pants/releases{/id}","deployments_url":"https://api.github.com/repos/pantsbuild/pants/deployments","created_at":"2012-12-17T17:39:04Z","updated_at":"2016-12-17T21:12:45Z","pushed_at":"2016-12-19T20:04:46Z","git_url":"git://github.com/pantsbuild/pants.git","ssh_url":"git@github.com:pantsbuild/pants.git","clone_url":"https://github.com/pantsbuild/pants.git","svn_url":"https://github.com/pantsbuild/pants","homepage":"http://pantsbuild.github.io/","size":77949,"stargazers_count":704,"watchers_count":704,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":202,"mirror_url":null,"open_issues_count":440,"forks":202,"open_issues":440,"watchers":704,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/4139"},"html":{"href":"https://github.com/pantsbuild/pants/pull/4139"},"issue":{"href":"https://api.github.com/repos/pantsbuild/pants/issues/4139"},"comments":{"href":"https://api.github.com/repos/pantsbuild/pants/issues/4139/comments"},"review_comments":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/4139/comments"},"review_comment":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/4139/commits"},"statuses":{"href":"https://api.github.com/repos/pantsbuild/pants/statuses/4fbc4d47c562a60d673d23b05d74af9164573a6f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mateor","id":1743873,"avatar_url":"https://avatars.githubusercontent.com/u/1743873?v=3","gravatar_id":"","url":"https://api.github.com/users/mateor","html_url":"https://github.com/mateor","followers_url":"https://api.github.com/users/mateor/followers","following_url":"https://api.github.com/users/mateor/following{/other_user}","gists_url":"https://api.github.com/users/mateor/gists{/gist_id}","starred_url":"https://api.github.com/users/mateor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateor/subscriptions","organizations_url":"https://api.github.com/users/mateor/orgs","repos_url":"https://api.github.com/users/mateor/repos","events_url":"https://api.github.com/users/mateor/events{/privacy}","received_events_url":"https://api.github.com/users/mateor/received_events","type":"User","site_admin":false},"comments":4,"review_comments":28,"commits":10,"additions":375,"deletions":114,"changed_files":12}}
{"actor":{"display_login":"mateor"}}