Repository navigation
Retry CMR granule searches on transient errors (429/5xx, no connection) - #64
Merged
Merged
Conversation
earthaccess.search_data raises on the first CMR error. Over 2026-10-13..16, 59 MAAP DPS jobs lost a tile to "502 Bad Gateway" from cmr.earthdata.nasa.gov/search, raised in find_ATL11_granules (38) and tilingSchema.resolve_files_for_box (24), in bursts; every one of those tiles succeeded on its next attempt. io_utils.search_data() retries those errors on the MAAP broker's schedule (10-60 s jittered pauses, 240 s budget), prints one stderr line per retry, and raises anything else -- or the last transient error -- unchanged. Both call sites now use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
earthaccess.search_data raises on the first CMR error. Over 2026-10-13..16, 59 MAAP DPS jobs lost a tile to "502 Bad Gateway" from cmr.earthdata.nasa.gov/search, raised in
find_ATL11_granules(38) andtilingSchema.resolve_files_for_box(24), in bursts (25 jobs in one hour). Every one of those tiles succeeded on its next attempt.io_utils.search_data(**kwargs):earthaccess.search_dataretried on HTTP 429/500/502/503/504 (read from the exception's__cause__, which is how earthaccess wraps them) and requests ConnectionError/Timeout, on the MAAP broker's schedule (10-60 s jittered pauses, 240 s budget, up to 6 tries). One stderr line per retry; anything else, or the last transient error, is raised unchanged.find_ATL11_granulesandresolve_files_for_boxcall it.tests/test_cmr_retry.py(no network). Full suite: 336 passed (network tests deselected); live search through the wrapper returns the same 48 granules as a direct call.Takes effect at the next ATL1415 registration (DPS installs pointCollection from main at build time).
🤖 Generated with Claude Code