{"action":"created","comment":{"url":"https://api.github.com/repos/convox/rack/pulls/comments/70346044","id":70346044,"diff_hunk":"@@ -520,30 +537,53 @@ func (a *App) RunAttached(process, command, releaseId string, height, width int,\n \t\t\t\t\t}\n \t\t\t\t}\n \n-\t\t\t\tif *container.Name == process && releaseMatch {\n+\t\t\t\tif *releaseContainer.Name == process && releaseMatch {\n \t\t\t\t\tbreak ContainerCheck\n \t\t\t\t}\n-\t\t\t\tcontainer = nil\n+\t\t\t\treleaseContainer = nil\n \t\t\t}\n+\t\t\t////////////////////////////////////////////////////\n \n-\t\t\tif container != nil {\n+\t\t\tif releaseContainer != nil {\n+\t\t\t\tcontainer = releaseContainer\n \t\t\t\tbreak\n \t\t\t}\n \t\t}\n-\t}\n \n-\tif container == nil {\n-\t\treturn fmt.Errorf(\"unable to find contaier for %s\", process)\n+\t\t// If container is nil, the release most likely hasn't been promoted and thus no TaskDefinition for it.\n+\t\tif releaseContainer == nil {\n+\t\t\tfmt.Printf(\"Unable to find contaier for %s. Basing container off of most recent release: %s.\\n\", process, a.Release)\n+\t\t\tunpromotedRelease = true","path":"api/models/app.go","position":100,"original_position":100,"commit_id":"9dc1e752ff4dfbdbf880f616c0594ae1ceab86aa","original_commit_id":"9dc1e752ff4dfbdbf880f616c0594ae1ceab86aa","user":{"login":"nzoschke","id":147410,"avatar_url":"https://avatars.githubusercontent.com/u/147410?v=3","gravatar_id":"","url":"https://api.github.com/users/nzoschke","html_url":"https://github.com/nzoschke","followers_url":"https://api.github.com/users/nzoschke/followers","following_url":"https://api.github.com/users/nzoschke/following{/other_user}","gists_url":"https://api.github.com/users/nzoschke/gists{/gist_id}","starred_url":"https://api.github.com/users/nzoschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzoschke/subscriptions","organizations_url":"https://api.github.com/users/nzoschke/orgs","repos_url":"https://api.github.com/users/nzoschke/repos","events_url":"https://api.github.com/users/nzoschke/events{/privacy}","received_events_url":"https://api.github.com/users/nzoschke/received_events","type":"User","site_admin":false},"body":"is there a way to determine this before looping through all the task definitions?","created_at":"2016-07-11T22:05:13Z","updated_at":"2016-07-11T22:05:13Z","html_url":"https://github.com/convox/rack/pull/860#discussion_r70346044","pull_request_url":"https://api.github.com/repos/convox/rack/pulls/860","_links":{"self":{"href":"https://api.github.com/repos/convox/rack/pulls/comments/70346044"},"html":{"href":"https://github.com/convox/rack/pull/860#discussion_r70346044"},"pull_request":{"href":"https://api.github.com/repos/convox/rack/pulls/860"}}},"pull_request":{"url":"https://api.github.com/repos/convox/rack/pulls/860","id":77026857,"html_url":"https://github.com/convox/rack/pull/860","diff_url":"https://github.com/convox/rack/pull/860.diff","patch_url":"https://github.com/convox/rack/pull/860.patch","issue_url":"https://api.github.com/repos/convox/rack/issues/860","number":860,"state":"open","locked":false,"title":"[WIP] Logic to support `convox run` with releases that have yet to be promoted","user":{"login":"MiguelMoll","id":643960,"avatar_url":"https://avatars.githubusercontent.com/u/643960?v=3","gravatar_id":"","url":"https://api.github.com/users/MiguelMoll","html_url":"https://github.com/MiguelMoll","followers_url":"https://api.github.com/users/MiguelMoll/followers","following_url":"https://api.github.com/users/MiguelMoll/following{/other_user}","gists_url":"https://api.github.com/users/MiguelMoll/gists{/gist_id}","starred_url":"https://api.github.com/users/MiguelMoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiguelMoll/subscriptions","organizations_url":"https://api.github.com/users/MiguelMoll/orgs","repos_url":"https://api.github.com/users/MiguelMoll/repos","events_url":"https://api.github.com/users/MiguelMoll/events{/privacy}","received_events_url":"https://api.github.com/users/MiguelMoll/received_events","type":"User","site_admin":false},"body":"The idea here is to combine settings from the most recently *promoted*\r\nrelease and the most recently *created* release. With the most recently created release taking precedence.\r\n\r\nAssumptions:\r\n- An app would have to be promoted at least once.\r\n- Using the most recently promoted release as a basis to build upon with the most recently created (but not promoted) release.\r\n\r\nTODO:\r\n\r\n- [ ] Add support for running detached processes with a unpromoted release.\r\n\r\nFixes #838","created_at":"2016-07-11T21:31:11Z","updated_at":"2016-07-11T22:05:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd586556f6f897ff3441b357e58fd6d3940ae9ac","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/convox/rack/pulls/860/commits","review_comments_url":"https://api.github.com/repos/convox/rack/pulls/860/comments","review_comment_url":"https://api.github.com/repos/convox/rack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/convox/rack/issues/860/comments","statuses_url":"https://api.github.com/repos/convox/rack/statuses/9dc1e752ff4dfbdbf880f616c0594ae1ceab86aa","head":{"label":"convox:run-release","ref":"run-release","sha":"9dc1e752ff4dfbdbf880f616c0594ae1ceab86aa","user":{"login":"convox","id":10547780,"avatar_url":"https://avatars.githubusercontent.com/u/10547780?v=3","gravatar_id":"","url":"https://api.github.com/users/convox","html_url":"https://github.com/convox","followers_url":"https://api.github.com/users/convox/followers","following_url":"https://api.github.com/users/convox/following{/other_user}","gists_url":"https://api.github.com/users/convox/gists{/gist_id}","starred_url":"https://api.github.com/users/convox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convox/subscriptions","organizations_url":"https://api.github.com/users/convox/orgs","repos_url":"https://api.github.com/users/convox/repos","events_url":"https://api.github.com/users/convox/events{/privacy}","received_events_url":"https://api.github.com/users/convox/received_events","type":"Organization","site_admin":false},"repo":{"id":42454540,"name":"rack","full_name":"convox/rack","owner":{"login":"convox","id":10547780,"avatar_url":"https://avatars.githubusercontent.com/u/10547780?v=3","gravatar_id":"","url":"https://api.github.com/users/convox","html_url":"https://github.com/convox","followers_url":"https://api.github.com/users/convox/followers","following_url":"https://api.github.com/users/convox/following{/other_user}","gists_url":"https://api.github.com/users/convox/gists{/gist_id}","starred_url":"https://api.github.com/users/convox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convox/subscriptions","organizations_url":"https://api.github.com/users/convox/orgs","repos_url":"https://api.github.com/users/convox/repos","events_url":"https://api.github.com/users/convox/events{/privacy}","received_events_url":"https://api.github.com/users/convox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/convox/rack","description":"Open-source PaaS on AWS","fork":false,"url":"https://api.github.com/repos/convox/rack","forks_url":"https://api.github.com/repos/convox/rack/forks","keys_url":"https://api.github.com/repos/convox/rack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/convox/rack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/convox/rack/teams","hooks_url":"https://api.github.com/repos/convox/rack/hooks","issue_events_url":"https://api.github.com/repos/convox/rack/issues/events{/number}","events_url":"https://api.github.com/repos/convox/rack/events","assignees_url":"https://api.github.com/repos/convox/rack/assignees{/user}","branches_url":"https://api.github.com/repos/convox/rack/branches{/branch}","tags_url":"https://api.github.com/repos/convox/rack/tags","blobs_url":"https://api.github.com/repos/convox/rack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/convox/rack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/convox/rack/git/refs{/sha}","trees_url":"https://api.github.com/repos/convox/rack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/convox/rack/statuses/{sha}","languages_url":"https://api.github.com/repos/convox/rack/languages","stargazers_url":"https://api.github.com/repos/convox/rack/stargazers","contributors_url":"https://api.github.com/repos/convox/rack/contributors","subscribers_url":"https://api.github.com/repos/convox/rack/subscribers","subscription_url":"https://api.github.com/repos/convox/rack/subscription","commits_url":"https://api.github.com/repos/convox/rack/commits{/sha}","git_commits_url":"https://api.github.com/repos/convox/rack/git/commits{/sha}","comments_url":"https://api.github.com/repos/convox/rack/comments{/number}","issue_comment_url":"https://api.github.com/repos/convox/rack/issues/comments{/number}","contents_url":"https://api.github.com/repos/convox/rack/contents/{+path}","compare_url":"https://api.github.com/repos/convox/rack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/convox/rack/merges","archive_url":"https://api.github.com/repos/convox/rack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/convox/rack/downloads","issues_url":"https://api.github.com/repos/convox/rack/issues{/number}","pulls_url":"https://api.github.com/repos/convox/rack/pulls{/number}","milestones_url":"https://api.github.com/repos/convox/rack/milestones{/number}","notifications_url":"https://api.github.com/repos/convox/rack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/convox/rack/labels{/name}","releases_url":"https://api.github.com/repos/convox/rack/releases{/id}","deployments_url":"https://api.github.com/repos/convox/rack/deployments","created_at":"2015-09-14T14:41:30Z","updated_at":"2016-07-11T04:30:09Z","pushed_at":"2016-07-11T21:57:31Z","git_url":"git://github.com/convox/rack.git","ssh_url":"git@github.com:convox/rack.git","clone_url":"https://github.com/convox/rack.git","svn_url":"https://github.com/convox/rack","homepage":"https://convox.com","size":52917,"stargazers_count":1220,"watchers_count":1220,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":120,"forks":81,"open_issues":120,"watchers":1220,"default_branch":"master"}},"base":{"label":"convox:master","ref":"master","sha":"0397b437a9eb9c319b5a2c33de0c4433bddbef1e","user":{"login":"convox","id":10547780,"avatar_url":"https://avatars.githubusercontent.com/u/10547780?v=3","gravatar_id":"","url":"https://api.github.com/users/convox","html_url":"https://github.com/convox","followers_url":"https://api.github.com/users/convox/followers","following_url":"https://api.github.com/users/convox/following{/other_user}","gists_url":"https://api.github.com/users/convox/gists{/gist_id}","starred_url":"https://api.github.com/users/convox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convox/subscriptions","organizations_url":"https://api.github.com/users/convox/orgs","repos_url":"https://api.github.com/users/convox/repos","events_url":"https://api.github.com/users/convox/events{/privacy}","received_events_url":"https://api.github.com/users/convox/received_events","type":"Organization","site_admin":false},"repo":{"id":42454540,"name":"rack","full_name":"convox/rack","owner":{"login":"convox","id":10547780,"avatar_url":"https://avatars.githubusercontent.com/u/10547780?v=3","gravatar_id":"","url":"https://api.github.com/users/convox","html_url":"https://github.com/convox","followers_url":"https://api.github.com/users/convox/followers","following_url":"https://api.github.com/users/convox/following{/other_user}","gists_url":"https://api.github.com/users/convox/gists{/gist_id}","starred_url":"https://api.github.com/users/convox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convox/subscriptions","organizations_url":"https://api.github.com/users/convox/orgs","repos_url":"https://api.github.com/users/convox/repos","events_url":"https://api.github.com/users/convox/events{/privacy}","received_events_url":"https://api.github.com/users/convox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/convox/rack","description":"Open-source PaaS on AWS","fork":false,"url":"https://api.github.com/repos/convox/rack","forks_url":"https://api.github.com/repos/convox/rack/forks","keys_url":"https://api.github.com/repos/convox/rack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/convox/rack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/convox/rack/teams","hooks_url":"https://api.github.com/repos/convox/rack/hooks","issue_events_url":"https://api.github.com/repos/convox/rack/issues/events{/number}","events_url":"https://api.github.com/repos/convox/rack/events","assignees_url":"https://api.github.com/repos/convox/rack/assignees{/user}","branches_url":"https://api.github.com/repos/convox/rack/branches{/branch}","tags_url":"https://api.github.com/repos/convox/rack/tags","blobs_url":"https://api.github.com/repos/convox/rack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/convox/rack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/convox/rack/git/refs{/sha}","trees_url":"https://api.github.com/repos/convox/rack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/convox/rack/statuses/{sha}","languages_url":"https://api.github.com/repos/convox/rack/languages","stargazers_url":"https://api.github.com/repos/convox/rack/stargazers","contributors_url":"https://api.github.com/repos/convox/rack/contributors","subscribers_url":"https://api.github.com/repos/convox/rack/subscribers","subscription_url":"https://api.github.com/repos/convox/rack/subscription","commits_url":"https://api.github.com/repos/convox/rack/commits{/sha}","git_commits_url":"https://api.github.com/repos/convox/rack/git/commits{/sha}","comments_url":"https://api.github.com/repos/convox/rack/comments{/number}","issue_comment_url":"https://api.github.com/repos/convox/rack/issues/comments{/number}","contents_url":"https://api.github.com/repos/convox/rack/contents/{+path}","compare_url":"https://api.github.com/repos/convox/rack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/convox/rack/merges","archive_url":"https://api.github.com/repos/convox/rack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/convox/rack/downloads","issues_url":"https://api.github.com/repos/convox/rack/issues{/number}","pulls_url":"https://api.github.com/repos/convox/rack/pulls{/number}","milestones_url":"https://api.github.com/repos/convox/rack/milestones{/number}","notifications_url":"https://api.github.com/repos/convox/rack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/convox/rack/labels{/name}","releases_url":"https://api.github.com/repos/convox/rack/releases{/id}","deployments_url":"https://api.github.com/repos/convox/rack/deployments","created_at":"2015-09-14T14:41:30Z","updated_at":"2016-07-11T04:30:09Z","pushed_at":"2016-07-11T21:57:31Z","git_url":"git://github.com/convox/rack.git","ssh_url":"git@github.com:convox/rack.git","clone_url":"https://github.com/convox/rack.git","svn_url":"https://github.com/convox/rack","homepage":"https://convox.com","size":52917,"stargazers_count":1220,"watchers_count":1220,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":120,"forks":81,"open_issues":120,"watchers":1220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/convox/rack/pulls/860"},"html":{"href":"https://github.com/convox/rack/pull/860"},"issue":{"href":"https://api.github.com/repos/convox/rack/issues/860"},"comments":{"href":"https://api.github.com/repos/convox/rack/issues/860/comments"},"review_comments":{"href":"https://api.github.com/repos/convox/rack/pulls/860/comments"},"review_comment":{"href":"https://api.github.com/repos/convox/rack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/convox/rack/pulls/860/commits"},"statuses":{"href":"https://api.github.com/repos/convox/rack/statuses/9dc1e752ff4dfbdbf880f616c0594ae1ceab86aa"}}}}
{"actor":{"display_login":"nzoschke"}}