Update default merge failed error to mention CRD
The merge failure message is the same whether your change failed to merge or it was one of its dependencies, including cross-repo dependencies. Update the default error message for this to mention the latter possibility so that contributors don't unnecessarily rebase a dependent change which doesn't actually need it. Change-Id: Ia17d9ab2a842574cf684b4ebb955dd2ec6e9ec3d
This commit is contained in:
@@ -924,9 +924,10 @@ Here is an example of setting the failure message for jobs that check
|
||||
whether a change merges cleanly::
|
||||
|
||||
- name: ^.*-merge$
|
||||
failure-message: This change was unable to be automatically merged
|
||||
with the current state of the repository. Please rebase your
|
||||
change and upload a new patchset.
|
||||
failure-message: This change or one of its cross-repo dependencies
|
||||
was unable to be automatically merged with the current state of
|
||||
its repository. Please rebase the change and upload a new
|
||||
patchset.
|
||||
|
||||
Projects
|
||||
""""""""
|
||||
|
||||
@@ -2951,9 +2951,10 @@ For CI problems and help debugging, contact ci@example.org"""
|
||||
self.registerJobs()
|
||||
|
||||
self.assertEqual(
|
||||
"Merge Failed.\n\nThis change was unable to be automatically "
|
||||
"merged with the current state of the repository. Please rebase "
|
||||
"your change and upload a new patchset.",
|
||||
"Merge Failed.\n\nThis change or one of its cross-repo "
|
||||
"dependencies was unable to be automatically merged with the "
|
||||
"current state of its repository. Please rebase the change and "
|
||||
"upload a new patchset.",
|
||||
self.sched.layout.pipelines['check'].merge_failure_message)
|
||||
self.assertEqual(
|
||||
"The merge failed! For more information...",
|
||||
|
||||
@@ -107,9 +107,10 @@ class TestZuulTrigger(ZuulTestCase):
|
||||
self.assertEqual(E.reported, 0)
|
||||
self.assertEqual(
|
||||
B.messages[0],
|
||||
"Merge Failed.\n\nThis change was unable to be automatically "
|
||||
"merged with the current state of the repository. Please rebase "
|
||||
"your change and upload a new patchset.")
|
||||
"Merge Failed.\n\nThis change or one of its cross-repo "
|
||||
"dependencies was unable to be automatically merged with the "
|
||||
"current state of its repository. Please rebase the change and "
|
||||
"upload a new patchset.")
|
||||
|
||||
self.assertTrue("project:org/project status:open" in
|
||||
self.fake_gerrit.queries)
|
||||
@@ -133,8 +134,9 @@ class TestZuulTrigger(ZuulTestCase):
|
||||
self.assertEqual(E.reported, 1)
|
||||
self.assertEqual(
|
||||
E.messages[0],
|
||||
"Merge Failed.\n\nThis change was unable to be automatically "
|
||||
"merged with the current state of the repository. Please rebase "
|
||||
"your change and upload a new patchset.")
|
||||
"Merge Failed.\n\nThis change or one of its cross-repo "
|
||||
"dependencies was unable to be automatically merged with the "
|
||||
"current state of its repository. Please rebase the change and "
|
||||
"upload a new patchset.")
|
||||
self.assertEqual(self.fake_gerrit.queries[1],
|
||||
"project:org/project status:open")
|
||||
|
||||
@@ -272,9 +272,10 @@ class Scheduler(threading.Thread):
|
||||
pipeline.failure_message = conf_pipeline.get('failure-message',
|
||||
"Build failed.")
|
||||
pipeline.merge_failure_message = conf_pipeline.get(
|
||||
'merge-failure-message', "Merge Failed.\n\nThis change was "
|
||||
"unable to be automatically merged with the current state of "
|
||||
"the repository. Please rebase your change and upload a new "
|
||||
'merge-failure-message', "Merge Failed.\n\nThis change or one "
|
||||
"of its cross-repo dependencies was unable to be "
|
||||
"automatically merged with the current state of its "
|
||||
"repository. Please rebase the change and upload a new "
|
||||
"patchset.")
|
||||
pipeline.success_message = conf_pipeline.get('success-message',
|
||||
"Build succeeded.")
|
||||
|
||||
Reference in New Issue
Block a user