From 75342d238b55e33b4f568b1f2b60095b3d36e98d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 27 Jul 2017 17:02:47 +0200 Subject: dashboard/dashapi: add support for bug fixing commits --- dashboard/dashapi/dashapi.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'dashboard/dashapi/dashapi.go') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 8f5856fd9..7d006d747 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -42,12 +42,36 @@ type Build struct { KernelBranch string KernelCommit string KernelConfig []byte + Commits []string // see BuilderPoll } func (dash *Dashboard) UploadBuild(build *Build) error { return dash.query("upload_build", build, nil) } +// BuilderPoll request is done by kernel builder before uploading a new build +// with UploadBuild request. Response contains list of commits that dashboard +// is interested in (i.e. commits that fix open bugs). When uploading a new +// build builder should pass subset of the commits that are present in the build +// in Build.Commits field. + +type BuilderPollReq struct { + Manager string +} + +type BuilderPollResp struct { + PendingCommits []string +} + +func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error) { + req := &BuilderPollReq{ + Manager: manager, + } + resp := new(BuilderPollResp) + err := dash.query("builder_poll", req, resp) + return resp, err +} + // Crash describes a single kernel crash (potentially with repro). type Crash struct { BuildID string // refers to Build.ID @@ -114,6 +138,7 @@ type BugUpdate struct { Status BugStatus ReproLevel ReproLevel DupOf string + FixCommits []string // Titles of commits that fix this bug. } type BugUpdateReply struct { -- cgit mrf-deployment