{"action":"closed","number":4044,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/4044","id":41887926,"html_url":"https://github.com/openshift/origin/pull/4044","diff_url":"https://github.com/openshift/origin/pull/4044.diff","patch_url":"https://github.com/openshift/origin/pull/4044.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/4044","number":4044,"state":"closed","locked":false,"title":"Fail fast, teach how to list builds","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"body":"Reworks solution to #3359.\r\n\r\nPrevious PR #3890 introduced an undesired side effect: `oc build-logs`, an invalid invocation of the command, takes longer to show output (error message) with possibly no extra benefit to the user (no improvements in the error message, no list of recent builds).\r\n\r\nInstead of relying on arbitrary magic numbers (timeout = 800ms, recent_builds = 10) and network to output an error message, I'm proposing here to improve the error message teaching how to list builds, removing timeout and list of builds (an inflexible list, worse than using `oc get builds`).\r\n\r\nBasing the solution on recent discussions and symmetry with existing messages for:\r\n- [oc edit](https://github.com/openshift/origin/blob/3f59655b8036898da2eed04322a80f4b5b07526b/pkg/cmd/cli/cmd/edit.go#L238)\r\n- [oc new-app](https://github.com/openshift/origin/blob/3f59655b8036898da2eed04322a80f4b5b07526b/pkg/cmd/cli/cmd/newapp.go#L188)\r\n- [oc new-build](https://github.com/openshift/origin/blob/3f59655b8036898da2eed04322a80f4b5b07526b/pkg/cmd/cli/cmd/newbuild.go#L108)\r\n\r\n@smarterclayton @bparees @mfojtik PTAL","created_at":"2015-08-07T12:45:09Z","updated_at":"2015-08-07T20:53:20Z","closed_at":"2015-08-07T20:53:20Z","merged_at":"2015-08-07T20:53:20Z","merge_commit_sha":"23bcf7f485af59253a90d73c3907d8390a55d221","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/4044/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/4044/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/4044/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/7f12a1efa671bcbb3c9a470ddf41384b7d2bdcca","head":{"label":"rhcarvalho:issue-3359","ref":"issue-3359","sha":"7f12a1efa671bcbb3c9a470ddf41384b7d2bdcca","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"repo":{"id":30794668,"name":"origin","full_name":"rhcarvalho/origin","owner":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhcarvalho/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/rhcarvalho/origin","forks_url":"https://api.github.com/repos/rhcarvalho/origin/forks","keys_url":"https://api.github.com/repos/rhcarvalho/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhcarvalho/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhcarvalho/origin/teams","hooks_url":"https://api.github.com/repos/rhcarvalho/origin/hooks","issue_events_url":"https://api.github.com/repos/rhcarvalho/origin/issues/events{/number}","events_url":"https://api.github.com/repos/rhcarvalho/origin/events","assignees_url":"https://api.github.com/repos/rhcarvalho/origin/assignees{/user}","branches_url":"https://api.github.com/repos/rhcarvalho/origin/branches{/branch}","tags_url":"https://api.github.com/repos/rhcarvalho/origin/tags","blobs_url":"https://api.github.com/repos/rhcarvalho/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhcarvalho/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhcarvalho/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhcarvalho/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhcarvalho/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/rhcarvalho/origin/languages","stargazers_url":"https://api.github.com/repos/rhcarvalho/origin/stargazers","contributors_url":"https://api.github.com/repos/rhcarvalho/origin/contributors","subscribers_url":"https://api.github.com/repos/rhcarvalho/origin/subscribers","subscription_url":"https://api.github.com/repos/rhcarvalho/origin/subscription","commits_url":"https://api.github.com/repos/rhcarvalho/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhcarvalho/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhcarvalho/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhcarvalho/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhcarvalho/origin/contents/{+path}","compare_url":"https://api.github.com/repos/rhcarvalho/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhcarvalho/origin/merges","archive_url":"https://api.github.com/repos/rhcarvalho/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhcarvalho/origin/downloads","issues_url":"https://api.github.com/repos/rhcarvalho/origin/issues{/number}","pulls_url":"https://api.github.com/repos/rhcarvalho/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/rhcarvalho/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/rhcarvalho/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhcarvalho/origin/labels{/name}","releases_url":"https://api.github.com/repos/rhcarvalho/origin/releases{/id}","created_at":"2015-02-14T11:22:53Z","updated_at":"2015-04-29T10:04:56Z","pushed_at":"2015-08-07T19:38:39Z","git_url":"git://github.com/rhcarvalho/origin.git","ssh_url":"git@github.com:rhcarvalho/origin.git","clone_url":"https://github.com/rhcarvalho/origin.git","svn_url":"https://github.com/rhcarvalho/origin","homepage":"https://openshift.github.io","size":122756,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"openshift:master","ref":"master","sha":"ae9a539ab057bc2e53805e976d4077b81d48e96f","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-08-06T12:45:16Z","pushed_at":"2015-08-07T20:53:20Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":198442,"stargazers_count":603,"watchers_count":603,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":343,"mirror_url":null,"open_issues_count":491,"forks":343,"open_issues":491,"watchers":603,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/4044"},"html":{"href":"https://github.com/openshift/origin/pull/4044"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/4044"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/4044/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/4044/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/4044/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/7f12a1efa671bcbb3c9a470ddf41384b7d2bdcca"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"openshift-bot","id":1779249,"avatar_url":"https://avatars.githubusercontent.com/u/1779249?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift-bot","html_url":"https://github.com/openshift-bot","followers_url":"https://api.github.com/users/openshift-bot/followers","following_url":"https://api.github.com/users/openshift-bot/following{/other_user}","gists_url":"https://api.github.com/users/openshift-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift-bot/subscriptions","organizations_url":"https://api.github.com/users/openshift-bot/orgs","repos_url":"https://api.github.com/users/openshift-bot/repos","events_url":"https://api.github.com/users/openshift-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openshift-bot/received_events","type":"User","site_admin":false},"comments":6,"review_comments":5,"commits":1,"additions":7,"deletions":56,"changed_files":1}}