dart-lang / dart_ci

Tools used by Dart's continuous integration (CI) testing that aren't needed by Dart SDK contributors. Mirrored from dart.googlesource.com/dart_ci. Do not land pull requests on Github.
BSD 3-Clause "New" or "Revised" License
18 stars 5 forks source link

crash when fetching results in dart-ci #129

Closed sigmundch closed 1 year ago

sigmundch commented 2 years ago

Currently I can observe a crash in: https://dart-ci.firebaseapp.com/cl/239580/2 while trying to fetch results.

The error in the console says:

RangeError (index): Index out of range: index should be less than 1: 1
    at Object.a (https://dart-ci.firebaseapp.com/main.dart.js:456:3)
    at Object.r (https://dart-ci.firebaseapp.com/main.dart.js:440:9)
    at au.wY (https://dart-ci.firebaseapp.com/main.dart.js:23659:30)
    at https://dart-ci.firebaseapp.com/main.dart.js:23733:8
    at BJ.a (https://dart-ci.firebaseapp.com/main.dart.js:1841:72)
    at BJ.$2 (https://dart-ci.firebaseapp.com/main.dart.js:8786:23)
    at Bl.$1 (https://dart-ci.firebaseapp.com/main.dart.js:8778:30)
    at xw.$1 (https://dart-ci.firebaseapp.com/main.dart.js:14284:7)
    at oZ.BD [as $2$5] (https://dart-ci.firebaseapp.com/main.dart.js:2072:19)
    at f9.mY (https://dart-ci.firebaseapp.com/main.dart.js:14220:12)

Using the pkg/dart2js-tools/bin/deobfuscate.dart script, the error appears to point at TryResultsComponent.patchsetHasTruncatedResults in package:dart_results_feed/src/components/try_results_component.dart:79:38

whesse commented 2 years ago

OK, this is almost working as intended, but not especially helpful. The only results uploaded are for patchset 1, so when they were uploaded, all the existing patchsets were recorded in the database.

Patchset 2 was just created by the CQ when landing the change, but no tryjobs were run.

This crash will be hit whenever results are requested from a patchset that is after the last patchset that had try runs. We could detect this, and report results from the last patchset with try runs instead (and a message saying what is happening), or at least report "no results for this patchset, try an earlier one". Or send a redirect to an earlier patchset.