Skip to content

Improve AWS Batch spot reclamation error messages #6253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewels
Copy link
Member

@ewels ewels commented Jul 4, 2025

Warning

Experimentation - having a play with using Claude Code in the terminal to fix Nextflow issues. I haven't written or read this code. Feel free to bin it if it's junk (very likely).

Summary

  • Improve error messages when AWS Batch spot instances are reclaimed
  • Add clearer guidance on configuring maxSpotAttempts for automatic retries
  • Enhance logging for retry attempts and spot reclamation configuration
  • Include helpful links to AWS documentation

Changes Made

  • Added isSpotReclamationError() method to detect spot reclamation failures
  • Added formatSpotReclamationError() method to provide user-friendly error messages
  • Enhanced error handling in checkIfCompleted() to use improved messages
  • Added logging for retry attempts and spot reclamation configuration
  • Error messages now include actionable guidance about the maxSpotAttempts setting

Fixes

Test Plan

  • Verify that spot reclamation errors now show clearer messages
  • Test with maxSpotAttempts = 0 (current default) to ensure guidance is shown
  • Test with maxSpotAttempts > 0 to verify retry configuration messages
  • Confirm existing functionality is preserved for non-spot errors

🤖 Generated with Claude Code

Copy link

netlify bot commented Jul 4, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 12f7b22
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6867d8c2fa70c2000884a1fa

- Add clearer error messages when spot instances are reclaimed
- Provide guidance on configuring maxSpotAttempts for automatic retries
- Add logging for retry attempts and spot reclamation configuration
- Include helpful link to AWS documentation on spot interruptions

This addresses issues nextflow-io#5240 and nextflow-io#6225 by making spot reclamation
failures more user-friendly and providing actionable guidance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ewels ewels force-pushed the fix-spot-reclamation-error-messages branch from 3f96788 to 12f7b22 Compare July 4, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spot reclamations: clearer error reason AWS spot failure - custom error message
1 participant