summaryrefslogtreecommitdiff
path: root/zuul/model.py
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2018-01-16 13:32:14 -0800
committerJens Harbott (frickler) <j.harbott@x-ion.de>2018-01-17 04:23:39 +0000
commita86134f5287a65b0eede090dc8564f210c5a13f8 (patch)
treecd8cd5c1c16890540b75f41a5cf24d26ba198891 /zuul/model.py
parent84112d3cdddfe11f8532b1923f8754fa5ad72750 (diff)
downloadzuul-a86134f5287a65b0eede090dc8564f210c5a13f8.tar.gz
Fix dependency cycle false positive
This corrects a false-positive in the dependency cycle detection, but only for the new URL-style depends-on headers. It does not do so for the legacy gerrit headers. We used a single history list to store all the changes we enqueued ahead of a given change, but this meant that if there was more than one path to a change, we would see it in the history on the second traversal. Instead, when traversing the tree, use copies of the history list at each stage so that it can be rewound when going back up the tree. The second path to a change will not trip the cycle detection, and will proceed on to the point where it notices the change is already in the queue and return harmlessly. Also, check whether the exact change is in the history, not just the number, since numbers are no longer unique with multiple sources. Also, fix a bug in the test_crd_cycle test which was causing the test to always pass since the changes were never enqueued due to missing approval requirements. Change-Id: I3241f90a1d7469d433cfa176e719322203d4d089 Story: 2001427 Task: 6133
Diffstat (limited to 'zuul/model.py')
0 files changed, 0 insertions, 0 deletions