Skip to content

[DRAFT] Retry downloads#1016

Closed
trey-stafford wants to merge 4 commits intomainfrom
retry-downloads
Closed

[DRAFT] Retry downloads#1016
trey-stafford wants to merge 4 commits intomainfrom
retry-downloads

Conversation

@trey-stafford
Copy link
Copy Markdown
Contributor

@trey-stafford trey-stafford commented May 23, 2025

Resolves #600

Pull Request (PR) draft checklist - click to expand
  • Please review our
    contributing documentation
    before getting started.
  • Populate a descriptive title. For example, instead of "Updated README.md", use a
    title such as "Add testing details to the contributor section of the README".
    Example PRs: #763
  • Populate the body of the pull request with:
  • Update CHANGELOG.md with details about your change in a section titled
    ## Unreleased. If such a section does not exist, please create one. Follow
    Common Changelog for your additions.
    Example PRs: #763
  • Update the documentation and/or the README.md with details of changes to the
    earthaccess interface, if any. Consider new environment variables, function names,
    decorators, etc.

Click the "Ready for review" button at the bottom of the "Conversation" tab in GitHub
once these requirements are fulfilled. Don't worry if you see any test failures in
GitHub at this point!

Pull Request (PR) merge checklist - click to expand

Please do your best to complete these requirements! If you need help with any of these
requirements, you can ping the @nsidc/earthaccess-support team in a comment and we
will help you out!

  • Add unit tests for any new features.
  • Apply formatting and linting autofixes. You can add a GitHub comment in this Pull
    Request containing "pre-commit.ci autofix" to automate this.
  • Ensure all automated PR checks (seen at the bottom of the "conversation" tab) pass.
  • Get at least one approving review.

📚 Documentation preview 📚: https://earthaccess--1016.org.readthedocs.build/en/1016/

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 23, 2025

Binder 👈 Launch a binder notebook on this branch for commit e32d112

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit c6e0ecf

Binder 👈 Launch a binder notebook on this branch for commit f7548ca

Copy link
Copy Markdown
Contributor

@chuckwondo chuckwondo left a comment

Choose a reason for hiding this comment

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

@trey-stafford, thanks for picking this up. We can avoid manually implementing retry logic by making use of existing implementations. See #996 (comment)

self._clone_session_in_local_thread(original_session)
session = self.thread_locals.local_thread_session
retries = Retry(total=retries)
session.mount("https://", HTTPAdapter(max_retries=retries))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suspect this is better suited for the code that initializes the session object earthaccess uses, but I'll look into that more closely later.

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.

Yes, this is not the place where you want to add this functionality.

@betolink
Copy link
Copy Markdown
Contributor

betolink commented Sep 5, 2025

Closing in favor of #1074

@betolink betolink closed this Sep 5, 2025
@github-project-automation github-project-automation bot moved this to ✅ Done in earthaccess Mar 3, 2026
@mfisher87 mfisher87 removed this from earthaccess Mar 3, 2026
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.

Implement download retry mechanism

4 participants