Skip to content
Permalink
Browse files

[JENKINS-51584] do not store actions from TransientActionFactory.

The code was updated to use the non deprecated getAllActions() to obtain
the list of actions, however this was persisted in the actions causing
the actions from TransientActionFactories to be persisted in Builds.
  • Loading branch information...
jtnord committed May 30, 2018
1 parent c4215dc commit 8ca803819bbd7f5ecaf44179680d6694999e74d4
@@ -2196,8 +2196,10 @@ protected Item(Task task, List<Action> actions, long id, FutureImpl future, long
for (Action action: actions) addAction(action);
}

@SuppressWarnings("deprecation") // JENKINS-51584
protected Item(Item item) {
this(item.task, new ArrayList<Action>(item.getAllActions()), item.id, item.future, item.inQueueSince);
// do not use item.getAllActions() here as this will persist actions from a TransientActionFactory
this(item.task, new ArrayList<Action>(item.getActions()), item.id, item.future, item.inQueueSince);
}

/**
@@ -67,8 +67,8 @@ public WorkUnitContext(BuildableItem item) {
this.item = item;
this.task = item.task;
this.future = (FutureImpl)item.getFuture();
this.actions = new ArrayList<Action>(item.getAllActions());

// JENKINS-51584 do not use item.getAllActions() here.
this.actions = new ArrayList<Action>(item.getActions());
// +1 for the main task
int workUnitSize = task.getSubTasks().size();
startLatch = new Latch(workUnitSize) {

0 comments on commit 8ca8038

Please sign in to comment.
You can’t perform that action at this time.