summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-22 21:44:48 +0000
committerGerrit Code Review <review@openstack.org>2019-01-22 21:44:48 +0000
commit8b79ce972c1d52941158cdc5a6b4aa2a6d85a8be (patch)
treea2ef6c7ebd2eb4b4e7726977dec03c0bdbe85282
parent6fccffe49bd9265721c9d091a69f9e08e986e938 (diff)
parente49cf4a0e149e852b7d58d28aac443ac274f5278 (diff)
Merge "Fix node leak when skipping child jobs"
-rw-r--r--tests/fixtures/config/data-return/git/common-config/zuul.yaml8
-rw-r--r--zuul/model.py2
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/fixtures/config/data-return/git/common-config/zuul.yaml b/tests/fixtures/config/data-return/git/common-config/zuul.yaml
index f8cc624..608cc83 100644
--- a/tests/fixtures/config/data-return/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/data-return/git/common-config/zuul.yaml
@@ -37,9 +37,17 @@
37 success-url: docs/index.html 37 success-url: docs/index.html
38 run: playbooks/data-return-relative.yaml 38 run: playbooks/data-return-relative.yaml
39 39
40# This child job will be skipped in the test case test_data_return_child_jobs.
41# In order to verify that this doesn't lead to node leaks attach a nodeset to
42# it. Each test case automatically verifies that there are no open node
43# requests and no locked nodes left behind.
40- job: 44- job:
41 name: child 45 name: child
42 run: playbooks/child.yaml 46 run: playbooks/child.yaml
47 nodeset:
48 nodes:
49 - name: node
50 label: test
43 51
44- job: 52- job:
45 name: several-zuul-return-parent 53 name: several-zuul-return-parent
diff --git a/zuul/model.py b/zuul/model.py
index cc389a7..5904062 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -2243,6 +2243,8 @@ class QueueItem(object):
2243 build = build_set.getBuild(job.name) 2243 build = build_set.getBuild(job.name)
2244 if build and (build.result == 'SUCCESS' or build.paused): 2244 if build and (build.result == 'SUCCESS' or build.paused):
2245 successful_job_names.add(job.name) 2245 successful_job_names.add(job.name)
2246 elif build and build.result == 'SKIPPED':
2247 pass
2246 else: 2248 else:
2247 nodeset = build_set.getJobNodeSet(job.name) 2249 nodeset = build_set.getJobNodeSet(job.name)
2248 if nodeset is None: 2250 if nodeset is None: