Skip to content

Isolate LSIF parsing from general upload processing in Workhorse

Jacob Vosmaer requested to merge jv-upload-processors into master

Workhorse has a number of general upload processors that can get triggered for any MIME multipart uploaded file. One of these general processors is the LSIF parser/transformer. However, it turns out that LSIF parsing/transforming only happens for CI artifact uploads.

This MR refactors the upload code so that LSIF parsing/transforming is a special behavior for CI artifacts only. This makes the Workhorse upload processing code less complicated.

While we are here, we also remove the configurable tempdir from the LSIF parser. Configurable tempdirs in Workhorse are used for local file storage uploads: they make atomic renames possible. The tempfiles used by the LSIF parser are never stored directly however so there is no benefit to storing them in a special tempdir. We store them in os.TempDir() now, which is usually /tmp but which can be overridden with the TMPDIR environment variable.

Merge request reports