Skip to content

Workhorse: prepare for lazy upload preauth

Jacob Vosmaer requested to merge jv-workhorse-mime-lazy into master

In gitlab-com/gl-infra&742 (closed) we are working towards having Workhorse pre-authenticate every upload it processes. This is currently not the case because we use SkipRailsAuthorizer. We want to replace this with a "real" authorizer that makes Rails API calls for every MIME multipart file part.

The current shape of the Workhorse upload code makes this difficult, because it assumes we eagerly call the Rails API. But on catchall routes there usually are no uploaded files so we should only call the API when we need it.

This MR refactors the Workhorse MIME multipart upload code towards a "lazy" design. The actual lazy API calls will follow in a later MR.

gitlab-com/gl-infra/scalability#1719 (closed)

Edited by Jacob Vosmaer

Merge request reports