{"action":"opened","number":268,"pull_request":{"url":"https://api.github.com/repos/acidprime/r10k/pulls/268","id":60395243,"html_url":"https://github.com/acidprime/r10k/pull/268","diff_url":"https://github.com/acidprime/r10k/pull/268.diff","patch_url":"https://github.com/acidprime/r10k/pull/268.patch","issue_url":"https://api.github.com/repos/acidprime/r10k/issues/268","number":268,"state":"open","locked":false,"title":"Lockfile to mitigate r10k race condition.","user":{"login":"binford2k","id":1392917,"avatar_url":"https://avatars.githubusercontent.com/u/1392917?v=3","gravatar_id":"","url":"https://api.github.com/users/binford2k","html_url":"https://github.com/binford2k","followers_url":"https://api.github.com/users/binford2k/followers","following_url":"https://api.github.com/users/binford2k/following{/other_user}","gists_url":"https://api.github.com/users/binford2k/gists{/gist_id}","starred_url":"https://api.github.com/users/binford2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binford2k/subscriptions","organizations_url":"https://api.github.com/users/binford2k/orgs","repos_url":"https://api.github.com/users/binford2k/repos","events_url":"https://api.github.com/users/binford2k/events{/privacy}","received_events_url":"https://api.github.com/users/binford2k/received_events","type":"User","site_admin":false},"body":"r10k has a small race condition which can cause failed deploys if two happen\r\nmore or less simultaneously. To mitigate, we just lock on a file and wait for\r\nthe other one to complete. Note that this doesn't catch the potential\r\nrace that we get due to the fork-exec, but it at least makes the window\r\nsmaller. This dropped failure rate in a busy classroom from ~30% to zero.\r\n\r\nThe proper fix is to lock in r10k, of course.","created_at":"2016-02-23T19:29:41Z","updated_at":"2016-02-23T19:29:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acidprime/r10k/pulls/268/commits","review_comments_url":"https://api.github.com/repos/acidprime/r10k/pulls/268/comments","review_comment_url":"https://api.github.com/repos/acidprime/r10k/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acidprime/r10k/issues/268/comments","statuses_url":"https://api.github.com/repos/acidprime/r10k/statuses/c5b6c2813512457889cf0f68d8175d262827e283","head":{"label":"binford2k:add_flock_to_mitigate_r10k_race","ref":"add_flock_to_mitigate_r10k_race","sha":"c5b6c2813512457889cf0f68d8175d262827e283","user":{"login":"binford2k","id":1392917,"avatar_url":"https://avatars.githubusercontent.com/u/1392917?v=3","gravatar_id":"","url":"https://api.github.com/users/binford2k","html_url":"https://github.com/binford2k","followers_url":"https://api.github.com/users/binford2k/followers","following_url":"https://api.github.com/users/binford2k/following{/other_user}","gists_url":"https://api.github.com/users/binford2k/gists{/gist_id}","starred_url":"https://api.github.com/users/binford2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binford2k/subscriptions","organizations_url":"https://api.github.com/users/binford2k/orgs","repos_url":"https://api.github.com/users/binford2k/repos","events_url":"https://api.github.com/users/binford2k/events{/privacy}","received_events_url":"https://api.github.com/users/binford2k/received_events","type":"User","site_admin":false},"repo":{"id":26498873,"name":"r10k","full_name":"binford2k/r10k","owner":{"login":"binford2k","id":1392917,"avatar_url":"https://avatars.githubusercontent.com/u/1392917?v=3","gravatar_id":"","url":"https://api.github.com/users/binford2k","html_url":"https://github.com/binford2k","followers_url":"https://api.github.com/users/binford2k/followers","following_url":"https://api.github.com/users/binford2k/following{/other_user}","gists_url":"https://api.github.com/users/binford2k/gists{/gist_id}","starred_url":"https://api.github.com/users/binford2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binford2k/subscriptions","organizations_url":"https://api.github.com/users/binford2k/orgs","repos_url":"https://api.github.com/users/binford2k/repos","events_url":"https://api.github.com/users/binford2k/events{/privacy}","received_events_url":"https://api.github.com/users/binford2k/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/binford2k/r10k","description":"Setup and configure r10k for use with git based environments in puppet","fork":true,"url":"https://api.github.com/repos/binford2k/r10k","forks_url":"https://api.github.com/repos/binford2k/r10k/forks","keys_url":"https://api.github.com/repos/binford2k/r10k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binford2k/r10k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binford2k/r10k/teams","hooks_url":"https://api.github.com/repos/binford2k/r10k/hooks","issue_events_url":"https://api.github.com/repos/binford2k/r10k/issues/events{/number}","events_url":"https://api.github.com/repos/binford2k/r10k/events","assignees_url":"https://api.github.com/repos/binford2k/r10k/assignees{/user}","branches_url":"https://api.github.com/repos/binford2k/r10k/branches{/branch}","tags_url":"https://api.github.com/repos/binford2k/r10k/tags","blobs_url":"https://api.github.com/repos/binford2k/r10k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binford2k/r10k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binford2k/r10k/git/refs{/sha}","trees_url":"https://api.github.com/repos/binford2k/r10k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binford2k/r10k/statuses/{sha}","languages_url":"https://api.github.com/repos/binford2k/r10k/languages","stargazers_url":"https://api.github.com/repos/binford2k/r10k/stargazers","contributors_url":"https://api.github.com/repos/binford2k/r10k/contributors","subscribers_url":"https://api.github.com/repos/binford2k/r10k/subscribers","subscription_url":"https://api.github.com/repos/binford2k/r10k/subscription","commits_url":"https://api.github.com/repos/binford2k/r10k/commits{/sha}","git_commits_url":"https://api.github.com/repos/binford2k/r10k/git/commits{/sha}","comments_url":"https://api.github.com/repos/binford2k/r10k/comments{/number}","issue_comment_url":"https://api.github.com/repos/binford2k/r10k/issues/comments{/number}","contents_url":"https://api.github.com/repos/binford2k/r10k/contents/{+path}","compare_url":"https://api.github.com/repos/binford2k/r10k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binford2k/r10k/merges","archive_url":"https://api.github.com/repos/binford2k/r10k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binford2k/r10k/downloads","issues_url":"https://api.github.com/repos/binford2k/r10k/issues{/number}","pulls_url":"https://api.github.com/repos/binford2k/r10k/pulls{/number}","milestones_url":"https://api.github.com/repos/binford2k/r10k/milestones{/number}","notifications_url":"https://api.github.com/repos/binford2k/r10k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binford2k/r10k/labels{/name}","releases_url":"https://api.github.com/repos/binford2k/r10k/releases{/id}","deployments_url":"https://api.github.com/repos/binford2k/r10k/deployments","created_at":"2014-11-11T18:44:11Z","updated_at":"2016-02-23T19:17:50Z","pushed_at":"2016-02-23T19:29:11Z","git_url":"git://github.com/binford2k/r10k.git","ssh_url":"git@github.com:binford2k/r10k.git","clone_url":"https://github.com/binford2k/r10k.git","svn_url":"https://github.com/binford2k/r10k","homepage":"","size":650,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"acidprime:master","ref":"master","sha":"f2707811b7cd6b3e9c83bfc767e7dabd7601b994","user":{"login":"acidprime","id":1173142,"avatar_url":"https://avatars.githubusercontent.com/u/1173142?v=3","gravatar_id":"","url":"https://api.github.com/users/acidprime","html_url":"https://github.com/acidprime","followers_url":"https://api.github.com/users/acidprime/followers","following_url":"https://api.github.com/users/acidprime/following{/other_user}","gists_url":"https://api.github.com/users/acidprime/gists{/gist_id}","starred_url":"https://api.github.com/users/acidprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidprime/subscriptions","organizations_url":"https://api.github.com/users/acidprime/orgs","repos_url":"https://api.github.com/users/acidprime/repos","events_url":"https://api.github.com/users/acidprime/events{/privacy}","received_events_url":"https://api.github.com/users/acidprime/received_events","type":"User","site_admin":false},"repo":{"id":9922918,"name":"r10k","full_name":"acidprime/r10k","owner":{"login":"acidprime","id":1173142,"avatar_url":"https://avatars.githubusercontent.com/u/1173142?v=3","gravatar_id":"","url":"https://api.github.com/users/acidprime","html_url":"https://github.com/acidprime","followers_url":"https://api.github.com/users/acidprime/followers","following_url":"https://api.github.com/users/acidprime/following{/other_user}","gists_url":"https://api.github.com/users/acidprime/gists{/gist_id}","starred_url":"https://api.github.com/users/acidprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidprime/subscriptions","organizations_url":"https://api.github.com/users/acidprime/orgs","repos_url":"https://api.github.com/users/acidprime/repos","events_url":"https://api.github.com/users/acidprime/events{/privacy}","received_events_url":"https://api.github.com/users/acidprime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acidprime/r10k","description":"Setup and configure r10k for use with git based environments in puppet","fork":false,"url":"https://api.github.com/repos/acidprime/r10k","forks_url":"https://api.github.com/repos/acidprime/r10k/forks","keys_url":"https://api.github.com/repos/acidprime/r10k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acidprime/r10k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acidprime/r10k/teams","hooks_url":"https://api.github.com/repos/acidprime/r10k/hooks","issue_events_url":"https://api.github.com/repos/acidprime/r10k/issues/events{/number}","events_url":"https://api.github.com/repos/acidprime/r10k/events","assignees_url":"https://api.github.com/repos/acidprime/r10k/assignees{/user}","branches_url":"https://api.github.com/repos/acidprime/r10k/branches{/branch}","tags_url":"https://api.github.com/repos/acidprime/r10k/tags","blobs_url":"https://api.github.com/repos/acidprime/r10k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acidprime/r10k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acidprime/r10k/git/refs{/sha}","trees_url":"https://api.github.com/repos/acidprime/r10k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acidprime/r10k/statuses/{sha}","languages_url":"https://api.github.com/repos/acidprime/r10k/languages","stargazers_url":"https://api.github.com/repos/acidprime/r10k/stargazers","contributors_url":"https://api.github.com/repos/acidprime/r10k/contributors","subscribers_url":"https://api.github.com/repos/acidprime/r10k/subscribers","subscription_url":"https://api.github.com/repos/acidprime/r10k/subscription","commits_url":"https://api.github.com/repos/acidprime/r10k/commits{/sha}","git_commits_url":"https://api.github.com/repos/acidprime/r10k/git/commits{/sha}","comments_url":"https://api.github.com/repos/acidprime/r10k/comments{/number}","issue_comment_url":"https://api.github.com/repos/acidprime/r10k/issues/comments{/number}","contents_url":"https://api.github.com/repos/acidprime/r10k/contents/{+path}","compare_url":"https://api.github.com/repos/acidprime/r10k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acidprime/r10k/merges","archive_url":"https://api.github.com/repos/acidprime/r10k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acidprime/r10k/downloads","issues_url":"https://api.github.com/repos/acidprime/r10k/issues{/number}","pulls_url":"https://api.github.com/repos/acidprime/r10k/pulls{/number}","milestones_url":"https://api.github.com/repos/acidprime/r10k/milestones{/number}","notifications_url":"https://api.github.com/repos/acidprime/r10k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acidprime/r10k/labels{/name}","releases_url":"https://api.github.com/repos/acidprime/r10k/releases{/id}","deployments_url":"https://api.github.com/repos/acidprime/r10k/deployments","created_at":"2013-05-07T22:18:04Z","updated_at":"2016-02-23T15:01:43Z","pushed_at":"2016-02-23T09:47:36Z","git_url":"git://github.com/acidprime/r10k.git","ssh_url":"git@github.com:acidprime/r10k.git","clone_url":"https://github.com/acidprime/r10k.git","svn_url":"https://github.com/acidprime/r10k","homepage":"","size":1177,"stargazers_count":65,"watchers_count":65,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":15,"forks":96,"open_issues":15,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/268"},"html":{"href":"https://github.com/acidprime/r10k/pull/268"},"issue":{"href":"https://api.github.com/repos/acidprime/r10k/issues/268"},"comments":{"href":"https://api.github.com/repos/acidprime/r10k/issues/268/comments"},"review_comments":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/268/comments"},"review_comment":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/268/commits"},"statuses":{"href":"https://api.github.com/repos/acidprime/r10k/statuses/c5b6c2813512457889cf0f68d8175d262827e283"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":8,"changed_files":1}}