Skip to content

feat: Gracefully handle reference ingestion failures

Edouard Legoupil requested to merge feature/graceful-reference-ingestion into main_dev

Created by: Edouard-Legoupil

This change introduces a more robust and user-friendly way to handle failures during the reference ingestion process for knowledge cards.

Previously, if a reference could not be ingested, the process would fail without a clear path for the user to resolve the issue.

This commit implements the following improvements:

  • Graceful Error Handling: The backend now catches ingestion errors, logs them, and updates the reference's status to 'error' in the database instead of failing the entire process.

  • Manual PDF Upload: The frontend now displays a clickable 'error' badge for failed references. Clicking this badge opens a modal allowing the user to manually upload the correct PDF for that reference.

  • Single Reference Re-ingestion: New backend endpoints have been added to handle the PDF upload and trigger a re-ingestion for only the specific reference that was updated, making the process more efficient.

  • Real-time UI Updates: The frontend now uses Server-Sent Events (SSE) to monitor the re-ingestion progress and update the UI in real-time without requiring a page reload.

  • Improved Testing: Added a new test case for the PDF upload functionality and fixed a pre-existing issue in the test suite to ensure all tests pass.

  • Does my code meet the quality standards for releasing packages?

  • Does the reviewer have all the information to validate the features/issues without too much research?

  • Does the customer who will validate the associated tickets have the information to do so without wasting time?

Issues to validate to close :

  • issue #

Processed issues to keep open or in progress:

  • issue #

Checklist:

  • Does the package check go local?
  • Does the CI pass?
  • Are the added / fixed features documented, tested?
  • Are the added features / solved problems briefly presented in the PR message?
  • Are the changes related to tickets / issues that I have listed in the commits and in the PR itself?
  • Are the tickets in "review" mode in the Project Tracking Board?
  • Does each ticket, if it is to be closed after acceptance of the PR, contain a comment that tells how to validate it?

Merge request reports

Loading