You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
People have experienced problems running the test suites of Content Publisher and Whitehall (I'm not aware of other apps but there could be more) using govuk-docker. It transpires this issue is a problem with the Linux kernel, in particular the version that Docker-for-mac is using currently (on my machine it's 5.10.47-linuxkit) but I'm recording this here so the GOV.UK issue is documented and can be tracked to a degree.
The evidence of the problem is tests that fail like so:
MiniMagick::Invalid:
`identify /tmp/mini_magick20211206-1-7orhba.jpg` failed with error:
identify-im6.q16: insufficient image data in file `/tmp/mini_magick20211206-1-7orhba.jpg' @ error/jpeg.c/ReadJPEGImage_/1166.
or
Error:
ImageUploaderTest#test_should_store_all_the_versions_of_a_bitmap_image_in_asset_manager:
CarrierWave::ProcessingError: Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: `convert /govuk/whitehall/tmp/1321009871-957757668381030-0168-8098/s960/minister-of-funk.960x640.jpg -auto-orient -resize 960x640^ -gravity Center -background rgba(255,255,255,0.0) -extent 960x640 /tmp/image_processing20111111-428-11fn1kn.jpg` failed with error:
convert-im6.q16: insufficient image data in file `/govuk/whitehall/tmp/1321009871-957757668381030-0168-8098/s960/minister-of-funk.960x640.jpg' @ error/jpeg.c/ReadJPEGImage_/1166.
convert-im6.q16: no images defined `/tmp/image_processing20111111-428-11fn1kn.jpg' @ error/convert.c/ConvertImageCommand/3229.
The source of the issue is a relatively obscure set of circumstances: a file is stored on a docker mount (i.e. a test fixture), it is then copied to be a temporary file (i.e. a test faking the upload of a file) and then is copied again (i.e copying the uploaded file for processing).
The issue is discussed (at length) in: docker/for-linux#1015. It looks like versions of Linux Kernel > 5.10 are fixed and it appears that a backported fix for 5.10 is imminent, however it's completely unclear how long it will take for any fixes to make their way into a Docker-for-mac releases.
The two options I see ahead of us for this are:
Wait it out, expect that a future release of Docker Desktop for mac resolves it
Refactor test code that is affected by this issue to no longer be affected by the circumstances - there seems to be some examples based off the issue
By default, we're effectively doing 1) now - I imagine if this issue continues for multiple months we may switch to taking 2)
The text was updated successfully, but these errors were encountered:
This commit is a workaround for the issue #537. It allows the Content Publisher and Whitehall test suites to pass in the GOV.UK Docker development environment.
Once docker/for-linux#1015 has been fixed, this workaround will no longer be needed.
People have experienced problems running the test suites of Content Publisher and Whitehall (I'm not aware of other apps but there could be more) using govuk-docker. It transpires this issue is a problem with the Linux kernel, in particular the version that Docker-for-mac is using currently (on my machine it's
5.10.47-linuxkit
) but I'm recording this here so the GOV.UK issue is documented and can be tracked to a degree.The evidence of the problem is tests that fail like so:
or
The source of the issue is a relatively obscure set of circumstances: a file is stored on a docker mount (i.e. a test fixture), it is then copied to be a temporary file (i.e. a test faking the upload of a file) and then is copied again (i.e copying the uploaded file for processing).
The issue is discussed (at length) in: docker/for-linux#1015. It looks like versions of Linux Kernel > 5.10 are fixed and it appears that a backported fix for 5.10 is imminent, however it's completely unclear how long it will take for any fixes to make their way into a Docker-for-mac releases.
The two options I see ahead of us for this are:
By default, we're effectively doing 1) now - I imagine if this issue continues for multiple months we may switch to taking 2)
The text was updated successfully, but these errors were encountered: