Skip to content

Commit

Permalink
Merge pull request #415 from jglick/status
Browse files Browse the repository at this point in the history
Handle null `controller` in `DurableTaskStep.Execution.getStatus`
  • Loading branch information
jglick authored Jan 14, 2025
2 parents f6c9e89 + ef9cff7 commit 7afd50a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,9 @@ private static final class NewlineSafeTaskListener extends OutputStreamTaskListe
}

@Override public String getStatus() {
if (controller == null) {
return "not yet started";

Check warning on line 530 in src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 529-530 are not covered by tests
}
StringBuilder b = new StringBuilder();
try (Timeout timeout = Timeout.limit(2, TimeUnit.SECONDS)) { // CpsThreadDump applies a 3s timeout anyway
FilePath workspace = getWorkspace();
Expand Down

0 comments on commit 7afd50a

Please sign in to comment.