Commit Graph

15 Commits

Author SHA1 Message Date
William Hesse 01bb5bcfe0 [infra] Fix logical error in reactivating flakiness records
Fixes: https://github.com/dart-lang/sdk/issues/44352
Change-Id: I025369f2cc2748f1bb09445208aec2841aecf35f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174461
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-12-01 01:25:14 +00:00
William Hesse ed2fc40689 [infra] Mark flaky records as inactive on stable tests
Previously, we removed flaky records when they became
stable for 100 builds.

Recognize the new "inactive" field in flakiness records.

Bug: https://github.com/dart-lang/dart_ci/issues/90
Change-Id: I59c0918c7d8e091795d7ab51d2edc0be0f63a1a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172500
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-20 13:00:05 +00:00
Alexander Thomas 44f3881be6 [infra] Update checked-in SDKs to 2.12.0-0.0.dev
This is the first checked-in SDK with null-safety enabled by default.

Change-Id: I8f6fcdfd8856483f4737eb200ed4623a244cb0cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170085
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-11-05 07:53:22 +00:00
William Hesse 677feef159 [infra] Do not mark tests as no longer flaky on try builds
Adds a --noforgive flag to update_flakiness.dart, which will
be used on try builds.  Fixes lint warnings.

Change-Id: I88d6327b8292cb107f3ad512ee345e9ee27ccbbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159902
Reviewed-by: Karl Klose <karlklose@google.com>
2020-08-24 18:26:01 +00:00
Robert Nystrom 0689ec527a Move "test.dart" (well, most of its contents) into pkg/test_runner.
I don't like having a large volume of Dart code sitting under tools/
where it is hard to analyze, lint, test, and reuse. Also, eventually
we want to merge test.dart and test.py. This seems like an easy mostly
mechanical first step.

All I did was:

1. Move the contents of tools/test.dart to
   pkg/test_runner/lib/test_runner.dart. (That's not a great file name
   since we already have pkg/test_runner/bin/test_runner.dart, but it
   was the best I could come up with.

2. Copy tools/bots/results to pkg/test_runner/bot_results.dart. I
   don't like duplicating this, but there are other scripts under tools
   that import the old location. Eventually, we should have those
   scripts import it from package:test_runner/bot_results.dart, but I
   didn't want to do that here since I'm not familiar with those other
   scripts.

3. Make tools/test.dart import and forward to
   pkg/test_runner/lib/test_runner.dart.

4. Fix any linter and type errors. The test_runner package has a bunch
   of strictness checks and lints enable to keep it cleaner.

5. Run dartfmt --fix to format and get rid of "new", etc.

Change-Id: Ifc89817508d3fc147fa78dbc6744d547aeaf4c55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155240
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-07-22 23:00:49 +00:00
Jonas Termansen f46186ac49 [infra] Fix update_flakiness using wrong key when computing matches.
It was using the wrong 'expectation' field instead of the correct 'expected'
field. This change uses the right field. However as the matches field has
now been initialized, this change forcefully recomputes it instead of
politely using putIfAbsent. The matches result for the current result will
still take precedence.

Change-Id: I0775c1ff43b8f6691e457b5155ac9335338b209d
Reviewed-on: https://dart-review.googlesource.com/c/95182
Reviewed-by: William Hesse <whesse@google.com>
2019-03-04 13:38:29 +00:00
Jonas Termansen 03e46ee969 [infra] Add expectation and matches information to flaky.json.
The expected field can be used to be displayed in the flakiness dashboard.

The matches fields can be used in the flakiness dashboards to decide whether
to include links to logs for a given outcome.

Change-Id: I19454e7cc8fb49871dbb0e7a11478d8888b56662
Reviewed-on: https://dart-review.googlesource.com/c/95024
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-03-04 13:04:46 +00:00
William Hesse 9d25cc93e8 Add build_id for flaky builds to log of flaky tests.
Change-Id: Idb9409cceb46343d3c07270c61a595a9a3cdedaf
Reviewed-on: https://dart-review.googlesource.com/c/89530
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-01-21 11:56:00 +00:00
William Hesse 59300164af Remove test flakiness records with misspelled field
Change-Id: I80f29ebc9aaed33df27fa0ac75d5a38cfd90d1d5
Reviewed-on: https://dart-review.googlesource.com/c/88727
Auto-Submit: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-01-15 11:31:57 +00:00
William Hesse e2471dd363 Fix spelling of "occurrences" in flaky test results output.
Change-Id: I9028298127d69893d1402080150a5bf24f3867f2
Reviewed-on: https://dart-review.googlesource.com/c/88460
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-01-04 14:44:00 +00:00
Jonas Termansen e1e3b78e3a [infra] Fix update_flakiness missing current_counter null check.
Change-Id: I6ee8b1266f242ec2251dd869b3c775f9509d5fb2
Reviewed-on: https://dart-review.googlesource.com/c/86180
Reviewed-by: William Hesse <whesse@google.com>
2018-12-05 12:14:47 +00:00
Jonas Termansen 90c7cf254e [infra] Implement update_flakiness forgiveness and statistics.
This change makes update_flakiness count how many times each outcome has
happened. If the same outcome happens more than a 100 times in a row, the
test is forgiven. If that was a mistake, and it happens again, the flakiness
frequency is less than 3.65% with 95% certainty, and the probability of
deflaking not catching it is astronomical.

The number of occurences of each kind of outcome mode is tracked. This lets
us track how probable each flakiness mode is. It also lets us answer
important questions such as how many flakes only happen a single time (not
fault of test) versus multiple times (something to do with the test).

Bug: https://github.com/dart-lang/sdk/issues/35318
Change-Id: Ieccd4afb96ada8053f59fbdc005fd853f0d1f996
Reviewed-on: https://dart-review.googlesource.com/c/85952
Reviewed-by: William Hesse <whesse@google.com>
2018-12-05 11:42:23 +00:00
Jonas Termansen 51f815f7f3 [infra] Support configurations in compare_results and update_flakiness.
Change-Id: I640486957a40ebd178a0d7d06a7a81af758536c8
Reviewed-on: https://dart-review.googlesource.com/c/82980
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-11-06 19:57:08 +00:00
William Hesse bb78aa6356 Remove unneeded type on object read from JSON in a testing script
Change-Id: I9948230132854e5ebe7ae176a49cb085586924d6
Reviewed-on: https://dart-review.googlesource.com/77064
Reviewed-by: William Hesse <whesse@google.com>
2018-09-28 11:55:33 +00:00
Jonas Termansen 69cd7cb43f [infra] Add compare_results.dart and update_flakiness.dart.
tools/bots/compare_results.dart compares the previous and current test
results in the results.json format and lists the differences, taking the
flakiness data into account.

tools/bots/update_flakiness.dart reads new result.json files and updates the
flakiness data in the flaky.json format file. The updated flakiness data
contains the list of tests that were already known to be flaky, plus any
new tests with multiple different outcomes in the provided results.json
files.

For instance, after running the tests, to find the list of tests that
changed result and needs to be deflaked, excluding tests that are already
known to be flaky:

  compare_results.dart \
    --flakiness-data flaky.json
    --changed \
    --passing \
    --failing \
    previous.json results.json

After the tests needing deflakinghas been run again, the flakiness data can
be updated:

  update_flakiness.dart -i flaky.json -o flaky.json results.json more.json

Finally a human readable report can explain what happened, exiting 1 if any
tests started failing in a non-flaky manner:

  compare_results.dart \
    --flakiness-data flaky.json \
    --judgement \
    --human \
    --verbose \
    --changed \
    --failing \
    --flaky \
    previous.json results.json

Bug: https://github.com/dart-lang/sdk/issues/34517
Bug: https://github.com/dart-lang/sdk/issues/34518
Change-Id: I156a8a49b8df09c0aebcb77376b69d365d0aa2ac
Reviewed-on: https://dart-review.googlesource.com/75540
Reviewed-by: William Hesse <whesse@google.com>
2018-09-20 12:22:11 +00:00