summaryrefslogtreecommitdiff
path: root/tests/fixtures
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2017-10-31 16:40:36 -0700
committerJames E. Blair <jeblair@redhat.com>2017-10-31 17:01:09 -0700
commit872738fc33c51749af4d364a39b1c3bf4906ab48 (patch)
treef14c5b477ac687098094bf8a7ec84a484ee94dc8 /tests/fixtures
parenta1fa9aa1c624f302a06a91c3bcb2e608ccc93604 (diff)
downloadzuul-872738fc33c51749af4d364a39b1c3bf4906ab48.tar.gz
On reconfiguration, re-enqueue items at the same position
Upon reconfiguration, we currently re-enqueue every item back into its pipeline, in case a difference in the configuration would change what should occur. In the simple case, this is fine, but if a dependent pipeline has a branching dependency structure due to already failing jobs, we would erroneously re-order the changes back into a linear arrangement. The next pass through the pipeline manager would move those items back to where they should be, but in doing so, would reset their builds. To correct this, after re-enqueueing a change, if the change that was previously ahead of it in the pipeline was also successfully re-enqueued, immediately move the change behind it (or if the change ahead was "None" meaning it was its own head, move it behind no change). This should have the effect of putting changes back where they were in relation to other failing changes. If the change ahead was not successfully re-enqueued, the current behavior of simply putting it behind the nearest change in the queue is preserved. If anything more complex happens, any errors will be corrected on the next pass through the pipeline manager. Change-Id: Ie3771d9bbbc1ca77425cf62751d8e5f70ba1f14c
Diffstat (limited to 'tests/fixtures')
-rw-r--r--tests/fixtures/layouts/reconfigure-failed-head.yaml56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/fixtures/layouts/reconfigure-failed-head.yaml b/tests/fixtures/layouts/reconfigure-failed-head.yaml
new file mode 100644
index 000000000..3347c9b82
--- /dev/null
+++ b/tests/fixtures/layouts/reconfigure-failed-head.yaml
@@ -0,0 +1,56 @@
+- pipeline:
+ name: check
+ manager: independent
+ trigger:
+ gerrit:
+ - event: patchset-created
+ success:
+ gerrit:
+ Verified: 1
+ failure:
+ gerrit:
+ Verified: -1
+
+- pipeline:
+ name: gate
+ manager: dependent
+ success-message: Build succeeded (gate).
+ trigger:
+ gerrit:
+ - event: comment-added
+ approval:
+ - Approved: 1
+ success:
+ gerrit:
+ Verified: 2
+ submit: true
+ failure:
+ gerrit:
+ Verified: -2
+ start:
+ gerrit:
+ Verified: 0
+ precedence: high
+
+- job:
+ name: base
+ parent: null
+
+- job:
+ name: job1
+ run: playbooks/job1.yaml
+
+- job:
+ name: job2
+ run: playbooks/job2.yaml
+
+- project:
+ name: org/project
+ check:
+ jobs:
+ - job1
+ - job2
+ gate:
+ jobs:
+ - job1
+ - job2