Skip to content

Add Image Resizer config defaults

Add default Image Resizer config values.
They were added in gitlab-org/gitlab-workhorse!615 (merged).
If (while) they are missing, we are falling back to the same defaults, but in the Workhorse code.

Omnibus MR: gitlab-org/omnibus-gitlab!4639 (merged) CNG MR: gitlab-org/build/CNG!534 (merged)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Test plan

  1. Enable Image Resizing feature: go into task-runner Pod, Run Feature.enable(:dynamic_image_resizing_requester); Feature.enable(:dynamic_image_resizing_owner) in Rails console. Also ensure that Gitlab::Workhorse.version is 8.51.0 (in case you are using the older package).
  2. Verify we're resizing the avatar: login into GL; upload the avatar for your user if it is using the placeholder; open the avatar pic, add ?width=15 to the request; You should see the resized image (mind the browser cache)
  3. Update configs with max_filesize = X, where X is small. I suggest 1 (1kb). The typical avatar is bigger, so the resizer will fallback to the original image.
  4. Apply config changes
  5. Open the avatar with ?width=15 again. Note that the resizing is falling back to default because of too aggressive config: you the original, 200x200 image will be returned, and you will see ImageResizer: 93700b exceeds maximum file size of Xb in the Workhorse logs (where X is the limitation you set on step 3)

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • [-] Documentation created/updated
  • [-] Tests added
  • [-] Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Matthias Käppler

Merge request reports

Loading