Skip to content
Permalink
Browse files
[ews-build.webkit.org] Remove check-github-integrity (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=241859
<rdar://93108238>

Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__): Remove VerifyGitHubIntegrity.
(MergeQueueFactoryBase.__init__): Ditto.
* Tools/CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):
* Tools/CISupport/ews-build/steps.py:
(VerifyGitHubIntegrity): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/251743@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard committed Jun 22, 2022
1 parent c2dfbf6 commit e4d783c9844b38eaac7301213b5a7aca5da8fefe
Showing 4 changed files with 2 additions and 75 deletions.
@@ -34,7 +34,7 @@
RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsRedTree, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory,
ValidateCommitMessage, ValidateChange, ValidateCommitterAndReviewer, WaitForCrashCollection,
InstallBuiltProduct, VerifyGitHubIntegrity, ValidateSquashed)
InstallBuiltProduct, ValidateSquashed)


class Factory(factory.BuildFactory):
@@ -297,7 +297,6 @@ def __init__(self, platform, configuration=None, architectures=None, additionalA
self.addStep(GitSvnFetch()) # FIXME: Remove when migrating to pure git
self.addStep(FetchBranches())
self.addStep(ShowIdentifier())
self.addStep(VerifyGitHubIntegrity())
self.addStep(UpdateWorkingDirectory())
self.addStep(CommitPatch())

@@ -332,7 +331,6 @@ def __init__(self, platform, configuration=None, architectures=None, additionalA
self.addStep(GitSvnFetch()) # FIXME: Remove when migrating to pure git
self.addStep(FetchBranches())
self.addStep(ShowIdentifier())
self.addStep(VerifyGitHubIntegrity())
self.addStep(UpdateWorkingDirectory())
self.addStep(CheckOutPullRequest())
self.addStep(ValidateSquashed())
@@ -607,7 +607,6 @@ class TestExpectedBuildSteps(unittest.TestCase):
'git-svn-fetch',
'fetch-branch-references',
'show-identifier',
'verify-github-integrity',
'update-working-directory',
'commit-patch',
'validate-squashed',
@@ -636,7 +635,6 @@ class TestExpectedBuildSteps(unittest.TestCase):
'git-svn-fetch',
'fetch-branch-references',
'show-identifier',
'verify-github-integrity',
'update-working-directory',
'checkout-pull-request',
'validate-squashed',
@@ -662,7 +660,6 @@ class TestExpectedBuildSteps(unittest.TestCase):
'git-svn-fetch',
'fetch-branch-references',
'show-identifier',
'verify-github-integrity',
'update-working-directory',
'checkout-pull-request',
'validate-squashed',
@@ -4708,37 +4708,6 @@ def start(self):
return None


# FIXME: Only needed when GitHub is a mirror, remove once GitHub is the source of truth
class VerifyGitHubIntegrity(shell.ShellCommand):
command = ['python3', 'Tools/Scripts/check-github-mirror-integrity']
name = 'verify-github-integrity'
haltOnFailure = True

def __init__(self, **kwargs):
super(VerifyGitHubIntegrity, self).__init__(logEnviron=False, **kwargs)

def getResultSummary(self):
if self.results != SUCCESS:
return {'step': 'GitHub integrity check failed'}
return {'step': 'Verified GitHub integrity'}

def evaluateCommand(self, cmd):
rc = shell.ShellCommand.evaluateCommand(self, cmd)
if rc != SUCCESS:
self.send_email_for_github_issue()
return rc

def send_email_for_github_issue(self):
try:
builder_name = self.getProperty('buildername', '')
build_url = '{}#/builders/{}/builds/{}'.format(self.master.config.buildbotURL, self.build._builderid, self.build.number)
email_subject = 'URGENT: GitHub integrity check failed'
email_text = 'URGENT issue on github repository. Integrity check failed.\n\nBuild: {}\n\nBuilder: {}'.format(build_url, builder_name)
send_email_to_github_admin(email_subject, email_text)
except Exception as e:
print('Error in sending email for github issue: {}'.format(e))


class ValidateSquashed(shell.ShellCommand):
name = 'validate-squashed'
haltOnFailure = True
@@ -58,8 +58,7 @@
RunWebKitTestsWithoutChange, RunWebKitTestsRedTree, RunWebKitTestsRepeatFailuresRedTree, RunWebKitTestsRepeatFailuresWithoutChangeRedTree,
RunWebKitTestsWithoutChangeRedTree, AnalyzeLayoutTestsResultsRedTree, TestWithFailureCount, ShowIdentifier,
Trigger, TransferToS3, UnApplyPatch, UpdatePullRequest, UpdateWorkingDirectory, UploadBuiltProduct,
UploadTestResults, ValidateCommitMessage, ValidateCommitterAndReviewer, ValidateChange,
VerifyGitHubIntegrity, ValidateSquashed)
UploadTestResults, ValidateCommitMessage, ValidateCommitterAndReviewer, ValidateChange, ValidateSquashed)

# Workaround for https://github.com/buildbot/buildbot/issues/4669
from buildbot.test.fake.fakebuild import FakeBuild
@@ -5640,42 +5639,6 @@ def test_failure(self):
return self.runStep()


class TestVerifyGitHubIntegrity(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
return self.setUpBuildStep()

def tearDown(self):
return self.tearDownBuildStep()

def test_success(self):
self.setupStep(VerifyGitHubIntegrity())
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
command=['python3', 'Tools/Scripts/check-github-mirror-integrity'],
logEnviron=False,
timeout=1200,
)
+ 0,
)
self.expectOutcome(result=SUCCESS, state_string='Verified GitHub integrity')
return self.runStep()

def test_failure(self):
self.setupStep(VerifyGitHubIntegrity())
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
command=['python3', 'Tools/Scripts/check-github-mirror-integrity'],
logEnviron=False,
timeout=1200,
)
+ ExpectShell.log('stdio', stdout='Unexpected error.')
+ 2,
)
self.expectOutcome(result=FAILURE, state_string='GitHub integrity check failed')
return self.runStep()


class TestValidateSquashed(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True

0 comments on commit e4d783c

Please sign in to comment.