Repository navigation
fix(merra2): retry granules that Cloud OPeNDAP transiently 404s - #25
Merged
Merged
Conversation
A full 1980-2025 download lost 7 of 46 years to a single 404 each. Every one of those granules is listed in CMR under the exact name requested, and a rerun fetched each on the first attempt, so the 404s were transient. The downloader treated any 404 as "wrong stream", tried the fallback stream once and gave up on the year. The stream candidates are now cycled three times, with a 2 s pause after each 404, before the granule is reported missing. A granule genuinely published under the fallback stream still succeeds on its second request.
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.
Summary
A full 1980-2025 MERRA-2 download lost 7 of 46 years to a single 404 each. Every one of those granules is listed in CMR under the exact name requested, and a rerun fetched each on the first attempt, so the 404s were transient. The downloader treated any 404 as "wrong stream", tried the fallback stream once and gave up on the year.
Testing
test_primary_stream_retried_after_transient_404fails before the change withNo MERRA-2 stream found for rad 2018-01-01 (tried streams (400, 401))and passes after.test_gives_up_when_granule_never_appearscovers the give-up path.ruff check src/,mypy src: cleanpytest -q: 228 passed