Skip to content

fix: handle deleted project gracefully in span ingestion worker#2316

Closed
geclos wants to merge 1 commit intomainfrom
fix/handle-deleted-project-in-span-ingestion
Closed

fix: handle deleted project gracefully in span ingestion worker#2316
geclos wants to merge 1 commit intomainfrom
fix/handle-deleted-project-in-span-ingestion

Conversation

@geclos
Copy link
Collaborator

@geclos geclos commented Feb 17, 2026

Problem

The error NotFoundError: Project not found occurs in CommitsRepository.getCommitByUuid during the ingestSpansJob BullMQ job. This happens when span telemetry references a project that has been deleted, but the ingestion job still tries to process it.

Solution

Added a check after calling commitsRepo.getCommitByUuid() to verify if the result is OK before proceeding. If the result is an error (project not found), the function now returns early gracefully instead of throwing a NotFoundError.

Changes

  • In process function: Added if (!Result.isOk(commitResult)) return commitResult check before calling .unwrap()

This follows the pattern used elsewhere in the codebase (e.g., getResolvedData function).

@geclos geclos marked this pull request as ready for review February 17, 2026 10:17
@geclos geclos closed this Feb 17, 2026
@github-project-automation github-project-automation bot moved this from Inbox to Done in Latitude LLM Roadmap Feb 17, 2026
@geclos geclos deleted the fix/handle-deleted-project-in-span-ingestion branch February 17, 2026 10:18
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant