guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 119 forks source link

use testcontainers directly instead of docker-testkit #4241

Closed andrew-nowak closed 2 weeks ago

andrew-nowak commented 5 months ago

What does this change?

@Conalb97 raised that docker-testkit has some sort of incompatibility with M1 macs on certain JDKs. docker-testkit isn't receiving maintenance updates, and neither is the underlying docker client, so this is a good opportunity to replace it with a direct usage of testcontainers (mainly taking inspiration from Ophan https://github.com/guardian/ophan/blob/2ecb80da40915ce097e4a1de0e29b352b396323e/shared-lib/src/test/scala/app/BaseElasticTest.scala#L153 though we share the container between the tests, instead of a container per test, for a mild performance boost)

github-actions[bot] commented 5 months ago

Deploy build 12528 to TEST

All deployment options - [Deploy build 12528 to TEST](https://riffraff.gutools.co.uk/deployment/deployAgain?project=media-service%3A%3Agrid%3A%3Aall&build=12528&stage=TEST&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 12528 to TEST by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=media-service%3A%3Agrid%3A%3Aall&build=12528&stage=TEST&updateStrategy=MostlyHarmless)

From guardian/actions-riff-raff.

AndyKilmory commented 3 weeks ago

I can see nothing that would present a problem for BBC devs. Thanks

davidfurey commented 2 weeks ago

I had a similar issue with path-manager, which I fixed in https://github.com/guardian/path-manager/pull/61 by adding an explicit dependency on a newer version of jnr-unixsocket

andrew-nowak commented 2 weeks ago

I had a similar issue with path-manager, which I fixed in guardian/path-manager#61 by adding an explicit dependency on a newer version of jnr-unixsocket

Thanks that's a good find! However the docker lib is still unmaintained and these sorts of problems are gonna continue ramping up - so I think it's still worth replacing with the fresher/slimmer lib

davidfurey commented 2 weeks ago

I had a similar issue with path-manager, which I fixed in guardian/path-manager#61 by adding an explicit dependency on a newer version of jnr-unixsocket

Thanks that's a good find! However the docker lib is still unmaintained and these sorts of problems are gonna continue ramping up - so I think it's still worth replacing with the fresher/slimmer lib

Seems reasonable. If you were feeling keen and wanted to apply the same approach to path-manager, I'd be very grateful.

prout-bot commented 2 weeks ago

Seen on auth, usage, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (merged by @andrew-nowak 9 minutes and 36 seconds ago) Please check your changes!

prout-bot commented 2 weeks ago

Seen on image-loader (merged by @andrew-nowak 9 minutes and 48 seconds ago) Please check your changes!