Skip to content

Add retry handling in download_all_files in cli.py #3627

Open

Description

@lacoak21

Currently we have retry handling in place for any 503 or connection drop errors for the upload api call but nothing for the download call.

Activity

  1. tmplummer commented on Nov 5, 2026

    @tmplummer
    Contributor

    This may be duplicating what @sapols implemented for this issue: IMAP-Science-Operations-Center/imap-data-access#372

  2. sapols commented on Nov 6, 2026

    @sapols
    Contributor

    Partly. IMAP-Science-Operations-Center/imap-data-access#373, the fix for the issue Tim linked, makes download retry 429 and 5xx responses, and connections that fail or drop before a response, up to 5 times with backoff (0, 2, 4, 8, then 16 s, plus jitter). pre_processing downloads each dependency through download, so once that's released, a brief 503 won't fail the job.

    What it doesn't cover:

    • An error that outlasts those retries (about 30 s of backoff).
    • A connection that drops partway through a download. urllib3 doesn't retry that at all.

    In both cases download raises IMAPDataAccessError and the job exits 1, which our Batch retry strategy doesn't retry. So I think this is still worth doing, narrowed to catching that error in pre_processing and exiting with RETRY_EXIT_CODE the way upload_products does, for transient errors only (not, say, a 404).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions