Skip to content

Commit

Permalink
fix(orca): tying exceptions to tasks (#4517)
Browse files Browse the repository at this point in the history
* fix(orca): tying exceptions to tasks

* fix(orca): added test separately
  • Loading branch information
SusmithaGU authored Sep 1, 2023
1 parent 73a1c6f commit 27b697e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ class RunTaskHandler(
}
val status = stage.failureStatus(default = TERMINAL)
stage.context["exception"] = exceptionDetails
//Adding here serves two purposes one to display taskwise failures,other to display the exact failure when continue pipeline is set to true
taskModel.taskExceptionDetails["exception"] = exceptionDetails
repository.storeStage(stage)
queue.push(CompleteTask(message, status, TERMINAL))
trackResult(stage, thisInvocationStartTimeMs, taskModel, status)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,14 @@ object RunTaskHandlerTest : SubjectSpek<RunTaskHandler>({
}
)
}

it("attaches the exception to the taskExceptionDetails") {
verify(repository).storeStage(
check {
assertThat(it.tasks[0].taskExceptionDetails["exception"]).isEqualTo(exceptionDetails)
}
)
}
}

and("the task should not fail the whole pipeline, only the branch") {
Expand Down

0 comments on commit 27b697e

Please sign in to comment.