Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-26513] Deserialization error in ExecutorStepExecution.
  • Loading branch information
jglick committed Feb 27, 2015
1 parent f356c7a commit aac402a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -11,6 +11,7 @@ Only noting significant user-visible or major API changes, not internal code cle
* Fixing `java.io.NotSerializableException: org.jenkinsci.plugins.workflow.support.steps.StageStepExecution$CanceledCause` thrown from certain scripts using `stage`.
* JENKINS-27052: `stage` step did not prevent a third build from entering a stage after a second was unblocked by a first leaving it.
* JENKINS-26605: Missing link to _Full Log_ under _Running Steps_ when a single step produced >150Kb of output.
* JENKINS-26513: deserialization error when restarting Jenkins inside `node {}` while it is still waiting for a slave to come online.
* `catchError` was incorrectly setting build status to failed when it was merely aborted, canceled, etc.
* PR 52: fixed some memory leaks causing the permanent generation and heap to grow unbounded after many flow builds.
* JENKINS-26120: added `sleep` step.
Expand Down
Expand Up @@ -81,6 +81,7 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.model.Statement;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.MockQueueItemAuthenticator;
import org.jvnet.hudson.test.RandomlyFails;
Expand Down Expand Up @@ -649,4 +650,27 @@ public static void finish(final boolean terminate) {
});
}

@Issue("JENKINS-26513")
@Test public void executorStepRestart() {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
p = jenkins().createProject(WorkflowJob.class, "demo");
p.setDefinition(new CpsFlowDefinition("node('special') {echo 'OK ran'}"));
startBuilding();
while (!JenkinsRule.getLog(b).contains("Still waiting to schedule task")) {
Thread.sleep(100);
}
}
});
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
story.j.createSlave("special", null);
rebuildContext(story.j);
waitForWorkflowToComplete();
assertBuildCompletedSuccessfully();
story.j.assertLogContains("OK ran", b);
}
});
}

}
Expand Up @@ -56,7 +56,7 @@
*/
public class ExecutorStepExecution extends AbstractStepExecutionImpl {

@Inject private transient ExecutorStep step;
@Inject(optional=true) private transient ExecutorStep step;
@StepContextParameter private transient TaskListener listener;
// Here just for requiredContext; could perhaps be passed to the PlaceholderTask constructor:
@StepContextParameter private transient Run<?,?> run;
Expand Down

0 comments on commit aac402a

Please sign in to comment.