{"action":"created","comment":{"url":"https://api.github.com/repos/taskcluster/docker-worker/pulls/comments/140906600","pull_request_review_id":65042669,"id":140906600,"diff_hunk":"@@ -0,0 +1,56 @@\n+#!/usr/bin/env node\n+\n+const bluebird = require('bluebird');\n+const workerTypes = require('../etc/worker-types.json');\n+const amis = require('../../docker-worker-amis.json');\n+const jsonfile = bluebird.Promise.promisifyAll(require('jsonfile'));\n+const utils = require('./worker_type_utils');\n+\n+/*\n+ * Write worker-types configuration to a json file\n+ */\n+async function backupWorkerTypes(client) {\n+  console.log('Creating worker-types backup file.');\n+  const names = await client.listWorkerTypes();\n+  const workerTypes = names.map(name => {\n+    const w = new utils.WorkerType(client, name);\n+    return w.workerType();\n+  });\n+\n+  await Promise.all(workerTypes).then(","path":"deploy/bin/update-worker-types.js","position":20,"original_position":20,"commit_id":"0afd20ea57b3fad8d486c5313e19dc4be0614455","original_commit_id":"0afd20ea57b3fad8d486c5313e19dc4be0614455","user":{"login":"gregarndt","id":2592630,"avatar_url":"https://avatars0.githubusercontent.com/u/2592630?v=4","gravatar_id":"","url":"https://api.github.com/users/gregarndt","html_url":"https://github.com/gregarndt","followers_url":"https://api.github.com/users/gregarndt/followers","following_url":"https://api.github.com/users/gregarndt/following{/other_user}","gists_url":"https://api.github.com/users/gregarndt/gists{/gist_id}","starred_url":"https://api.github.com/users/gregarndt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregarndt/subscriptions","organizations_url":"https://api.github.com/users/gregarndt/orgs","repos_url":"https://api.github.com/users/gregarndt/repos","events_url":"https://api.github.com/users/gregarndt/events{/privacy}","received_events_url":"https://api.github.com/users/gregarndt/received_events","type":"User","site_admin":false},"body":"The Promise.all() might read better when initalizing workerTypes than here.  Took me a second to realize that w.workerType() is actually a promise.","created_at":"2017-09-25T21:41:20Z","updated_at":"2017-09-25T21:56:55Z","html_url":"https://github.com/taskcluster/docker-worker/pull/320#discussion_r140906600","pull_request_url":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/taskcluster/docker-worker/pulls/comments/140906600"},"html":{"href":"https://github.com/taskcluster/docker-worker/pull/320#discussion_r140906600"},"pull_request":{"href":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320"}}},"pull_request":{"url":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320","id":142986258,"html_url":"https://github.com/taskcluster/docker-worker/pull/320","diff_url":"https://github.com/taskcluster/docker-worker/pull/320.diff","patch_url":"https://github.com/taskcluster/docker-worker/pull/320.patch","issue_url":"https://api.github.com/repos/taskcluster/docker-worker/issues/320","number":320,"state":"open","locked":false,"title":"[deploy] Add scripts to update provisioner. r=garndt","user":{"login":"walac","id":611309,"avatar_url":"https://avatars1.githubusercontent.com/u/611309?v=4","gravatar_id":"","url":"https://api.github.com/users/walac","html_url":"https://github.com/walac","followers_url":"https://api.github.com/users/walac/followers","following_url":"https://api.github.com/users/walac/following{/other_user}","gists_url":"https://api.github.com/users/walac/gists{/gist_id}","starred_url":"https://api.github.com/users/walac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walac/subscriptions","organizations_url":"https://api.github.com/users/walac/orgs","repos_url":"https://api.github.com/users/walac/repos","events_url":"https://api.github.com/users/walac/events{/privacy}","received_events_url":"https://api.github.com/users/walac/received_events","type":"User","site_admin":false},"body":"We add two new utility scripts to help deployment:\r\n\r\n* update-worker-types: update the aws-provisioner with the new AMI ids.\r\nIt produces a backup of provisioner configuration before updating.\r\n* rollback-worker-types: used to rollback the new AMIs in case of\r\ndeployment bustage.\r\n\r\nBoth scripts kill worker-types running EC2 instances.","created_at":"2017-09-25T21:15:11Z","updated_at":"2017-09-25T21:56:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8553c0ef3a27c5acc89cbf5ba6f93e5147be8ae1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"eliperelman","id":285899,"avatar_url":"https://avatars0.githubusercontent.com/u/285899?v=4","gravatar_id":"","url":"https://api.github.com/users/eliperelman","html_url":"https://github.com/eliperelman","followers_url":"https://api.github.com/users/eliperelman/followers","following_url":"https://api.github.com/users/eliperelman/following{/other_user}","gists_url":"https://api.github.com/users/eliperelman/gists{/gist_id}","starred_url":"https://api.github.com/users/eliperelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliperelman/subscriptions","organizations_url":"https://api.github.com/users/eliperelman/orgs","repos_url":"https://api.github.com/users/eliperelman/repos","events_url":"https://api.github.com/users/eliperelman/events{/privacy}","received_events_url":"https://api.github.com/users/eliperelman/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320/commits","review_comments_url":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320/comments","review_comment_url":"https://api.github.com/repos/taskcluster/docker-worker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskcluster/docker-worker/issues/320/comments","statuses_url":"https://api.github.com/repos/taskcluster/docker-worker/statuses/0afd20ea57b3fad8d486c5313e19dc4be0614455","head":{"label":"walac:automated-deployment","ref":"automated-deployment","sha":"0afd20ea57b3fad8d486c5313e19dc4be0614455","user":{"login":"walac","id":611309,"avatar_url":"https://avatars1.githubusercontent.com/u/611309?v=4","gravatar_id":"","url":"https://api.github.com/users/walac","html_url":"https://github.com/walac","followers_url":"https://api.github.com/users/walac/followers","following_url":"https://api.github.com/users/walac/following{/other_user}","gists_url":"https://api.github.com/users/walac/gists{/gist_id}","starred_url":"https://api.github.com/users/walac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walac/subscriptions","organizations_url":"https://api.github.com/users/walac/orgs","repos_url":"https://api.github.com/users/walac/repos","events_url":"https://api.github.com/users/walac/events{/privacy}","received_events_url":"https://api.github.com/users/walac/received_events","type":"User","site_admin":false},"repo":{"id":43084633,"name":"docker-worker","full_name":"walac/docker-worker","owner":{"login":"walac","id":611309,"avatar_url":"https://avatars1.githubusercontent.com/u/611309?v=4","gravatar_id":"","url":"https://api.github.com/users/walac","html_url":"https://github.com/walac","followers_url":"https://api.github.com/users/walac/followers","following_url":"https://api.github.com/users/walac/following{/other_user}","gists_url":"https://api.github.com/users/walac/gists{/gist_id}","starred_url":"https://api.github.com/users/walac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walac/subscriptions","organizations_url":"https://api.github.com/users/walac/orgs","repos_url":"https://api.github.com/users/walac/repos","events_url":"https://api.github.com/users/walac/events{/privacy}","received_events_url":"https://api.github.com/users/walac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/walac/docker-worker","description":"Docker worker for the cluster","fork":true,"url":"https://api.github.com/repos/walac/docker-worker","forks_url":"https://api.github.com/repos/walac/docker-worker/forks","keys_url":"https://api.github.com/repos/walac/docker-worker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/walac/docker-worker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/walac/docker-worker/teams","hooks_url":"https://api.github.com/repos/walac/docker-worker/hooks","issue_events_url":"https://api.github.com/repos/walac/docker-worker/issues/events{/number}","events_url":"https://api.github.com/repos/walac/docker-worker/events","assignees_url":"https://api.github.com/repos/walac/docker-worker/assignees{/user}","branches_url":"https://api.github.com/repos/walac/docker-worker/branches{/branch}","tags_url":"https://api.github.com/repos/walac/docker-worker/tags","blobs_url":"https://api.github.com/repos/walac/docker-worker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/walac/docker-worker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/walac/docker-worker/git/refs{/sha}","trees_url":"https://api.github.com/repos/walac/docker-worker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/walac/docker-worker/statuses/{sha}","languages_url":"https://api.github.com/repos/walac/docker-worker/languages","stargazers_url":"https://api.github.com/repos/walac/docker-worker/stargazers","contributors_url":"https://api.github.com/repos/walac/docker-worker/contributors","subscribers_url":"https://api.github.com/repos/walac/docker-worker/subscribers","subscription_url":"https://api.github.com/repos/walac/docker-worker/subscription","commits_url":"https://api.github.com/repos/walac/docker-worker/commits{/sha}","git_commits_url":"https://api.github.com/repos/walac/docker-worker/git/commits{/sha}","comments_url":"https://api.github.com/repos/walac/docker-worker/comments{/number}","issue_comment_url":"https://api.github.com/repos/walac/docker-worker/issues/comments{/number}","contents_url":"https://api.github.com/repos/walac/docker-worker/contents/{+path}","compare_url":"https://api.github.com/repos/walac/docker-worker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/walac/docker-worker/merges","archive_url":"https://api.github.com/repos/walac/docker-worker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/walac/docker-worker/downloads","issues_url":"https://api.github.com/repos/walac/docker-worker/issues{/number}","pulls_url":"https://api.github.com/repos/walac/docker-worker/pulls{/number}","milestones_url":"https://api.github.com/repos/walac/docker-worker/milestones{/number}","notifications_url":"https://api.github.com/repos/walac/docker-worker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/walac/docker-worker/labels{/name}","releases_url":"https://api.github.com/repos/walac/docker-worker/releases{/id}","deployments_url":"https://api.github.com/repos/walac/docker-worker/deployments","created_at":"2015-09-24T18:17:51Z","updated_at":"2016-01-11T20:23:13Z","pushed_at":"2017-09-25T21:14:16Z","git_url":"git://github.com/walac/docker-worker.git","ssh_url":"git@github.com:walac/docker-worker.git","clone_url":"https://github.com/walac/docker-worker.git","svn_url":"https://github.com/walac/docker-worker","homepage":"","size":28987,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"taskcluster:master","ref":"master","sha":"27241854517b09881df3e7a126b9235cd39a9d84","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":15545665,"name":"docker-worker","full_name":"taskcluster/docker-worker","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/docker-worker","description":"Docker based worker for TaskCluster","fork":false,"url":"https://api.github.com/repos/taskcluster/docker-worker","forks_url":"https://api.github.com/repos/taskcluster/docker-worker/forks","keys_url":"https://api.github.com/repos/taskcluster/docker-worker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/docker-worker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/docker-worker/teams","hooks_url":"https://api.github.com/repos/taskcluster/docker-worker/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/docker-worker/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/docker-worker/events","assignees_url":"https://api.github.com/repos/taskcluster/docker-worker/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/docker-worker/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/docker-worker/tags","blobs_url":"https://api.github.com/repos/taskcluster/docker-worker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/docker-worker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/docker-worker/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/docker-worker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/docker-worker/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/docker-worker/languages","stargazers_url":"https://api.github.com/repos/taskcluster/docker-worker/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/docker-worker/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/docker-worker/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/docker-worker/subscription","commits_url":"https://api.github.com/repos/taskcluster/docker-worker/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/docker-worker/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/docker-worker/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/docker-worker/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/docker-worker/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/docker-worker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/docker-worker/merges","archive_url":"https://api.github.com/repos/taskcluster/docker-worker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/docker-worker/downloads","issues_url":"https://api.github.com/repos/taskcluster/docker-worker/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/docker-worker/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/docker-worker/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/docker-worker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/docker-worker/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/docker-worker/releases{/id}","deployments_url":"https://api.github.com/repos/taskcluster/docker-worker/deployments","created_at":"2013-12-31T07:38:22Z","updated_at":"2017-09-16T02:49:35Z","pushed_at":"2017-09-25T21:15:12Z","git_url":"git://github.com/taskcluster/docker-worker.git","ssh_url":"git@github.com:taskcluster/docker-worker.git","clone_url":"https://github.com/taskcluster/docker-worker.git","svn_url":"https://github.com/taskcluster/docker-worker","homepage":"","size":29071,"stargazers_count":29,"watchers_count":29,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":6,"forks":29,"open_issues":6,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320"},"html":{"href":"https://github.com/taskcluster/docker-worker/pull/320"},"issue":{"href":"https://api.github.com/repos/taskcluster/docker-worker/issues/320"},"comments":{"href":"https://api.github.com/repos/taskcluster/docker-worker/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/taskcluster/docker-worker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskcluster/docker-worker/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/taskcluster/docker-worker/statuses/0afd20ea57b3fad8d486c5313e19dc4be0614455"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gregarndt"}}