Skip to content

Commit

Permalink
Rollup merge of rust-lang#64502 - RalfJung:miri-toolstate, r=pietroal…
Browse files Browse the repository at this point in the history
…bini

avoid duplicate issues for Miri build failures

Currently, when Miri regressed from test-pass to test-fail, we pen an issue -- and then when it regresses further from test-fail to build-fail, we open a *second* issue.

This changes the logic to avoid the redundant second issue for Miri.

r? @pietroalbini @kennytm
  • Loading branch information
tmandry committed Sep 17, 2019
2 parents d6f2205 + 388cd5d commit 3a1390c
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/tools/publish_toolstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def update_latest(
new = s.get(tool, old)
status[os] = new
maintainers = ' '.join('@'+name for name in MAINTAINERS[tool])
if new > old: # comparing the strings, but they are ordered appropriately!
# comparing the strings, but they are ordered appropriately:
# "test-pass" > "test-fail" > "build-fail"
if new > old:
# things got fixed or at least the status quo improved
changed = True
message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
Expand All @@ -213,10 +215,17 @@ def update_latest(
.format(tool, os, old, new)
message += '{} (cc {}, @rust-lang/infra).\n' \
.format(title, maintainers)
# Most tools only create issues for build failures.
# Other failures can be spurious.
if new == 'build-fail' or (tool == 'miri' and new == 'test-fail'):
create_issue_for_status = new
# See if we need to create an issue.
if tool == 'miri':
# Create issue if tests used to pass before. Don't open a *second*
# issue when we regress from "test-fail" to "build-fail".
if old == 'test-pass':
create_issue_for_status = new
else:
# Create issue if things no longer build.
# (No issue for mere test failures to avoid spurious issues.)
if new == 'build-fail':
create_issue_for_status = new

if create_issue_for_status is not None:
try:
Expand Down

0 comments on commit 3a1390c

Please sign in to comment.