Process LSIF document before sending it to GitLab
LSIF document is converted into multiple JSON files and archived as a ZIP file
Related issue: gitlab#212384 (closed)
The following code is used as a library: https://gitlab.com/igor.drozdov/lsif-go-parser. At the moment it has no tags or release, will be done after the approval of the current idea. The library is used to validate the idea. In the future, we'll move this library inside Workhorse if it proves to be an appropriate solution.
Unfortunately, the current solution is a bit tricky. GitLab specifies the format of LSIF report as gzip
and gzip
file is coming to Workhorse as a result. However, Workhorse generates a ZIP file, metadata and sends it to GitLab. Even though the database record for a job artifact says that file is gzip
, the file is actually ZIP. This kind of deceiving I don't like, but haven't found another solution yet. If we instead specify LSIF report as zip
, we'll have to unzip the whole file inside Workhorse instead of streaming using io.Reader
.