diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-05-19 19:28:17 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-05-25 11:11:21 +0200 |
| commit | 54259e6cafd8a674279301227c23cd032e8dd080 (patch) | |
| tree | 4ab169018d78e2b68939dbd9595cf3ea1f193c91 /dashboard | |
| parent | ffc7db8b1950cae49c03f6f216189f9f8f2c4bb2 (diff) | |
dashapi: display error text for BisectInfraError
Diffstat (limited to 'dashboard')
| -rw-r--r-- | dashboard/dashapi/dashapi.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 9f90467ef..161794e9f 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -227,6 +227,29 @@ const ( BisectResultInfraError // the bisect failed due to an infrastructure problem ) +func (flags JobDoneFlags) String() string { + if flags&BisectResultInfraError != 0 { + return "[infra failure]" + } + res := "" + if flags&BisectResultMerge != 0 { + res += "merge " + } + if flags&BisectResultNoop != 0 { + res += "no-op " + } + if flags&BisectResultRelease != 0 { + res += "release " + } + if flags&BisectResultIgnore != 0 { + res += "ignored " + } + if res == "" { + return res + } + return "[" + res + "commit]" +} + func (dash *Dashboard) JobPoll(req *JobPollReq) (*JobPollResp, error) { resp := new(JobPollResp) err := dash.Query("job_poll", req, resp) |
