Skip to content

compute: clamp requests to 1 minute at most

Administrator requested to merge rvt/compute-cancellation into main

Created by: rvantonder

Currently, compute queries can run indefinitely (we seem to have some issue cancelling Zoekt searches after max timeout and also not honoring timeout:XYZ, I will create an issue). This PR clamps the streaming HTTP request handler by 1 minute so that I can sleep easier at night if people decide to run some ridiculous thing on Sourcegraph.com. In time it would be nice to expose this as a configurable option, there's definitely some cool things you can do if you let things run longer than a minute (build up data sets or models of stuff, for example. more code mining than anything else).

Test plan

Tested manually for compute in notebooks

Merge request reports

Loading