{"action":"created","comment":{"url":"https://api.github.com/repos/deis/controller/pulls/comments/73744997","id":73744997,"diff_hunk":"@@ -775,3 +785,27 @@ def _scheduler_filter(self, **kwargs):\n             labels.update({'type': kwargs['type']})\n \n         return labels\n+\n+    def _build_env_vars(self, build_type, version, envs):\n+        \"\"\"\n+        Build a dict of env vars, setting default vars based on app type\n+        and then combining with the user set ones\n+        \"\"\"\n+\n+        # mix in default environment information deis may require\n+        default_env = {\n+            'DEIS_APP': self.id,\n+            'WORKFLOW_RELEASE': version\n+        }\n+\n+        # Check if it is a slug builder image.\n+        if build_type == 'buildpack':\n+            # overwrite image so slugrunner image is used in the container\n+            default_env['SLUG_URL'] = settings.SLUGRUNNER_IMAGE","path":"rootfs/api/models/app.py","position":96,"original_position":96,"commit_id":"059aa61e903795c7d25a825fe4c51fdb9e4527f5","original_commit_id":"059aa61e903795c7d25a825fe4c51fdb9e4527f5","user":{"login":"helgi","id":70530,"avatar_url":"https://avatars.githubusercontent.com/u/70530?v=3","gravatar_id":"","url":"https://api.github.com/users/helgi","html_url":"https://github.com/helgi","followers_url":"https://api.github.com/users/helgi/followers","following_url":"https://api.github.com/users/helgi/following{/other_user}","gists_url":"https://api.github.com/users/helgi/gists{/gist_id}","starred_url":"https://api.github.com/users/helgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgi/subscriptions","organizations_url":"https://api.github.com/users/helgi/orgs","repos_url":"https://api.github.com/users/helgi/repos","events_url":"https://api.github.com/users/helgi/events{/privacy}","received_events_url":"https://api.github.com/users/helgi/received_events","type":"User","site_admin":false},"body":"yeah, copy paste error for sure. Let me fix up","created_at":"2016-08-05T19:11:00Z","updated_at":"2016-08-05T19:11:00Z","html_url":"https://github.com/deis/controller/pull/946#discussion_r73744997","pull_request_url":"https://api.github.com/repos/deis/controller/pulls/946","_links":{"self":{"href":"https://api.github.com/repos/deis/controller/pulls/comments/73744997"},"html":{"href":"https://github.com/deis/controller/pull/946#discussion_r73744997"},"pull_request":{"href":"https://api.github.com/repos/deis/controller/pulls/946"}}},"pull_request":{"url":"https://api.github.com/repos/deis/controller/pulls/946","id":79974622,"html_url":"https://github.com/deis/controller/pull/946","diff_url":"https://github.com/deis/controller/pull/946.diff","patch_url":"https://github.com/deis/controller/pull/946.patch","issue_url":"https://api.github.com/repos/deis/controller/issues/946","number":946,"state":"open","locked":false,"title":"fix(scheduler): create application config (env secrets) outside of deploy / scale to reduce k8s thrasing","user":{"login":"helgi","id":70530,"avatar_url":"https://avatars.githubusercontent.com/u/70530?v=3","gravatar_id":"","url":"https://api.github.com/users/helgi","html_url":"https://github.com/helgi","followers_url":"https://api.github.com/users/helgi/followers","following_url":"https://api.github.com/users/helgi/following{/other_user}","gists_url":"https://api.github.com/users/helgi/gists{/gist_id}","starred_url":"https://api.github.com/users/helgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgi/subscriptions","organizations_url":"https://api.github.com/users/helgi/orgs","repos_url":"https://api.github.com/users/helgi/repos","events_url":"https://api.github.com/users/helgi/events{/privacy}","received_events_url":"https://api.github.com/users/helgi/received_events","type":"User","site_admin":false},"body":"Prior to this the application config was being created inside `_set_container` which gets called for every proc type, yet we share this single config across all proc types (currently)","created_at":"2016-08-03T20:38:15Z","updated_at":"2016-08-05T19:11:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43362842f8720d447cd96fa85895f8b11fef8b3d","assignee":{"login":"helgi","id":70530,"avatar_url":"https://avatars.githubusercontent.com/u/70530?v=3","gravatar_id":"","url":"https://api.github.com/users/helgi","html_url":"https://github.com/helgi","followers_url":"https://api.github.com/users/helgi/followers","following_url":"https://api.github.com/users/helgi/following{/other_user}","gists_url":"https://api.github.com/users/helgi/gists{/gist_id}","starred_url":"https://api.github.com/users/helgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgi/subscriptions","organizations_url":"https://api.github.com/users/helgi/orgs","repos_url":"https://api.github.com/users/helgi/repos","events_url":"https://api.github.com/users/helgi/events{/privacy}","received_events_url":"https://api.github.com/users/helgi/received_events","type":"User","site_admin":false},"assignees":[{"login":"helgi","id":70530,"avatar_url":"https://avatars.githubusercontent.com/u/70530?v=3","gravatar_id":"","url":"https://api.github.com/users/helgi","html_url":"https://github.com/helgi","followers_url":"https://api.github.com/users/helgi/followers","following_url":"https://api.github.com/users/helgi/following{/other_user}","gists_url":"https://api.github.com/users/helgi/gists{/gist_id}","starred_url":"https://api.github.com/users/helgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgi/subscriptions","organizations_url":"https://api.github.com/users/helgi/orgs","repos_url":"https://api.github.com/users/helgi/repos","events_url":"https://api.github.com/users/helgi/events{/privacy}","received_events_url":"https://api.github.com/users/helgi/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/deis/controller/milestones/15","html_url":"https://github.com/deis/controller/milestones/v2.4","labels_url":"https://api.github.com/repos/deis/controller/milestones/15/labels","id":1921991,"number":15,"title":"v2.4","description":null,"creator":{"login":"deis-admin","id":12703824,"avatar_url":"https://avatars.githubusercontent.com/u/12703824?v=3","gravatar_id":"","url":"https://api.github.com/users/deis-admin","html_url":"https://github.com/deis-admin","followers_url":"https://api.github.com/users/deis-admin/followers","following_url":"https://api.github.com/users/deis-admin/following{/other_user}","gists_url":"https://api.github.com/users/deis-admin/gists{/gist_id}","starred_url":"https://api.github.com/users/deis-admin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis-admin/subscriptions","organizations_url":"https://api.github.com/users/deis-admin/orgs","repos_url":"https://api.github.com/users/deis-admin/repos","events_url":"https://api.github.com/users/deis-admin/events{/privacy}","received_events_url":"https://api.github.com/users/deis-admin/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":4,"state":"open","created_at":"2016-08-03T21:37:32Z","updated_at":"2016-08-05T16:36:33Z","due_on":"2016-08-17T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/deis/controller/pulls/946/commits","review_comments_url":"https://api.github.com/repos/deis/controller/pulls/946/comments","review_comment_url":"https://api.github.com/repos/deis/controller/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deis/controller/issues/946/comments","statuses_url":"https://api.github.com/repos/deis/controller/statuses/059aa61e903795c7d25a825fe4c51fdb9e4527f5","head":{"label":"helgi:app_config_move","ref":"app_config_move","sha":"059aa61e903795c7d25a825fe4c51fdb9e4527f5","user":{"login":"helgi","id":70530,"avatar_url":"https://avatars.githubusercontent.com/u/70530?v=3","gravatar_id":"","url":"https://api.github.com/users/helgi","html_url":"https://github.com/helgi","followers_url":"https://api.github.com/users/helgi/followers","following_url":"https://api.github.com/users/helgi/following{/other_user}","gists_url":"https://api.github.com/users/helgi/gists{/gist_id}","starred_url":"https://api.github.com/users/helgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgi/subscriptions","organizations_url":"https://api.github.com/users/helgi/orgs","repos_url":"https://api.github.com/users/helgi/repos","events_url":"https://api.github.com/users/helgi/events{/privacy}","received_events_url":"https://api.github.com/users/helgi/received_events","type":"User","site_admin":false},"repo":{"id":47214840,"name":"controller","full_name":"helgi/controller","owner":{"login":"helgi","id":70530,"avatar_url":"https://avatars.githubusercontent.com/u/70530?v=3","gravatar_id":"","url":"https://api.github.com/users/helgi","html_url":"https://github.com/helgi","followers_url":"https://api.github.com/users/helgi/followers","following_url":"https://api.github.com/users/helgi/following{/other_user}","gists_url":"https://api.github.com/users/helgi/gists{/gist_id}","starred_url":"https://api.github.com/users/helgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helgi/subscriptions","organizations_url":"https://api.github.com/users/helgi/orgs","repos_url":"https://api.github.com/users/helgi/repos","events_url":"https://api.github.com/users/helgi/events{/privacy}","received_events_url":"https://api.github.com/users/helgi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/helgi/controller","description":"PaaS workflow controller and client for Deis v2","fork":true,"url":"https://api.github.com/repos/helgi/controller","forks_url":"https://api.github.com/repos/helgi/controller/forks","keys_url":"https://api.github.com/repos/helgi/controller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/helgi/controller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/helgi/controller/teams","hooks_url":"https://api.github.com/repos/helgi/controller/hooks","issue_events_url":"https://api.github.com/repos/helgi/controller/issues/events{/number}","events_url":"https://api.github.com/repos/helgi/controller/events","assignees_url":"https://api.github.com/repos/helgi/controller/assignees{/user}","branches_url":"https://api.github.com/repos/helgi/controller/branches{/branch}","tags_url":"https://api.github.com/repos/helgi/controller/tags","blobs_url":"https://api.github.com/repos/helgi/controller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/helgi/controller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/helgi/controller/git/refs{/sha}","trees_url":"https://api.github.com/repos/helgi/controller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/helgi/controller/statuses/{sha}","languages_url":"https://api.github.com/repos/helgi/controller/languages","stargazers_url":"https://api.github.com/repos/helgi/controller/stargazers","contributors_url":"https://api.github.com/repos/helgi/controller/contributors","subscribers_url":"https://api.github.com/repos/helgi/controller/subscribers","subscription_url":"https://api.github.com/repos/helgi/controller/subscription","commits_url":"https://api.github.com/repos/helgi/controller/commits{/sha}","git_commits_url":"https://api.github.com/repos/helgi/controller/git/commits{/sha}","comments_url":"https://api.github.com/repos/helgi/controller/comments{/number}","issue_comment_url":"https://api.github.com/repos/helgi/controller/issues/comments{/number}","contents_url":"https://api.github.com/repos/helgi/controller/contents/{+path}","compare_url":"https://api.github.com/repos/helgi/controller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/helgi/controller/merges","archive_url":"https://api.github.com/repos/helgi/controller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/helgi/controller/downloads","issues_url":"https://api.github.com/repos/helgi/controller/issues{/number}","pulls_url":"https://api.github.com/repos/helgi/controller/pulls{/number}","milestones_url":"https://api.github.com/repos/helgi/controller/milestones{/number}","notifications_url":"https://api.github.com/repos/helgi/controller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/helgi/controller/labels{/name}","releases_url":"https://api.github.com/repos/helgi/controller/releases{/id}","deployments_url":"https://api.github.com/repos/helgi/controller/deployments","created_at":"2015-12-01T20:16:13Z","updated_at":"2016-03-16T17:43:06Z","pushed_at":"2016-08-05T19:06:22Z","git_url":"git://github.com/helgi/controller.git","ssh_url":"git@github.com:helgi/controller.git","clone_url":"https://github.com/helgi/controller.git","svn_url":"https://github.com/helgi/controller","homepage":"http://deis.io","size":16144,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"deis:master","ref":"master","sha":"58b07f5b2f4b05e7eac4a866b215097ffde1d492","user":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"repo":{"id":45704630,"name":"controller","full_name":"deis/controller","owner":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deis/controller","description":"Deis Workflow Controller (API)","fork":false,"url":"https://api.github.com/repos/deis/controller","forks_url":"https://api.github.com/repos/deis/controller/forks","keys_url":"https://api.github.com/repos/deis/controller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deis/controller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deis/controller/teams","hooks_url":"https://api.github.com/repos/deis/controller/hooks","issue_events_url":"https://api.github.com/repos/deis/controller/issues/events{/number}","events_url":"https://api.github.com/repos/deis/controller/events","assignees_url":"https://api.github.com/repos/deis/controller/assignees{/user}","branches_url":"https://api.github.com/repos/deis/controller/branches{/branch}","tags_url":"https://api.github.com/repos/deis/controller/tags","blobs_url":"https://api.github.com/repos/deis/controller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deis/controller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deis/controller/git/refs{/sha}","trees_url":"https://api.github.com/repos/deis/controller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deis/controller/statuses/{sha}","languages_url":"https://api.github.com/repos/deis/controller/languages","stargazers_url":"https://api.github.com/repos/deis/controller/stargazers","contributors_url":"https://api.github.com/repos/deis/controller/contributors","subscribers_url":"https://api.github.com/repos/deis/controller/subscribers","subscription_url":"https://api.github.com/repos/deis/controller/subscription","commits_url":"https://api.github.com/repos/deis/controller/commits{/sha}","git_commits_url":"https://api.github.com/repos/deis/controller/git/commits{/sha}","comments_url":"https://api.github.com/repos/deis/controller/comments{/number}","issue_comment_url":"https://api.github.com/repos/deis/controller/issues/comments{/number}","contents_url":"https://api.github.com/repos/deis/controller/contents/{+path}","compare_url":"https://api.github.com/repos/deis/controller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deis/controller/merges","archive_url":"https://api.github.com/repos/deis/controller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deis/controller/downloads","issues_url":"https://api.github.com/repos/deis/controller/issues{/number}","pulls_url":"https://api.github.com/repos/deis/controller/pulls{/number}","milestones_url":"https://api.github.com/repos/deis/controller/milestones{/number}","notifications_url":"https://api.github.com/repos/deis/controller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deis/controller/labels{/name}","releases_url":"https://api.github.com/repos/deis/controller/releases{/id}","deployments_url":"https://api.github.com/repos/deis/controller/deployments","created_at":"2015-11-06T20:06:05Z","updated_at":"2016-08-04T16:41:09Z","pushed_at":"2016-08-05T19:06:22Z","git_url":"git://github.com/deis/controller.git","ssh_url":"git@github.com:deis/controller.git","clone_url":"https://github.com/deis/controller.git","svn_url":"https://github.com/deis/controller","homepage":"https://deis.com","size":17286,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":61,"forks":28,"open_issues":61,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deis/controller/pulls/946"},"html":{"href":"https://github.com/deis/controller/pull/946"},"issue":{"href":"https://api.github.com/repos/deis/controller/issues/946"},"comments":{"href":"https://api.github.com/repos/deis/controller/issues/946/comments"},"review_comments":{"href":"https://api.github.com/repos/deis/controller/pulls/946/comments"},"review_comment":{"href":"https://api.github.com/repos/deis/controller/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deis/controller/pulls/946/commits"},"statuses":{"href":"https://api.github.com/repos/deis/controller/statuses/059aa61e903795c7d25a825fe4c51fdb9e4527f5"}}}}
{"actor":{"display_login":"helgi"}}