Map Analysis continues polling after a background job fails

Đang mở Phù hợp với người mới
#1,211 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@amantebriwal4321 đang làm issue này rồi.

Từ ngày 9/11/2026.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu tại application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx và đọc hiệu ứng polling cùng trình xử lý lỗi của nó. Tái hiện lỗi bằng cách để một tác vụ nền Map Analysis trả về lỗi, sau đó xác nhận ID tác vụ được xóa và quá trình tải kết thúc trong khi lỗi vẫn hiển thị. Thêm kiểm thử hồi quy cho đường đi khi lỗi xảy ra và xác minh polling dừng lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
210
Fork
167
Merge trung bình
4 ngày 12 giờ
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OWASP/OpenCRE

Tất cả issue của OWASP/OpenCRE

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.