Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: golden/go/diff/diff.go

Issue 1401563003: Enable clear/purge for failed digests (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: golden/go/diff/diff.go
diff --git a/golden/go/diff/diff.go b/golden/go/diff/diff.go
index c0011a2e728dc5a9f71b505c89101af11753dbfa..95c2eff9f13dadfe13fcc778ab33424af70180f6 100644
--- a/golden/go/diff/diff.go
+++ b/golden/go/diff/diff.go
@@ -88,6 +88,13 @@ type DigestFailure struct {
Error string `json:"error"`
}
+// Implement sort.Interface for a slice of DigestFailure
+type DigestFailureSlice []*DigestFailure
+
+func (d DigestFailureSlice) Len() int { return len(d) }
+func (d DigestFailureSlice) Less(i, j int) bool { return d[i].TS < d[j].TS }
+func (d DigestFailureSlice) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
+
type DiffStore interface {
// Get returns the DiffMetrics of the provided dMain digest vs all digests
// specified in dRest.
@@ -106,7 +113,7 @@ type DiffStore interface {
// (image, diffmetric) from local caches. If purgeGS is true it will also
// purge the digests image from Google storage, forcing that the digest
// be re-uploaded by the build bots.
- PurgeDigests(digests []string, purgeGS bool)
+ PurgeDigests(digests []string, purgeGS bool) error
// SetDigestSets sets the sets of digests we want to compare grouped by
// names (usually test names). This sets the digests we are currently

Powered by Google App Engine
This is Rietveld 408576698