Skip to content
Permalink
Browse files
[Merge-Queue] Differentiate gardening commits in bug comments
https://bugs.webkit.org/show_bug.cgi?id=239740
<rdar://problem/92293298>

Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/steps.py:
(DetermineLandedIdentifier.comment_text_for_bug):
* Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/249972@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard committed Apr 26, 2022
1 parent 222db73 commit a6ccc61889cf9a8ff2bb210b025547f276d2c277
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
@@ -4656,7 +4656,10 @@ def identifier_for_revision(self, revision):

def comment_text_for_bug(self, svn_revision=None, identifier=None):
identifier_str = identifier if identifier and '@' in identifier else '?'
comment = 'Committed r{} ({}): <{}>'.format(svn_revision, identifier_str, self.url_for_identifier(identifier))
comment = '{} r{} ({}): <{}>'.format(
'Test gardening commit' if self.getProperty('is_test_gardening') else 'Committed',
svn_revision, identifier_str, self.url_for_identifier(identifier),
)

patch_id = self.getProperty('patch_id', '')
if patch_id:
@@ -5495,6 +5495,42 @@ def test_success_pr(self):
self.assertEqual(self.getProperty('build_summary'), 'Committed 220797@main')
return rc

def test_success_gardening_pr(self):
with self.mock_commits_webkit_org(), self.mock_sleep():
self.setupStep(DetermineLandedIdentifier())
self.setProperty('svn_revision', '293254')
self.setProperty('github.number', '1234')
self.setProperty('is_test_gardening', True)
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
timeout=300,
logEnviron=False,
command=['git', 'log', '-1', '--no-decorate']) +
ExpectShell.log('stdio', stdout=''''commit 5dc27962b4c5bdfd17d17faa785f70abbb0550ed
Author: Matteo Flores <matteo_flores@apple.com>
Date: Fri Apr 22 21:24:12 2022 +0000
REBASLINE: [ Monterey ] fast/text/khmer-lao-font.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=238917
Unreviewed test gardening.
* platform/mac-bigsur/fast/text/khmer-lao-font-expected.txt: Copied from LayoutTests/platform/mac/fast/text/khmer-lao-font-expected.txt.
* platform/mac/fast/text/khmer-lao-font-expected.txt:
Canonical link: https://commits.webkit.org/249903@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293254 268f45cc-cd09-0410-ab3c-d52691b4dbfc''') +
0,
)
self.expectOutcome(result=SUCCESS, state_string='Identifier: 249903@main')
with current_hostname(EWS_BUILD_HOSTNAME):
rc = self.runStep()

self.assertEqual(self.getProperty('comment_text'), 'Test gardening commit r293254 (249903@main): <https://commits.webkit.org/249903@main>\n\nReviewed commits have been landed. Closing PR #1234 and removing active labels.')
self.assertEqual(self.getProperty('build_summary'), 'Committed 249903@main')
return rc

def test_success_pr_fallback(self):
with self.mock_commits_webkit_org(identifier='220797@main'), self.mock_sleep():
self.setupStep(DetermineLandedIdentifier())
@@ -1,3 +1,15 @@
2022-04-25 Jonathan Bedard <jbedard@apple.com>

[Merge-Queue] Differentiate gardening commits in bug comments
https://bugs.webkit.org/show_bug.cgi?id=239740
<rdar://problem/92293298>

Reviewed by Ryan Haddad.

* CISupport/ews-build/steps.py:
(DetermineLandedIdentifier.comment_text_for_bug):
* CISupport/ews-build/steps_unittest.py:

2022-04-25 Jonathan Bedard <jbedard@apple.com>

GitHub EWS is confused with prior PR's merge-blocked label

0 comments on commit a6ccc61

Please sign in to comment.