zalando / zalenium

A flexible and scalable container based Selenium Grid with video recording, live preview, basic auth & dashboard.
https://opensource.zalando.com/zalenium/
Other
2.39k stars 575 forks source link

Zalenium not compatible with Docker 20.10.0 #1215

Open danielvanmil opened 3 years ago

danielvanmil commented 3 years ago

🐛 Bug Report

Zalenium not compatible with Docker 20.10.0. Most likely the cause is the Spotify Docker Client 8.15.0 that is not compatible with Docker 20.10. 0 as the filter feature is deprecated/changed, see changelog https://docs.docker.com/engine/release-notes/#20100 (Remove deprecated “filter” parameter for API v1.41 and up moby/moby#40491)

DockerContainerClient.getLatestDownloadedImage uses the filter function, but now returns all the images because the filter is not applied anymore.

To Reproduce

Expected behavior

Actual behavior

Test script reproducing this issue (when applicable)

Environment

OS: Windows 10, Docker 20.10.0 Zalenium Image Version(s): dosel/zalenium:3.141.59z Docker version: 20.10.0

garmilw commented 3 years ago

I am having a similar issue with Chrome not starting under Zalenium on MacOS 10.15.7 with Docker 20.10.0 installed. This worked prior to my doing the Docker update. Update: found a work around. I had to remove all my docker images, and let them all download again via docker-compose. Doing that let the Chrome image run under Zalenium with Docker 20.10.0

danielvanmil commented 3 years ago

@garmilw: Could be the same issue. problem is that when you install a new docker image Zalenium will use the latest installed image. So when using Docker with multiple images besides Zalenium this will be tricky and not stable.

Possible workaround/solutions:

pearj commented 3 years ago

You could run Zalenium inside kubernetes instead. Then the docker version won’t matter anymore as long as it’s compatible with whatever Kubernetes flavour you choose.

iandeveseleer commented 3 years ago

You could run Zalenium inside kubernetes instead. Then the docker version won’t matter anymore as long as it’s compatible with whatever Kubernetes flavour you choose.

It's not really true. Zalenium depend on fabric8 kubernetes-client 4.1.0 which isn't compatible with K8S versions above 1.9 in theory (but above 1.16 in practice)

pearj commented 3 years ago

@iandeveseleer Ahh yes the fabric8 client is a bit older. I have an installation running on Kubernetes 1.11. What happens after 1.16 which makes it not work? Zalenium doesn’t use anything particularly complex in Kubernetes, creating and deleting pods as well as executing commands in pods (from memory).

iandeveseleer commented 3 years ago

@pearj Some deleted apiVersion are used in communication with Kubernetes, making node containers creation impossible.

iandeveseleer commented 3 years ago

This modification on getLatestDownloadedImage method worked for me, to make Zalenium working with Docker 20.10.X.

getLatestDownloadedImage.txt

dbire commented 3 years ago

@danielvanmil, I have patched src/main/java/de/zalando/ep/zalenium/container/DockerContainerClient.java to its simplest expression and it is fine for my use case. At least I can use zalenium with docker 3.x

public String getLatestDownloadedImage(String imageName) {
        return imageName;
}
danielvanmil commented 3 years ago

@iandeveseleer @dbire : docker images available somewhere?

mkrakowitzer commented 3 years ago

Would be great if one of you could publish an image somewhere. @iandeveseleer @dbire

mkrakowitzer commented 3 years ago

I have created an image with @iandeveseleer patch here: https://hub.docker.com/r/clsplatform/zalanium-patched

It worked for our use case.

komodin commented 3 years ago

Hi, is it in the plans to fix this? It would be great can update to Docker 20, but we're stuck on 19 because of this bug. Thanks

Oktaliem commented 3 years ago

Yeah got that similar problem on Docker 20.10.2

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 53735d86e1d6 sonarqube:latest "bin/run.sh bin/sona
" 8 minutes ago Up 8 minutes 9000/tcp, 40000/tcp, 50000/tcp zaleniumth_FlpUPk

Zalenium took another image e.g. sonarqube instead of elgalu/selenium.

agree with @komodin Downgrade to Docker 19.03.8 and it's fine CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8f5d99789d81 elgalu/selenium:3.141.59-p57 "entry.sh" About a minute ago Up About a minute 40000/tcp, 50000/tcp zaleniumth_5JbdQR

pearj commented 3 years ago

Hi, is it in the plans to fix this? It would be great can update to Docker 20, but we're stuck on 19 because of this bug. Thanks

This project is no longer receiving updates. Feel free to use the workarounds mentioned above.