Handle adding a job to a failing change during reconfig
During live reconfiguration, if an item was either in a merge
conflict state, or if it had jobs marked as skipped because of
a failing superior job in a job tree, any new jobs added to that
item during the reconfiguration would not have their state
updated to 'skipped'. This would cause the item to stay in the
queue indefinitely.
Correct this by performing again the state updates that set build
statuses to 'skipped' after an item is re-enqueued.
Change-Id: I96195cb9996b01075e3705b6cd89a9863528898e
diff --git a/tests/fixtures/layout-live-reconfiguration-add-job.yaml b/tests/fixtures/layout-live-reconfiguration-add-job.yaml
new file mode 100644
index 0000000..e4aea6f
--- /dev/null
+++ b/tests/fixtures/layout-live-reconfiguration-add-job.yaml
@@ -0,0 +1,38 @@
+pipelines:
+ - name: gate
+ manager: DependentPipelineManager
+ failure-message: Build failed. For information on how to proceed, see http://wiki.example.org/Test_Failures
+ trigger:
+ gerrit:
+ - event: comment-added
+ approval:
+ - approved: 1
+ success:
+ gerrit:
+ verified: 2
+ submit: true
+ failure:
+ gerrit:
+ verified: -2
+ start:
+ gerrit:
+ verified: 0
+ precedence: high
+
+jobs:
+ - name: ^.*-merge$
+ failure-message: Unable to merge change
+ hold-following-changes: true
+ - name: project-testfile
+ files:
+ - '.*-requires'
+
+projects:
+ - name: org/project
+ merge-mode: cherry-pick
+ gate:
+ - project-merge:
+ - project-test1
+ - project-test2
+ - project-test3
+ - project-testfile