Skip to content

codeintel: allow listing deleted LSIF uploads reconstructed from audit logs in graphql layer

Warren Gifford requested to merge nsc/deleted-uploads-list-graphql into main

Created by: Strum355

Previously, it was not possible to get the audit logs for deleted uploads via the API, only through Postgres access. This is a hurdle that makes it less likely for site-admins to deal with deeper exploration into explaining upload state-change behaviour, and also for our QA tests.

This PR addresses this by allowing (partial) upload objects to be synthesized from the audit logs for an upload through a custom Postgres aggregation function. We then allow these synthesized uploads to be merged alongside non-deleted uploads in the lsifUploads top-level GraphQL query.

Closes https://github.com/sourcegraph/sourcegraph/issues/38006

Test plan

Created a new entry in the GetUploads test and tested manually. Probably some weird input edge case that was missed but unlikely to occur from our frontend

Merge request reports

Loading