codeintel: API docs: wrap upload handling in a panic handler
Created by: slimsag
WriteDocumentationPages
is by far the most complex code path in the API docs
logic, and it relies on a lot of concurrency / channels logic which is itself
even more complex (see group_documentation.go
).
It stands to reason that the biggest risk API docs could impose would be a bug failing to handle a specific LSIF bundle or similar. In this situation, I'd really rather not fail the entire LSIF upload. It'd be better if only API docs failed.
This achieves that by adding a panic handler for that code.
This prevents issues like https://github.com/sourcegraph/sourcegraph/issues/26218#issuecomment-946053814 from impacting LSIF uploads.
Signed-off-by: Stephen Gutekanst [email protected]