@@ -64,6 +64,7 @@ def maybe_delink(message):
64
64
65
65
def issue(
66
66
tool,
67
+ status,
67
68
maintainers,
68
69
relevant_pr_number,
69
70
relevant_pr_user,
@@ -72,20 +73,27 @@ def issue(
72
73
# Open an issue about the toolstate failure.
73
74
assignees = [x.strip() for x in maintainers.split('@') if x != '']
74
75
assignees.append(relevant_pr_user)
76
+ if status == 'test-fail':
77
+ status_description = 'has failing tests'
78
+ else:
79
+ status_description = 'no longer builds'
75
80
response = urllib2.urlopen(urllib2.Request(
76
81
gh_url(),
77
82
json.dumps({
78
83
'body': maybe_delink(textwrap.dedent('''\
79
84
Hello, this is your friendly neighborhood mergebot.
80
- After merging PR {}, I observed that the tool {} no longer builds .
85
+ After merging PR {}, I observed that the tool {} {} .
81
86
A follow-up PR to the repository {} is needed to fix the fallout.
82
87
83
88
cc @{}, do you think you would have time to do the follow-up work?
84
89
If so, that would be great!
85
90
86
91
cc @{}, the PR reviewer, and @rust-lang/compiler -- nominating for prioritization.
87
92
88
- ''').format(relevant_pr_number, tool, REPOS.get(tool), relevant_pr_user, pr_reviewer)),
93
+ ''').format(
94
+ relevant_pr_number, tool, status_description,
95
+ REPOS.get(tool), relevant_pr_user, pr_reviewer
96
+ )),
89
97
'title': '`{}` no longer builds after {}'.format(tool, relevant_pr_number),
90
98
'assignees': assignees,
91
99
'labels': ['T-compiler', 'I-nominated'],
@@ -127,7 +135,7 @@ def update_latest(
127
135
for status in latest:
128
136
tool = status['tool']
129
137
changed = False
130
- build_failed = False
138
+ create_issue = False
131
139
132
140
for os, s in current_status.items():
133
141
old = status[os]
@@ -145,14 +153,15 @@ def update_latest(
145
153
.format(tool, os, old, new)
146
154
message += '{} (cc {}, @rust-lang/infra).\n' \
147
155
.format(title, MAINTAINERS.get(tool))
148
- # only create issues for build failures. Other failures can be spurious
149
- if new == 'build-fail':
150
- build_failed = True
156
+ # Most tools only create issues for build failures.
157
+ # Other failures can be spurious.
158
+ if new == 'build-fail' or (tool == 'miri' and new == 'test-fail'):
159
+ create_issue = True
151
160
152
- if build_failed :
161
+ if create_issue :
153
162
try:
154
163
issue(
155
- tool, MAINTAINERS.get(tool, ''),
164
+ tool, new, MAINTAINERS.get(tool, ''),
156
165
relevant_pr_number, relevant_pr_user, pr_reviewer,
157
166
)
158
167
except IOError as e:
0 commit comments