{"action":"created","issue":{"url":"https://api.github.com/repos/istio/istio/issues/3662","repository_url":"https://api.github.com/repos/istio/istio","labels_url":"https://api.github.com/repos/istio/istio/issues/3662/labels{/name}","comments_url":"https://api.github.com/repos/istio/istio/issues/3662/comments","events_url":"https://api.github.com/repos/istio/istio/issues/3662/events","html_url":"https://github.com/istio/istio/pull/3662","id":299112287,"number":3662,"title":"update parsing of release build status","user":{"login":"mattdelco","id":32583120,"avatar_url":"https://avatars1.githubusercontent.com/u/32583120?v=4","gravatar_id":"","url":"https://api.github.com/users/mattdelco","html_url":"https://github.com/mattdelco","followers_url":"https://api.github.com/users/mattdelco/followers","following_url":"https://api.github.com/users/mattdelco/following{/other_user}","gists_url":"https://api.github.com/users/mattdelco/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdelco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdelco/subscriptions","organizations_url":"https://api.github.com/users/mattdelco/orgs","repos_url":"https://api.github.com/users/mattdelco/repos","events_url":"https://api.github.com/users/mattdelco/events{/privacy}","received_events_url":"https://api.github.com/users/mattdelco/received_events","type":"User","site_admin":false},"labels":[{"id":659652351,"url":"https://api.github.com/repos/istio/istio/labels/approved","name":"approved","color":"bfdadc","default":false},{"id":491318011,"url":"https://api.github.com/repos/istio/istio/labels/cla:%20yes","name":"cla: yes","color":"bfdadc","default":false},{"id":660556986,"url":"https://api.github.com/repos/istio/istio/labels/lgtm","name":"lgtm","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":{"login":"rkpagadala","id":9270018,"avatar_url":"https://avatars2.githubusercontent.com/u/9270018?v=4","gravatar_id":"","url":"https://api.github.com/users/rkpagadala","html_url":"https://github.com/rkpagadala","followers_url":"https://api.github.com/users/rkpagadala/followers","following_url":"https://api.github.com/users/rkpagadala/following{/other_user}","gists_url":"https://api.github.com/users/rkpagadala/gists{/gist_id}","starred_url":"https://api.github.com/users/rkpagadala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkpagadala/subscriptions","organizations_url":"https://api.github.com/users/rkpagadala/orgs","repos_url":"https://api.github.com/users/rkpagadala/repos","events_url":"https://api.github.com/users/rkpagadala/events{/privacy}","received_events_url":"https://api.github.com/users/rkpagadala/received_events","type":"User","site_admin":false},"assignees":[{"login":"rkpagadala","id":9270018,"avatar_url":"https://avatars2.githubusercontent.com/u/9270018?v=4","gravatar_id":"","url":"https://api.github.com/users/rkpagadala","html_url":"https://github.com/rkpagadala","followers_url":"https://api.github.com/users/rkpagadala/followers","following_url":"https://api.github.com/users/rkpagadala/following{/other_user}","gists_url":"https://api.github.com/users/rkpagadala/gists{/gist_id}","starred_url":"https://api.github.com/users/rkpagadala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkpagadala/subscriptions","organizations_url":"https://api.github.com/users/rkpagadala/orgs","repos_url":"https://api.github.com/users/rkpagadala/repos","events_url":"https://api.github.com/users/rkpagadala/events{/privacy}","received_events_url":"https://api.github.com/users/rkpagadala/received_events","type":"User","site_admin":false},{"login":"hklai","id":31747472,"avatar_url":"https://avatars3.githubusercontent.com/u/31747472?v=4","gravatar_id":"","url":"https://api.github.com/users/hklai","html_url":"https://github.com/hklai","followers_url":"https://api.github.com/users/hklai/followers","following_url":"https://api.github.com/users/hklai/following{/other_user}","gists_url":"https://api.github.com/users/hklai/gists{/gist_id}","starred_url":"https://api.github.com/users/hklai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hklai/subscriptions","organizations_url":"https://api.github.com/users/hklai/orgs","repos_url":"https://api.github.com/users/hklai/repos","events_url":"https://api.github.com/users/hklai/events{/privacy}","received_events_url":"https://api.github.com/users/hklai/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2018-02-21T20:13:50Z","updated_at":"2018-02-25T07:42:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/istio/istio/pulls/3662","html_url":"https://github.com/istio/istio/pull/3662","diff_url":"https://github.com/istio/istio/pull/3662.diff","patch_url":"https://github.com/istio/istio/pull/3662.patch"},"body":"While looking through today's build log I noticed:\r\n\r\n<pre>+++ grep -c -Eo ' *\"status\":.*?[^\\\\]\",?' /tmp/build.response.Rav7\r\n++ local LINE_COUNT=4\r\n++ '[' 4 '!=' 1 ']'\r\n++ echo 'Missing or ambiguous lines for status: 4'\r\nMissing or ambiguous lines for status: 4\r\n</pre>\r\n...\r\n<pre>- unrecognized status:\r\nBUILD_FAILED=1\r\nreturn 2</pre>\r\n\r\nThe build wasn't recognized as failed, cause I think the \"Copying file://green_build_sha.txt\" step that now follows the build must replace the overall status (I also tried to fix this).\r\n\r\nAnyway, the issue with ambiguous status is because the builder is now reporting additional information for each step, e.g.:\r\n<pre>\"timing\": {\r\n  \"startTime\": \"2018-02-21T19:22:27.228407430Z\",\r\n  \"endTime\": \"2018-02-21T19:23:42.831693458Z\"\r\n},\r\n\"status\": \"SUCCESS\"\r\n</pre>\r\nSo there's now multiple instance of \"status\" attributes in the json.  This change has the bash just take the first status (which is for the overall build) and ignore any other status lines that follow.  An example start of the json result is:\r\n<pre>{\r\n  \"id\": \"29eeadab-efdb-4946-a510-8331c6d6ff6f\",\r\n  \"status\": \"SUCCESS\",\r\n  \"createTime\": \"2018-02-21T19:22:25.186365818Z\",\r\n  \"startTime\": \"2018-02-21T19:22:25.882807954Z\",\r\n  \"finishTime\": \"2018-02-21T19:23:43.753677Z\",\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/istio/istio/issues/comments/368290081","html_url":"https://github.com/istio/istio/pull/3662#issuecomment-368290081","issue_url":"https://api.github.com/repos/istio/istio/issues/3662","id":368290081,"user":{"login":"istio-merge-robot","id":30445278,"avatar_url":"https://avatars2.githubusercontent.com/u/30445278?v=4","gravatar_id":"","url":"https://api.github.com/users/istio-merge-robot","html_url":"https://github.com/istio-merge-robot","followers_url":"https://api.github.com/users/istio-merge-robot/followers","following_url":"https://api.github.com/users/istio-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/istio-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/istio-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/istio-merge-robot/orgs","repos_url":"https://api.github.com/users/istio-merge-robot/repos","events_url":"https://api.github.com/users/istio-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/istio-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T07:42:52Z","updated_at":"2018-02-25T07:42:52Z","author_association":"COLLABORATOR","body":"Automatic merge from submit-queue."}}
{"actor":{"display_login":"istio-merge-robot"}}