{"action":"created","comment":{"url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/comments/242698453","pull_request_review_id":186272955,"id":242698453,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjY5ODQ1Mw==","diff_hunk":"@@ -290,6 +290,8 @@\n # Application Behaviors\n GITHUB_STATUS_UPDATES_ENABLED = env.bool(\"GITHUB_STATUS_UPDATES_ENABLED\", True)\n METACI_FLOW_SUBCLASS_ENABLED = env.bool(\"METACI_FLOW_SUBCLASS_ENABLED\", True)\n+SCRATCH_ORG_RESERVE = env.int(\"METACI_SCRATCH_ORG_RESERVE\", 10)\n+# number of scratch orgs to leave available in the org.","path":"config/settings/common.py","position":5,"original_position":5,"commit_id":"9e418d88d9a92ce8d802208208d4b9531d1aba5c","original_commit_id":"d234bc8347ab5c7254f07fdae825f6c31cc2f71e","user":{"login":"cdcarter","id":164,"node_id":"MDQ6VXNlcjE2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/164?v=4","gravatar_id":"","url":"https://api.github.com/users/cdcarter","html_url":"https://github.com/cdcarter","followers_url":"https://api.github.com/users/cdcarter/followers","following_url":"https://api.github.com/users/cdcarter/following{/other_user}","gists_url":"https://api.github.com/users/cdcarter/gists{/gist_id}","starred_url":"https://api.github.com/users/cdcarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdcarter/subscriptions","organizations_url":"https://api.github.com/users/cdcarter/orgs","repos_url":"https://api.github.com/users/cdcarter/repos","events_url":"https://api.github.com/users/cdcarter/events{/privacy}","received_events_url":"https://api.github.com/users/cdcarter/received_events","type":"User","site_admin":false},"body":"good catch, lemme set a very low default in the app.json for free setup. ","created_at":"2018-12-18T20:43:47Z","updated_at":"2018-12-18T20:43:47Z","html_url":"https://github.com/SFDO-Tooling/MetaCI/pull/340#discussion_r242698453","pull_request_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/comments/242698453"},"html":{"href":"https://github.com/SFDO-Tooling/MetaCI/pull/340#discussion_r242698453"},"pull_request":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340"}},"in_reply_to_id":242697998},"pull_request":{"url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340","id":239616835,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NjE2ODM1","html_url":"https://github.com/SFDO-Tooling/MetaCI/pull/340","diff_url":"https://github.com/SFDO-Tooling/MetaCI/pull/340.diff","patch_url":"https://github.com/SFDO-Tooling/MetaCI/pull/340.patch","issue_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/340","number":340,"state":"open","locked":false,"title":"Check for DevHub Capacity","user":{"login":"cdcarter","id":164,"node_id":"MDQ6VXNlcjE2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/164?v=4","gravatar_id":"","url":"https://api.github.com/users/cdcarter","html_url":"https://github.com/cdcarter","followers_url":"https://api.github.com/users/cdcarter/followers","following_url":"https://api.github.com/users/cdcarter/following{/other_user}","gists_url":"https://api.github.com/users/cdcarter/gists{/gist_id}","starred_url":"https://api.github.com/users/cdcarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdcarter/subscriptions","organizations_url":"https://api.github.com/users/cdcarter/orgs","repos_url":"https://api.github.com/users/cdcarter/repos","events_url":"https://api.github.com/users/cdcarter/events{/privacy}","received_events_url":"https://api.github.com/users/cdcarter/received_events","type":"User","site_admin":false},"body":"In check_queued_build, check the number of remaining scratch orgs before trying the build.\r\n\r\nThis can definitely be done cleaner... Just wanted to get an idea out there for comment...\r\n\r\nshould we allow MetaCI to use all orgs, or is reserving a capacity (i did ten in this version) useful? Obviously this isn't a strict guarantee and there are race conditions to consider...\r\n\r\nShould we cache the number available in some way, so that we don't hit the devhub with another call on every queued build? Probably not that big of a deal and would invalidate quickly.\r\n\r\nThis requires functional testing on staging, to test how it behaves with the full check_waiting_builds lifecycle. I should probably seperate the gate from the requeueing logic, so that on staging we can fake low capacity.","created_at":"2018-12-18T20:12:14Z","updated_at":"2018-12-18T20:43:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"699558025f76d0596f29fad3bb9c740a071a5e27","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340/commits","review_comments_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340/comments","review_comment_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/340/comments","statuses_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/statuses/9e418d88d9a92ce8d802208208d4b9531d1aba5c","head":{"label":"SFDO-Tooling:feature/queuescratchorg","ref":"feature/queuescratchorg","sha":"9e418d88d9a92ce8d802208208d4b9531d1aba5c","user":{"login":"SFDO-Tooling","id":42554011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTU0MDEx","avatar_url":"https://avatars2.githubusercontent.com/u/42554011?v=4","gravatar_id":"","url":"https://api.github.com/users/SFDO-Tooling","html_url":"https://github.com/SFDO-Tooling","followers_url":"https://api.github.com/users/SFDO-Tooling/followers","following_url":"https://api.github.com/users/SFDO-Tooling/following{/other_user}","gists_url":"https://api.github.com/users/SFDO-Tooling/gists{/gist_id}","starred_url":"https://api.github.com/users/SFDO-Tooling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFDO-Tooling/subscriptions","organizations_url":"https://api.github.com/users/SFDO-Tooling/orgs","repos_url":"https://api.github.com/users/SFDO-Tooling/repos","events_url":"https://api.github.com/users/SFDO-Tooling/events{/privacy}","received_events_url":"https://api.github.com/users/SFDO-Tooling/received_events","type":"Organization","site_admin":false},"repo":{"id":76289650,"node_id":"MDEwOlJlcG9zaXRvcnk3NjI4OTY1MA==","name":"MetaCI","full_name":"SFDO-Tooling/MetaCI","private":false,"owner":{"login":"SFDO-Tooling","id":42554011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTU0MDEx","avatar_url":"https://avatars2.githubusercontent.com/u/42554011?v=4","gravatar_id":"","url":"https://api.github.com/users/SFDO-Tooling","html_url":"https://github.com/SFDO-Tooling","followers_url":"https://api.github.com/users/SFDO-Tooling/followers","following_url":"https://api.github.com/users/SFDO-Tooling/following{/other_user}","gists_url":"https://api.github.com/users/SFDO-Tooling/gists{/gist_id}","starred_url":"https://api.github.com/users/SFDO-Tooling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFDO-Tooling/subscriptions","organizations_url":"https://api.github.com/users/SFDO-Tooling/orgs","repos_url":"https://api.github.com/users/SFDO-Tooling/repos","events_url":"https://api.github.com/users/SFDO-Tooling/events{/privacy}","received_events_url":"https://api.github.com/users/SFDO-Tooling/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SFDO-Tooling/MetaCI","description":"Lightweight, Salesforce specific CI app run on Heroku to build Github repositories configured for CumulusCI","fork":false,"url":"https://api.github.com/repos/SFDO-Tooling/MetaCI","forks_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/forks","keys_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/teams","hooks_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/hooks","issue_events_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/events{/number}","events_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/events","assignees_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/assignees{/user}","branches_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/branches{/branch}","tags_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/tags","blobs_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/refs{/sha}","trees_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/statuses/{sha}","languages_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/languages","stargazers_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/stargazers","contributors_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/contributors","subscribers_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/subscribers","subscription_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/subscription","commits_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/commits{/sha}","git_commits_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/commits{/sha}","comments_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/comments{/number}","issue_comment_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/comments{/number}","contents_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/contents/{+path}","compare_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/merges","archive_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/downloads","issues_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues{/number}","pulls_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls{/number}","milestones_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/milestones{/number}","notifications_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/labels{/name}","releases_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/releases{/id}","deployments_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/deployments","created_at":"2016-12-12T19:43:34Z","updated_at":"2018-12-17T19:00:10Z","pushed_at":"2018-12-18T20:41:56Z","git_url":"git://github.com/SFDO-Tooling/MetaCI.git","ssh_url":"git@github.com:SFDO-Tooling/MetaCI.git","clone_url":"https://github.com/SFDO-Tooling/MetaCI.git","svn_url":"https://github.com/SFDO-Tooling/MetaCI","homepage":"","size":1200,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":10,"open_issues":63,"watchers":21,"default_branch":"master"}},"base":{"label":"SFDO-Tooling:master","ref":"master","sha":"e4c84e57942962972db80758f02bae16e3b44b94","user":{"login":"SFDO-Tooling","id":42554011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTU0MDEx","avatar_url":"https://avatars2.githubusercontent.com/u/42554011?v=4","gravatar_id":"","url":"https://api.github.com/users/SFDO-Tooling","html_url":"https://github.com/SFDO-Tooling","followers_url":"https://api.github.com/users/SFDO-Tooling/followers","following_url":"https://api.github.com/users/SFDO-Tooling/following{/other_user}","gists_url":"https://api.github.com/users/SFDO-Tooling/gists{/gist_id}","starred_url":"https://api.github.com/users/SFDO-Tooling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFDO-Tooling/subscriptions","organizations_url":"https://api.github.com/users/SFDO-Tooling/orgs","repos_url":"https://api.github.com/users/SFDO-Tooling/repos","events_url":"https://api.github.com/users/SFDO-Tooling/events{/privacy}","received_events_url":"https://api.github.com/users/SFDO-Tooling/received_events","type":"Organization","site_admin":false},"repo":{"id":76289650,"node_id":"MDEwOlJlcG9zaXRvcnk3NjI4OTY1MA==","name":"MetaCI","full_name":"SFDO-Tooling/MetaCI","private":false,"owner":{"login":"SFDO-Tooling","id":42554011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTU0MDEx","avatar_url":"https://avatars2.githubusercontent.com/u/42554011?v=4","gravatar_id":"","url":"https://api.github.com/users/SFDO-Tooling","html_url":"https://github.com/SFDO-Tooling","followers_url":"https://api.github.com/users/SFDO-Tooling/followers","following_url":"https://api.github.com/users/SFDO-Tooling/following{/other_user}","gists_url":"https://api.github.com/users/SFDO-Tooling/gists{/gist_id}","starred_url":"https://api.github.com/users/SFDO-Tooling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SFDO-Tooling/subscriptions","organizations_url":"https://api.github.com/users/SFDO-Tooling/orgs","repos_url":"https://api.github.com/users/SFDO-Tooling/repos","events_url":"https://api.github.com/users/SFDO-Tooling/events{/privacy}","received_events_url":"https://api.github.com/users/SFDO-Tooling/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SFDO-Tooling/MetaCI","description":"Lightweight, Salesforce specific CI app run on Heroku to build Github repositories configured for CumulusCI","fork":false,"url":"https://api.github.com/repos/SFDO-Tooling/MetaCI","forks_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/forks","keys_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/teams","hooks_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/hooks","issue_events_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/events{/number}","events_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/events","assignees_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/assignees{/user}","branches_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/branches{/branch}","tags_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/tags","blobs_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/refs{/sha}","trees_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/statuses/{sha}","languages_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/languages","stargazers_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/stargazers","contributors_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/contributors","subscribers_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/subscribers","subscription_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/subscription","commits_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/commits{/sha}","git_commits_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/git/commits{/sha}","comments_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/comments{/number}","issue_comment_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/comments{/number}","contents_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/contents/{+path}","compare_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/merges","archive_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/downloads","issues_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues{/number}","pulls_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls{/number}","milestones_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/milestones{/number}","notifications_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/labels{/name}","releases_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/releases{/id}","deployments_url":"https://api.github.com/repos/SFDO-Tooling/MetaCI/deployments","created_at":"2016-12-12T19:43:34Z","updated_at":"2018-12-17T19:00:10Z","pushed_at":"2018-12-18T20:41:56Z","git_url":"git://github.com/SFDO-Tooling/MetaCI.git","ssh_url":"git@github.com:SFDO-Tooling/MetaCI.git","clone_url":"https://github.com/SFDO-Tooling/MetaCI.git","svn_url":"https://github.com/SFDO-Tooling/MetaCI","homepage":"","size":1200,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":10,"open_issues":63,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340"},"html":{"href":"https://github.com/SFDO-Tooling/MetaCI/pull/340"},"issue":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/340"},"comments":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/issues/340/comments"},"review_comments":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340/comments"},"review_comment":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/pulls/340/commits"},"statuses":{"href":"https://api.github.com/repos/SFDO-Tooling/MetaCI/statuses/9e418d88d9a92ce8d802208208d4b9531d1aba5c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cdcarter"}}