Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit 5e9be45

Browse files
committed
File issues for totally broken suites
1 parent 098a2c3 commit 5e9be45

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

mungegithub/mungers/e2e/e2e.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ func (e *RealE2ETester) getGCSResult(j cache.Job, n cache.Number) (*cache.Result
144144
}
145145
if len(thisFailures) == 0 {
146146
r.Status = cache.ResultFailed
147+
// We add a "flake" just to make sure this appears in the flake
148+
// cache as something that needs to be synced.
149+
r.Flakes = map[cache.Test]string{
150+
cache.RunBrokenTestName: "Unable to get data-- please look at the logs",
151+
}
147152
return r, nil
148153
}
149154

mungegithub/mungers/flake-manager.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,23 @@ func (p *FlakeManager) isIndividualFlake(f cache.Flake) bool {
124124
return false
125125
}
126126

127+
if len(f.Result.Flakes) > 0 {
128+
// If this flake really represents an entire suite failure,
129+
// this key will be present.
130+
if _, ok := f.Result.Flakes[cache.RunBrokenTestName]; ok {
131+
return false
132+
}
133+
}
134+
127135
return true
128136
}
129137

130138
func (p *FlakeManager) listPreviousIssues(title string) []string {
131-
if previousIssues := p.finder.AllIssuesForKey(title); len(previousIssues) > 0 {
132-
s := []string{}
133-
for _, i := range previousIssues {
134-
s = append(s, fmt.Sprintf("#%v", i))
135-
}
136-
return s
139+
s := []string{}
140+
for _, i := range p.finder.AllIssuesForKey(title) {
141+
s = append(s, fmt.Sprintf("#%v", i))
137142
}
138-
return nil
143+
return s
139144
}
140145

141146
// makeGubernatorLink returns a URL to view the build results in a GCS path.

mungegithub/mungers/flakesync/cache.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const (
4444
// ResultFailed means it failed without generating readable JUnit
4545
// files, and introspection is not possible.
4646
ResultFailed ResultStatus = "failed"
47+
48+
// RunBrokenTestName names a "flake" which really represents the fact
49+
// that the entire run was broken.
50+
RunBrokenTestName Test = "Suite so broken it failed to produce JUnit output"
4751
)
4852

4953
// Result records a test job completion.

0 commit comments

Comments
 (0)