503 Service Unavailable due to CMR Payload Too Large

Aperta
#2,771 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
aws, python
Ambito
api, backend

Direzione di ricerca

Start with apps/api/src/hyp3_api/validation.py, especially _get_cmr_metadata and validate_jobs, which the issue identifies as the CMR error and the source of the oversized query. Check how CMR reports a 413 response and how job validation gathers granules. Done means returning a descriptive error for this case and batching CMR queries to stay under its limit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug Jira Bug

Jira: https://asfdaac.atlassian.net/browse/TOOL-3721

Note: The above link is accessible only to members of ASF.


When attempting to submit jobs like:

jobs = sdk.Batch()
for batch in sdk.util.chunk(prepared_jobs):
    jobs += hyp3.submit_prepared_jobs(batch)

I kept getting these errors:

requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://hyp3-jhk-sandbox.asf.alaska.edu/jobs
hyp3_sdk.exceptions.ServiceUnavailableError: <Response [503]> Could not submit jobs due to a CMR error. Please try again later.

However, there was no CMR outage at the time. Looking at the API logs, _get_cmr_metadata is raising this error:

CMR search failed: 413 Client Error: Payload Too Large for url: https://cmr.earthdata.nasa.gov/search/granules.json

Since validate_jobs is gathering all the granules from all the jobs, the payload can exceed the CMR limit.

We should:

  • Return a descriptive error in this case
  • Batch queries to CMR to stay under the limit
Lingua principale
Python
Stelle
53
Fork
13
Merge medio
1g 2h
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ASFHyP3/hyp3

Tutte le issue di ASFHyP3/hyp3

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.