Skip to content

Commit ab5fc7f

Browse files
committed
Only emit issues for build failures to supress spurious failures
1 parent c485acb commit ab5fc7f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tools/publish_toolstate.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,21 @@ def update_latest(
115115
new = s.get(tool, old)
116116
status[os] = new
117117
if new > old:
118+
# things got fixed or at least the status quo improved
118119
changed = True
119120
message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
120121
.format(tool, os, old, new, MAINTAINERS.get(tool))
121122
elif new < old:
123+
# tests or builds are failing and were not failing before
122124
changed = True
123125
title = '💔 {} on {}: {} → {}' \
124126
.format(tool, os, old, new)
125127
message += '{} (cc {}, @rust-lang/infra).\n' \
126128
.format(title, MAINTAINERS.get(tool))
127-
failures += title
128-
failures += '\n'
129+
# only create issues for build failures. Other failures can be spurious
130+
if new == 'build-fail':
131+
failures += title
132+
failures += '\n'
129133

130134
if failures != '':
131135
issue(tool, MAINTAINERS.get(tool), relevant_pr_number, relevant_pr_user, failures)
@@ -151,6 +155,7 @@ def update_latest(
151155
save_message_to_path = sys.argv[3]
152156
github_token = sys.argv[4]
153157

158+
# assume that PR authors are also owners of the repo where the branch lives
154159
relevant_pr_match = re.search('Auto merge of #([0-9]+) - ([^:]+)', cur_commit_msg)
155160
if relevant_pr_match:
156161
number = relevant_pr_match.group(1)

0 commit comments

Comments
 (0)