Skip to content

Conversation

@jorgee
Copy link
Contributor

@jorgee jorgee commented Oct 21, 2025

Fixes #6481

This PR improves exit code handling for Google Batch tasks by prioritizing the exit code from the Google Batch API over the .exitcode file, with graceful fallback when API data is unavailable.

Changes

  • Primary exit code source: Extract exit code from Google Batch API task execution events (most recent event)
  • Fallback mechanism: Read .exitcode file when API doesn't provide exit code data
  • Enhanced error reporting: Special handling for Google Batch infrastructure error codes (>= 50000, e.g., 50001 for Spot VM preemption)
  • Comprehensive tests: Added test coverage for API exit codes, fallback scenarios, and 500XX error codes

Rationale

The Google Batch API provides more reliable exit codes than the .exitcode file, especially when tasks fail early (e.g., Fusion mount failures with exit code 175). In these cases, the .exitcode file may not be written, causing Nextflow to report Integer.MAX_VALUE (displayed as -). By checking the API first, we ensure accurate exit code reporting consistent with AWS Batch and Azure Batch executors.

@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit ce7eb22
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68f7bde178597200087ef595
😎 Deploy Preview https://deploy-preview-6498--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
@jorgee jorgee force-pushed the fix-google-exit-code branch from 17ef676 to ce7eb22 Compare October 21, 2025 17:07
@jorgee jorgee added this to the 25.10 milestone Oct 21, 2025
@pditommaso pditommaso changed the title Get Exit code from Google API Prioritize Google Batch API exit codes with fallback to .exitcode file Oct 21, 2025
@pditommaso pditommaso merged commit 6ac2efc into master Oct 21, 2025
30 of 34 checks passed
@pditommaso pditommaso deleted the fix-google-exit-code branch October 21, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nextflow doesn't capture Fusion exit codes from Google Batch API

4 participants