func (e *RealE2ETester) getGCSResult(j cache.Job, n cache.Number) (*cache.Result, error) { stable, err := e.GoogleGCSBucketUtils.CheckFinishedStatus(string(j), int(n)) if err != nil { glog.V(4).Infof("Error looking up job: %v, build number: %v", j, n) // Not actually fatal! } r := &cache.Result{ Job: j, Number: n, Pass: stable, // TODO: StartTime: } if r.Pass { return r, nil } // This isn't stable-- see if we can find a reason. thisFailures, err := e.failureReasons(string(j), int(n), true) if err != nil { glog.V(4).Infof("Error looking up job failure reasons: %v, build number: %v: %v", j, n, err) r.UnlistedFlakes = true return r, nil } if len(thisFailures) == 0 { r.UnlistedFlakes = true } else { r.Flakes = map[cache.Test]string{} for testName, reason := range thisFailures { r.Flakes[cache.Test(testName)] = reason } } return r, nil }
func (e *RealE2ETester) getGCSPostsubmitResult(j cache.Job, n cache.Number) (*cache.Result, error) { stable, err := e.GoogleGCSBucketUtils.CheckFinishedStatus(string(j), int(n)) if err != nil { glog.V(4).Infof("Error looking up job: %v, build number: %v", j, n) // Not actually fatal! } r := &cache.Result{ Job: j, Number: n, // TODO: StartTime: } if stable { r.Status = cache.ResultStable return r, nil } // This isn't stable-- see if we can find a reason. thisFailures, err := e.failureReasons(string(j), int(n), true) if err != nil { glog.V(4).Infof("Error looking up job failure reasons: %v, build number: %v: %v", j, n, err) thisFailures = nil // ensure we fall through } if len(thisFailures) == 0 { r.Status = cache.ResultFailed // We add a "flake" just to make sure this appears in the flake // cache as something that needs to be synced. r.Flakes = map[cache.Test]string{ cache.RunBrokenTestName: "Unable to get data-- please look at the logs", } return r, nil } r.Flakes = map[cache.Test]string{} for testName, reason := range thisFailures { r.Flakes[cache.Test(testName)] = reason } r.Status = cache.ResultFlaky return r, nil }
func (e *RealE2ETester) getGCSPresubmitResult(j cache.Job, n cache.Number) (*cache.Result, error) { stable, err := e.GoogleGCSBucketUtils.CheckFinishedStatus(string(j), int(n)) if err != nil { return nil, fmt.Errorf("error looking up job: %v, build number: %v", j, n) } r := &cache.Result{ Status: cache.ResultStable, Job: j, Number: n, } if !stable { r.Status = cache.ResultFailed // We do *not* add a "run completely broken" flake entry since // this is presumably the author's fault, and we don't want to // file issues for things like that. return r, nil } // Check to see if there were any individual failures (even though the // run as a whole succeeded). thisFailures, err := e.failureReasons(string(j), int(n), true) if err != nil { glog.V(2).Infof("Error looking up job failure reasons: %v, build number: %v: %v", j, n, err) return r, nil } if len(thisFailures) == 0 { glog.V(2).Infof("No flakes in %v/%v.", j, n) return r, nil } r.Flakes = map[cache.Test]string{} for testName, reason := range thisFailures { r.Flakes[cache.Test(testName)] = reason } r.Status = cache.ResultFlaky return r, nil }
func (e *RealE2ETester) getGCSPostsubmitResult(j cache.Job, n cache.Number) (*cache.Result, error) { stable, err := e.GoogleGCSBucketUtils.CheckFinishedStatus(string(j), int(n)) if err != nil { glog.V(4).Infof("Error looking up job: %v, build number: %v", j, n) // Not actually fatal! } r := &cache.Result{ Job: j, Number: n, // TODO: StartTime: } if stable { r.Status = cache.ResultStable return r, nil } // This isn't stable-- see if we can find a reason. thisFailures, err := e.failureReasons(string(j), int(n), true) if err != nil { glog.V(4).Infof("Error looking up job failure reasons: %v, build number: %v: %v", j, n, err) thisFailures = nil // ensure we fall through } if len(thisFailures) == 0 { r.Status = cache.ResultFailed // Don't return any flake information, to reduce flake noise -- getting an issue opened // for every failed run without logs is not useful. return r, nil } r.Flakes = map[cache.Test]string{} for testName, reason := range thisFailures { r.Flakes[cache.Test(testName)] = reason } r.Status = cache.ResultFlaky return r, nil }