Skip to content

Commit faf9889

Browse files
committed
Merge branch 'master' into sleep-longr
2 parents 4c1dd5d + f31e39d commit faf9889

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

Jenkinsfile

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ https://github.com/jenkins-infra/pipeline-library/
66
*/
77
buildPlugin(
88
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
9-
forkCount: '1C',
109
configurations: [
1110
[platform: 'linux', jdk: 21],
1211
[platform: 'windows', jdk: 17],

pom.xml

+3-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.jenkins-ci.plugins</groupId>
3030
<artifactId>plugin</artifactId>
31-
<version>5.3</version>
31+
<version>5.5</version>
3232
<relativePath/>
3333
</parent>
3434
<groupId>org.jenkins-ci.plugins.workflow</groupId>
@@ -66,8 +66,6 @@
6666
</pluginRepositories>
6767
<properties>
6868
<changelist>999999-SNAPSHOT</changelist>
69-
<!-- TODO Until in plugin-pom -->
70-
<jenkins-test-harness.version>2357.vf2a_982b_b_910f</jenkins-test-harness.version>
7169
<jenkins.baseline>2.479</jenkins.baseline>
7270
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
7371
<useBeta>true</useBeta>
@@ -79,7 +77,7 @@
7977
<dependency>
8078
<groupId>io.jenkins.tools.bom</groupId>
8179
<artifactId>bom-${jenkins.baseline}.x</artifactId>
82-
<version>3482.vc10d4f6da_28a_</version>
80+
<version>4023.va_eeb_b_4e45f07</version>
8381
<scope>import</scope>
8482
<type>pom</type>
8583
</dependency>
@@ -170,7 +168,7 @@
170168
<dependency>
171169
<groupId>org.jenkins-ci.plugins</groupId>
172170
<artifactId>mock-slave</artifactId>
173-
<version>153.v9768799a_2294</version>
171+
<version>189.vca_72fb_1d2b_52</version>
174172
<scope>test</scope>
175173
</dependency>
176174
<dependency>

src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ private static final class NewlineSafeTaskListener extends OutputStreamTaskListe
526526
}
527527

528528
@Override public String getStatus() {
529+
if (controller == null) {
530+
return "not yet started";
531+
}
529532
StringBuilder b = new StringBuilder();
530533
try (Timeout timeout = Timeout.limit(2, TimeUnit.SECONDS)) { // CpsThreadDump applies a 3s timeout anyway
531534
FilePath workspace = getWorkspace();
@@ -759,12 +762,11 @@ private static class HandlerImpl extends Handler {
759762

760763
private void check(Computer c) {
761764
String name = c.getName();
762-
StepExecution.applyAll(Execution.class, exec -> {
765+
StepExecution.acceptAll(Execution.class, exec -> {
763766
if (exec.watching && exec.node.equals(name)) {
764767
LOGGER.fine(() -> "Online/offline event on " + name + ", checking current status of " + exec.remote + " soon");
765768
threadPool().schedule(exec::check, 15, TimeUnit.SECONDS);
766769
}
767-
return null;
768770
});
769771
}
770772

src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public void stop(@NonNull Throwable cause) throws Exception {
331331
}
332332
Set<StepContext> newAnomalous = new HashSet<>();
333333
Set<String> affectedNodes = new HashSet<>();
334-
StepExecution.applyAll(ExecutorStepExecution.class, exec -> {
334+
StepExecution.acceptAll(ExecutorStepExecution.class, exec -> {
335335
StepContext ctx = exec.getContext();
336336
if (!knownTasks.contains(ctx)) {
337337
LOGGER.warning(() -> "do not know about " + ctx);
@@ -351,11 +351,10 @@ public void stop(@NonNull Throwable cause) throws Exception {
351351
} else {
352352
LOGGER.fine(() -> "know about " + ctx);
353353
}
354-
return null;
355354
}).get();
356355
// Also abort any shell steps running on the same node(s):
357356
if (!affectedNodes.isEmpty()) {
358-
StepExecution.applyAll(DurableTaskStep.Execution.class, exec -> {
357+
StepExecution.acceptAll(DurableTaskStep.Execution.class, exec -> {
359358
if (affectedNodes.contains(exec.node)) {
360359
StepContext ctx = exec.getContext();
361360
try {
@@ -365,7 +364,6 @@ public void stop(@NonNull Throwable cause) throws Exception {
365364
}
366365
ctx.onFailure(new FlowInterruptedException(Result.ABORTED, false, new RemovedNodeCause()));
367366
}
368-
return null;
369367
});
370368
}
371369
for (StepContext ctx : newAnomalous) {

0 commit comments

Comments
 (0)