MAAP credential broker: retry, a clear error, and no global warnings filter - #61
Merged
Merged
Conversation
…ls can be had; stop silencing every warning
- io_utils._s3fs_from_maap: the broker call is tried 5 times, 10 s apart
(the MAAP API stops answering when hundreds of jobs start together).
- io_utils.get_s3fs: when the broker gave up AND earthaccess has no login
(a DPS worker), raise a RuntimeError naming both, instead of earthaccess's
AttributeError on a NoneType. With an earthaccess login the fallback
still serves.
- ps_scale_for_lat: the module-level warnings.filterwarnings('ignore')
silenced every warning in the importing process, including the one that
carried the broker's error. The function's own warnings (divide by zero
at the pole, all-NaN input) are now silenced where they arise.
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.
Why
On 2026-10-01, 556 ATL14/15 jobs were submitted to MAAP DPS at once. 61 of them failed with
What happened in each: the one call to MAAP's credential broker for NSIDC failed (the fit step sat for a median of 136 s at ~0 CPU first, which matches a connect timeout to the MAAP API),
get_s3fsfell back to earthaccess, and earthaccess has no login on a worker. The warning that carried the broker's actual error was never printed, becauseps_scale_for_lat.pycallswarnings.filterwarnings("ignore")at import, which silences every warning in the process.What changes
io_utils._s3fs_from_maap: the broker call is tried 5 times, 10 s apart (MAAP_BROKER_ATTEMPTS,MAAP_BROKER_PAUSE_S) before giving up.io_utils.get_s3fs: if the broker gave up and the earthaccess fallback also fails, raise aRuntimeErrorthat names both the broker's last error and the earthaccess error. Where earthaccess does have a login (the ADE), the fallback still serves as before. Off MAAP nothing changes.ps_scale_for_lat: the module-level filter is removed. The function's own warnings (divide by zero at the pole, all-NaN input) are silenced where they arise; its values are unchanged.Worth knowing before merging
Tests
tests/test_maap_broker.py(12 tests, no network; stand-ins for maap-py and earthaccess). They fail onmainand pass here. Full suite: 319 passed, 3 skipped.🤖 Generated with Claude Code