dashboard/app: pass namespace in bug reports

Namespace can be used for some customization
in external reporter.
This commit is contained in:
Dmitry Vyukov 2017-11-06 14:57:23 +01:00
parent d5a1adcc06
commit a2961665fd
3 changed files with 4 additions and 0 deletions

View File

@ -214,6 +214,7 @@ func createBugReport(c context.Context, bug *Bug, crash *Crash, bugReporting *Bu
}
rep := &dashapi.BugReport{
Namespace: bug.Namespace,
Config: reportingConfig,
ID: bugReporting.ID,
ExtID: bugReporting.ExtID,

View File

@ -46,6 +46,7 @@ func TestReportBug(t *testing.T) {
t.Fatalf("empty report ID")
}
want := &dashapi.BugReport{
Namespace: "test1",
Config: []byte(`{"Index":1}`),
ID: rep.ID,
First: true,
@ -183,6 +184,7 @@ func TestInvalidBug(t *testing.T) {
t.Fatalf("empty report ID")
}
want := &dashapi.BugReport{
Namespace: "test1",
Config: []byte(`{"Index":1}`),
ID: rep.ID,
First: true,

View File

@ -137,6 +137,7 @@ func (dash *Dashboard) LogError(name, msg string, args ...interface{}) {
// BugReport describes a single bug.
// Used by dashboard external reporting.
type BugReport struct {
Namespace string
Config []byte
ID string
ExtID string // arbitrary reporting ID forwarded from BugUpdate.ExtID