Skip to content

Remove the `upload_middleware_jwt_params_handler` feature flag

🎋 Context

File uploads are sent to the rails backend with parameters that are generated by Workhorse.

How those parameters are encoded in the upload request received by the rails backend has been changed in 13.4. All the nitty gritty details are in !33277 (merged). This change was quite big as it impacted all uploads. It was introduced using a feature flag.

To deploy this change to self-managed users, this feature flag has been enabled by default in 13.5. See !45017 (merged).

Now, after three milestones without any hiccup on the uploads, I think we're safe to remove the feature flag.

The main file that reads those paremeters is multipart.rb. I'd like to point that multipart.rb is heavily tested, including feature tests that will have an inline Workhorse server = the whole ping pong between Workhorse and rails is tested by a spec.

See the tracking issue: #233895 (closed)

👓 What does this MR do?

  • Removes the upload_middleware_jwt_params_handler.
  • Removes the unused multipart.rb inner HandlerXXX class.
  • Removes the unused .from_params function from uploaded_file.rb.
  • Cleans up the spec/support/helpers/multipart_helpers.rb file.
    • I took this opportunity to fix a helper function that was expecting a var mode to be defined. I don't find this great for readability thus, I updated to method signature to have a mode keyword and updated all the calls.
  • Remove the documentation section that provides a guide on how to disable to feature flag to revert back to the old behavior.

A changelog is not needed as it was added when the feature flag was enabled by default. See !45017 (merged).

📺 Screenshots (strongly suggested)

n / a

Does this MR meet the acceptance criteria?

👮 Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by David Fernandez

Merge request reports