New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merge-Queue] Skip CloseBug if no bug defined #231
[Merge-Queue] Skip CloseBug if no bug defined #231
Conversation
110d6e2
to
facb27c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ with comments.
Tools/CISupport/ews-build/steps.py
Outdated
self.descriptionDone = 'No bug id found' | ||
self.finished(FAILURE) | ||
return None | ||
def __init__(self, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this init can be removed, can initialize bug_id as class variable or can handle it appropriately in getResultsummary as well. But this is fine as well.
rc = self.close_bug(self.bug_id) | ||
self.finished(rc) | ||
return None | ||
|
||
def getResultSummary(self): | ||
if self.results == SKIPPED: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's better not to have this custom result summary for SKIPPED case. First of all it wouldn't be displayed in the buildbot UI, since we set hideStepIf as well. Secondly, this custom string will show up in status-bubble pop-over message, while the default one (ending in (skipped)
) is hidden (See: https://github.com/WebKit/WebKit/blob/main/Tools/CISupport/ews-app/ews/views/statusbubble.py#L70)
rc = self.close_bug(self.bug_id) | ||
self.finished(rc) | ||
return None | ||
|
||
def getResultSummary(self): | ||
if self.results == SKIPPED: | ||
return {'step': 'No bug to close'} | ||
if self.results == SUCCESS: | ||
return {'step': 'Closed bug {}'.format(self.bug_id)} | ||
return {'step': 'Failed to close bug {}'.format(self.bug_id)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I missed noticing this default case handling (in this and previous few PRs). It doesn't look good. You should explicitly handle the cases which you want, and let buildbot default getResultSummary() handle the rest.
e.g.: https://github.com/WebKit/WebKit/blob/main/Tools/CISupport/ews-build/steps.py#L882 or https://github.com/WebKit/WebKit/blob/main/Tools/CISupport/ews-build/steps.py#L2834
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation here, will be updating these later today.
a8bea09
to
0dc3660
Compare
commit-queue failed to commit attachment to WebKit repository. To retry, please set cq+ flag again. |
https://bugs.webkit.org/show_bug.cgi?id=238612 <rdar://problem/91110116> Reviewed by Aakash Jain. * Tools/CISupport/ews-build/steps.py: (CloseBug.start): Ignore unavailable bug_id case. (CloseBug.getResultSummary): Use default summary for skip case. (CloseBug.doStepIf): Do step if bug_id is available. (CloseBug.hideStepIf): Hide step if skipped.
Committed r292161 (249068@main): https://commits.webkit.org/249068@main All reviewed patches have been landed. Closing bug and clearing flags on attachment . |
0dc3660
to
8b5acb6
Compare
6ddf728