about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-09-17 14:10:51 -0700
committerGitHub <noreply@github.com>2019-09-17 14:10:51 -0700
commit3a1390cdca2678ad7d80ae4f5122bb70029a9815 (patch)
tree6f06425e2b426dfc0691abb1c81a3441468af2ff
parentd6f2205ed8460da20f21e959e019d2bc6817cb5a (diff)
parent388cd5d88eb6cbb9a2440d0a05fa0ea7d0b24dd3 (diff)
downloadrust-3a1390cdca2678ad7d80ae4f5122bb70029a9815.tar.gz
rust-3a1390cdca2678ad7d80ae4f5122bb70029a9815.zip
Rollup merge of #64502 - RalfJung:miri-toolstate, r=pietroalbini
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
-rwxr-xr-xsrc/tools/publish_toolstate.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/tools/publish_toolstate.py b/src/tools/publish_toolstate.py
index 4060b90d952..7cf3cc7663b 100755
--- a/src/tools/publish_toolstate.py
+++ b/src/tools/publish_toolstate.py
@@ -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' \
@@ -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: