Map Analysis continues polling after a background job fails

Abierto Apto para principiantes
#1,211 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@amantebriwal4321 ya está trabajando en esto.

Desde el 9/11/2026.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
84/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend

Línea de trabajo

Empieza en application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx y lee el efecto de sondeo y su manejador de errores. Reproduce el fallo haciendo que un trabajo en segundo plano de Map Analysis devuelva un error; luego confirma que se borra el ID del trabajo y que la carga termina mientras el error sigue visible. Añade una prueba de regresión para la ruta de error y verifica que el sondeo se detiene.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
210
Forks
167
Merge medio
4 d 12 h
PR fusionados (30 d)
28

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OWASP/OpenCRE

Todos los issues de OWASP/OpenCRE

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.