Skip to content

Fix uploads in CI becoming empty files

Heinrich Lee Yu requested to merge 346825-fix-uploads-in-docker into master

What does this MR do and why?

This is a workaround for a Docker bug where copying temp files result in an empty file: https://github.com/docker/for-linux/issues/1015. This causes all upload-related specs to fail.

This patches Rack::Test::UploadedFile because this creates a Tempfile that is then copied by Carrierwave to the file storage path which triggers the bug.

How to set up and validate locally

Using GCK, run:

bin/rspec ee/spec/services/projects/update_pages_service_spec.rb:31

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346825 (closed)

Edited by Heinrich Lee Yu

Merge request reports

Loading