Propagate debug argument for independent pipelines

Debug argument was not propagated for independent pipelines.
This cause the non-enqueue messages not reported for the change
when it is not enqueued due to the changes ahead violating
the pipeline requirements.

Propagating the debug argument when enqueueing the changes ahead
in the independent pipeline should solve this issue.

Change-Id: Iaa81a682b9c84891fb354d68f4cbba45a44f3a7a
This commit is contained in:
Ruisi Jian committed 2026-08-27 18:41:15 +00:00
1 parent 64c02eb28b
commit 8f32a24621
4 files changed
+27

No files matched your search

+5
View File
@@ -724,6 +724,11 @@ class FakeGerritChange(object):
self.data['open'] = False
self.open = False
def unsetAbandoned(self):
self.data['status'] = 'NEW'
self.data['open'] = True
self.open = True
class FakeGerritPoller(gerritconnection.GerritChecksPoller):
"""A Fake Gerrit poller for use in tests.
@@ -1,10 +1,15 @@
- pipeline:
name: check
manager: independent
require:
gerrit:
current-patchset: true
trigger:
gerrit:
- event: patchset-created
debug: true
- event: comment-added
comment: recheck
success:
gerrit:
Verified: 1
@@ -19,6 +24,7 @@
require:
gerrit:
open: true
current-patchset: true
trigger:
gerrit:
- event: comment-added
+15
View File
@@ -532,6 +532,21 @@ class TestGerritWeb(ZuulTestCase):
self.assertIn('does not match pipeline requirement',
B.messages[0])
# Test that we get debug info for a pipeline debug trigger
# when a change depends on a change missing a pipeline requirement
B.unsetAbandoned()
B.addPatchset()
self.fake_gerrit.addEvent(B.getChangeCommentEvent(1, 'recheck'))
self.waitUntilSettled()
A.addPatchset()
self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(2))
self.waitUntilSettled()
self.assertEqual(B.data['status'], 'NEW')
self.assertEqual(A.data['status'], 'NEW')
self.assertEqual(A.reported, 3)
self.assertIn('does not match pipeline requirement',
A.messages[2])
# Test that we get debug info for a pipeline debug trigger
# when a change is missing a merge requirement
C = self.fake_gerrit.addFakeChange('org/project', 'master', 'C')
+1
View File
@@ -77,6 +77,7 @@ class IndependentPipelineManager(PipelineManager):
change_queue=change_queue,
history=history,
dependency_graph=dependency_graph,
debug=debug,
warnings=warnings)
if not r:
return False