buildbot / buildbot

Python-based continuous integration testing framework; your pull requests are more than welcome!
https://www.buildbot.net
GNU General Public License v2.0
5.25k stars 1.63k forks source link

Buildbot 4.0.2 has broken docker-py version check #7915

Open cmouse opened 2 months ago

cmouse commented 2 months ago

Line https://github.com/buildbot/buildbot/blob/44928c0a0189efc6ff4aedc4926a0c92ad086644/master/buildbot/worker/docker.py#L151 seems not to work with docker-py 7.1.0, which is compatible with buildbot. The version detection does not seem to work. Removing this check enables buildbot to work though.

Buildbot version 4.0.2

mokibit commented 1 week ago

Hi @cmouse, Thanks for opening an issue. I ran the code on Buildbot (both master and version 4.0.x) and Python alone. It seems to work with expected values: docker_py_version: 7.0.0 and 7.1.0, and result of parse_version("4.0.0") compared with docker version equals to False (as expected).

Could you print the relevant variables in your system (outside of the class DockerLatentWorker), to see what causes the problem? Example: print("docker_py_version = ", docker_py_version) print("parse_version 4 = ", parse_version("4.0.0")) print(docker_py_version < parse_version("4.0.0"))