Skip to content

Update batch job retry strategy - #1550

Merged
lacoak21 merged 3 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:retry_exit_code
Aug 5, 2026
Merged

Update batch job retry strategy#1550
lacoak21 merged 3 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:retry_exit_code

Conversation

@lacoak21

@lacoak21 lacoak21 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Change Summary

closes #1472

Overview

We no longer need the "spot task was interrupted" retry because we are using on demand instances now. I also added a retry when the exit code is 75. This is the exit code that specifies this job should be retried. For example, when there was an imap-data-access 503 error we should retry the job. We should also retry the job when the job could not pull the container. E.g the status reason was "CannotPullContainerError".

File changes

  • sds_data_manager/orchestration/imap_job.py
    • Update retry strategy

@lacoak21
lacoak21 requested review from bryan-harter and a lite review from Copilot August 5, 2026 16:52
@lacoak21 lacoak21 self-assigned this Aug 5, 2026
@lacoak21 lacoak21 added this to IMAP Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new CannotPullContainerError* retry rule likely targets the wrong AWS Batch field (onReason vs onStatusReason), which could prevent the intended retries from occurring.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Updates the AWS Batch retry strategy used by the IMAP orchestration job submission logic, aligning retries with current infrastructure (on-demand) and adding retry conditions for known transient failure modes related to reprocessing.

Changes:

  • Replaces the Spot interruption-based retry condition with a retry on exit code 75 (explicit “retry me” exit code).
  • Adds a retry rule intended to handle container image pull failures (CannotPullContainerError*).
File summaries
File Description
sds_data_manager/orchestration/imap_job.py Adjusts AWS Batch evaluateOnExit retry rules to target exit code 75 and container pull errors.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread sds_data_manager/orchestration/imap_job.py Outdated
Comment thread sds_data_manager/orchestration/imap_job.py Outdated
@lacoak21 lacoak21 moved this to In Progress in IMAP Aug 5, 2026

@bryan-harter bryan-harter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me, as long as the AI comment turns out to be incorrect/not relevant

@lacoak21

lacoak21 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Seems good to me, as long as the AI comment turns out to be incorrect/not relevant

I think it is relevant but I did change it to onStatusReason

@lacoak21
lacoak21 merged commit 8945f6b into IMAP-Science-Operations-Center:dev Aug 5, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in IMAP Aug 5, 2026
@lacoak21
lacoak21 deleted the retry_exit_code branch August 5, 2026 19:22
@lacoak21 lacoak21 mentioned this pull request Aug 6, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

BUG - Unable to reprocess jobs that have a 503 or empty processing log error.

3 participants