Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,10 @@ class GoogleBatchTaskHandler extends TaskHandler implements FusionAwareTask {
if( state in COMPLETED ) {
log.debug "[GOOGLE BATCH] Process `${task.lazyName()}` - terminated job=$jobId; task=$taskId; state=$state"
// finalize the task
task.exitStatus = getExitCode()
// For SUCCEEDED state, read exit code from .exitcode file to avoid picking up
// intermediate exit codes (e.g., 50001 from spot preemption) from task events.
// For FAILED state, use getExitCode() which checks task events first.
task.exitStatus = (state == 'SUCCEEDED') ? readExitFile() : getExitCode()
if( state == 'FAILED' ) {
// When no exit code or 500XX codes, get the jobError reason from events
if( task.exitStatus == Integer.MAX_VALUE || task.exitStatus >= 50000)
Expand Down