Browse Source

Merge "Fix node leak when skipping child jobs"

tags/3.5.0
Zuul 4 months ago
parent
commit
8b79ce972c
2 changed files with 10 additions and 0 deletions
  1. 8
    0
      tests/fixtures/config/data-return/git/common-config/zuul.yaml
  2. 2
    0
      zuul/model.py

+ 8
- 0
tests/fixtures/config/data-return/git/common-config/zuul.yaml View File

@@ -37,9 +37,17 @@
37 37
     success-url: docs/index.html
38 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 44
 - job:
41 45
     name: child
42 46
     run: playbooks/child.yaml
47
+    nodeset:
48
+      nodes:
49
+        - name: node
50
+          label: test
43 51
 
44 52
 - job:
45 53
     name: several-zuul-return-parent

+ 2
- 0
zuul/model.py View File

@@ -2243,6 +2243,8 @@ class QueueItem(object):
2243 2243
             build = build_set.getBuild(job.name)
2244 2244
             if build and (build.result == 'SUCCESS' or build.paused):
2245 2245
                 successful_job_names.add(job.name)
2246
+            elif build and build.result == 'SKIPPED':
2247
+                pass
2246 2248
             else:
2247 2249
                 nodeset = build_set.getJobNodeSet(job.name)
2248 2250
                 if nodeset is None:

Loading…
Cancel
Save