Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[EWS] Support PRs when sending build failure emails (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=235926 <rdar://problem/88302122> Reviewed by Aakash Jain. * Tools/CISupport/ews-build/steps.py: (GitHub.email_for_owners): Return error string. (AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Log error from email_from_owners to buildbot stdio. Canonical link: https://commits.webkit.org/247296@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
2 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -130,8 +130,7 @@ def credentials(cls): | ||
@classmethod | ||
def email_for_owners(cls, owners): | ||
if not owners: | ||
print('No owners defined, so email cannot be extracted') | ||
return None | ||
return None, 'No owners defined, so email cannot be extracted' | ||
contributors, errors = Contributors.load(use_network=False) | ||
return contributors.get(owners[0], {}).get('email'), errors | ||
|
||
@@ -2172,7 +2171,7 @@ def send_email_for_new_build_failure(self): | ||
if pr_number and not self.should_send_email_for_pr(pr_number): | ||
return | ||
if not patch_id and not (pr_number and sha): | ||
print('Unrecognized change type') | ||
self._addToLog('Unrecognized change type') | ||
return | ||
|
||
change_string = None | ||
@@ -2185,9 +2184,10 @@ def send_email_for_new_build_failure(self): | ||
change_author, errors = GitHub.email_for_owners(self.getProperty('owners', [])) | ||
for error in errors: | ||
print(error) | ||
self._addToLog('stdio', error) | ||
|
||
if not change_author: | ||
print('Failed to determine change author for hash {} belonging to PR #{}'.format(sha, patch_id)) | ||
self._addToLog('Unable to determine email address for {} from metadata/contributors.json. Skipping sending email.'.format(self.getProperty('owners', []))) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JonWBedard
Author
Member
|
||
return | ||
|
||
builder_name = self.getProperty('buildername', '') | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
should it be owners or owners[0]? (to be just the string instead of list)