Map Analysis continues polling after a background job fails

Aperta Adatta ai principianti
#1,211 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@amantebriwal4321 ci sta già lavorando.

Dal 9/11/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Inizia da application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx e leggi l’effetto di polling e il relativo gestore degli errori. Riproduci il problema facendo restituire un errore a un job in background di Map Analysis, quindi verifica che l’ID del job venga cancellato e il caricamento termini mentre l’errore rimane visibile. Aggiungi un test di regressione per il percorso di errore e verifica che il polling si interrompa.

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

Descrizione

Description

The Map Analysis frontend continues polling /rest/v1/ma_job_results after a background job has reached a terminal failed state.

Steps to reproduce
  1. Open Map Analysis.
  2. Select two standards that require a background calculation.
  3. Wait for the backend to return a job ID.
  4. Allow the background job to fail.
  5. Observe the browser's Network tab.
Actual behaviour
  • The job-results endpoint returns HTTP 500 with background job failed.
  • The frontend displays an error.
  • The polling interval continues requesting the same failed job every 10 seconds.
Expected behaviour

Once a background job reaches a terminal failure state:

  • Polling should stop.
  • The active job ID should be cleared.
  • The loading state should be reset.
  • The error should remain visible to the user.
Suspected cause

In application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx, the polling error handler calls setLoadingGA(false) and setError(...), but does not clear gaJob.

Since the polling effect depends on gaJob, the existing interval remains active after the request fails.

Local reproduction notes

During local testing, the RQ worker picked up a BIML -> ASVS job but failed with:

Pair GA scheduling requires Postgres backend, got sqlite

The resulting /rest/v1/ma_job_results requests returned HTTP 500. This exposed the frontend polling behaviour.

The SQLite/PostgreSQL compatibility issue is separate and is not the bug being reported.

Could a maintainer confirm whether this is worth addressing? I'm happy to investigate and submit a focused fix with regression tests.

Lingua principale
Python
Stelle
210
Fork
167
Merge medio
4g 12h
PR unite (30g)
28

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 OWASP/OpenCRE

Tutte le issue di OWASP/OpenCRE

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.