Fix Google Batch exit code when spot claim is successfully retried#6926
Merged
bentsherman merged 2 commits intomasterfrom Mar 17, 2026
Conversation
…pts > 0) Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
|
I like this fix more than mine (#6848). I'll close my PR, but I can confirm that this does currently cause issues when using |
Contributor
Author
I didn't see your PR. What kind of issues do you refer? |
|
I described what I was seeing in my PR description. Reading the issue you linked, it's exactly what is described there. To clarify, I mean that Nextflow in its current form causes issues. This PR would fix it. Sorry for the confusion! |
…ode-even-when-the-batch-job-is-retried-and-succeeds
bentsherman
approved these changes
Mar 17, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #6779
This pull request addresses the handling of exit codes for Google Batch spot instance retries and improves test coverage for these scenarios. The main change ensures that tasks retried on spot instances correctly update their exit status by reading the
.exitcodefile, and the associated tests are updated to cover this logic.Improvements to spot instance exit code handling:
GoogleBatchTaskHandler.groovy: Added logic to check if a task has an exit status >= 50000 (indicative of a spot instance retry) and, if so, update the exit status by reading the.exitcodefile.Enhancements to test coverage:
GoogleBatchTaskHandlerTest.groovy: Updated mock job status handling to use theJOB_STATEvariable, allowing more flexible test scenarios.GoogleBatchTaskHandlerTest.groovy: Modified test cases to include scenarios where the exit code is re-read for retried spot instances, and expanded the test matrix to cover both failed and succeeded job states, as well as the number of timesreadExitFile()is called.