Skip to content

Add retry logic to AWS upload functions#3363

Draft
srayasam-amd wants to merge 1 commit intomainfrom
users/srayasam/retry_upload
Draft

Add retry logic to AWS upload functions#3363
srayasam-amd wants to merge 1 commit intomainfrom
users/srayasam/retry_upload

Conversation

@srayasam-amd
Copy link

Refactor AWS upload functions to include retry logic for robustness. Update function signatures to accept max_retries parameter.

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

Refactor AWS upload functions to include retry logic for robustness. Update function signatures to accept max_retries parameter.
Comment on lines +59 to +65
def run_aws_command(cmd: list[str], cwd: Path, max_retries: int):
base_delay_seconds = 2
for attempt in range(max_retries):
try:
log(f"++ Exec [{cwd}]$ {shlex.join(cmd)}")
subprocess.run(cmd, check=True)
return
Copy link
Member

Choose a reason for hiding this comment

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

These files are due to be migrated to the AWS SDK for Python (boto3) instead of using the AWS CLI tool. We should use the retry functionality that boto3 provides:

Copy link
Contributor

@subodh-dubey-amd subodh-dubey-amd Feb 12, 2026

Choose a reason for hiding this comment

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

@ScottTodd

Should we create two separate PRs for this work?

  1. Migrate all files to use the AWS SDK for Python (boto3) instead of relying on the AWS CLI (also there are aws s3 cp commands in the GitHub Actions workflow).
  2. Implement retry logic using the AWS SDK for Python (boto3).

Copy link
Member

Choose a reason for hiding this comment

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

Migrating "all files" in one step may be a stretch, that could be multiple PRs depending on complexity, but yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

3 participants