about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2018-12-19 16:37:16 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2018-12-19 16:37:16 +0100
commitab5fc7fb5b2028323ac30a0f67bf13202071936c (patch)
tree8864cea3c4c22598a66811e75bf5b469c73238c9
parentc485acb27c248d36c847ef4602770dcaa76b286d (diff)
downloadrust-ab5fc7fb5b2028323ac30a0f67bf13202071936c.tar.gz
rust-ab5fc7fb5b2028323ac30a0f67bf13202071936c.zip
Only emit issues for build failures to supress spurious failures
-rwxr-xr-xsrc/tools/publish_toolstate.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/publish_toolstate.py b/src/tools/publish_toolstate.py
index 5cacdb7ef0b..095ef0df496 100755
--- a/src/tools/publish_toolstate.py
+++ b/src/tools/publish_toolstate.py
@@ -115,17 +115,21 @@ def update_latest(
                 new = s.get(tool, old)
                 status[os] = new
                 if new > old:
+                    # things got fixed or at least the status quo improved
                     changed = True
                     message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
                         .format(tool, os, old, new, MAINTAINERS.get(tool))
                 elif new < old:
+                    # tests or builds are failing and were not failing before
                     changed = True
                     title = '💔 {} on {}: {} → {}' \
                         .format(tool, os, old, new)
                     message += '{} (cc {}, @rust-lang/infra).\n' \
                         .format(title, MAINTAINERS.get(tool))
-                    failures += title
-                    failures += '\n'
+                    # only create issues for build failures. Other failures can be spurious
+                    if new == 'build-fail':
+                        failures += title
+                        failures += '\n'
 
             if failures != '':
                 issue(tool, MAINTAINERS.get(tool), relevant_pr_number, relevant_pr_user, failures)
@@ -151,6 +155,7 @@ if __name__ == '__main__':
     save_message_to_path = sys.argv[3]
     github_token = sys.argv[4]
 
+    # assume that PR authors are also owners of the repo where the branch lives
     relevant_pr_match = re.search('Auto merge of #([0-9]+) - ([^:]+)', cur_commit_msg)
     if relevant_pr_match:
         number = relevant_pr_match.group(1)