@@ -201,7 +201,9 @@ def update_latest(
201201 new = s .get (tool , old )
202202 status [os ] = new
203203 maintainers = ' ' .join ('@' + name for name in MAINTAINERS [tool ])
204- if new > old : # comparing the strings, but they are ordered appropriately!
204+ # comparing the strings, but they are ordered appropriately:
205+ # "test-pass" > "test-fail" > "build-fail"
206+ if new > old :
205207 # things got fixed or at least the status quo improved
206208 changed = True
207209 message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n ' \
@@ -213,10 +215,17 @@ def update_latest(
213215 .format (tool , os , old , new )
214216 message += '{} (cc {}, @rust-lang/infra).\n ' \
215217 .format (title , maintainers )
216- # Most tools only create issues for build failures.
217- # Other failures can be spurious.
218- if new == 'build-fail' or (tool == 'miri' and new == 'test-fail' ):
219- create_issue_for_status = new
218+ # See if we need to create an issue.
219+ if tool == 'miri' :
220+ # Create issue if tests used to pass before. Don't open a *second*
221+ # issue when we regress from "test-fail" to "build-fail".
222+ if old == 'test-pass' :
223+ create_issue_for_status = new
224+ else :
225+ # Create issue if things no longer build.
226+ # (No issue for mere test failures to avoid spurious issues.)
227+ if new == 'build-fail' :
228+ create_issue_for_status = new
220229
221230 if create_issue_for_status is not None :
222231 try :
0 commit comments