-
-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New tox-docker >= 5.0.0 fails docker depending tests results in connectionRefused errors #2015
Comments
I see some of the latest pull request with failing the integration tests. To me it looks like that those failures are related to this issue. |
Hey @FrankK-1234 , thank you for reporting. Unfortunately the best outcome we have right now is to limit upgrading to the buggy versions until additional packages upgrades accordingly. Edit: |
Hey @Nusnus thanks for your response. Are you sure this is the same issue? The tox-docker change (>=5.0.0) clearly states the ports is not supported anymore. The output seen in recent pull request (fails on integration with docker use) show the same error i investigated. Reverting to tox-docker prior to 5.0.0 resolved my test cases. I did not had to mingle with requests nor docker. I suppose the connectionRefused error is caused by the fact the docker does not listen anymore on the fixed mapped port. Perhaps there are multiple isues causing problems. Could you have a second look? Thanx in advance, Frank |
I see the tox-docker is now limited to <=4.1 (by #2011) which will indeed solve the issue. Closing this issue. |
HI all,
I was testing using tox and somehow docker related test failed with a connectionRefused. After some investigation I figured it was because of the port assignments. They looked like this:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c51939bd3f05 01887177def0 "docker-entrypoint.s…" 29 seconds ago Up 28 seconds (healthy) 0.0.0.0:32784->4369/tcp, :::32784->4369/tcp, 0.0.0.0:32783->5671/tcp, :::32783->5671/tcp, 0.0.0.0:32782->5672/tcp, :::32782->5672/tcp, 0.0.0.0:32781->15691/tcp, :::32781->15691/tcp, 0.0.0.0:32780->15692/tcp, :::32780->15692/tcp, 0.0.0.0:32779->25672/tcp, :::32779->25672/tcp rabbitmq-tox-88338
But they should look like this, basically port 5672 could was not mapped and could not be reached:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6b5aed859997 01887177def0 "docker-entrypoint.s…" 5 seconds ago Up 4 seconds (health: starting) 4369/tcp, 5671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp rabbitmq-tox-113404
The issue seems to be related with a none backwards compatible change in tox-docker release > 5.0.0 (released recently on 25-05-2024) . The support of ports parameter in the docker section of tox.ini has been removed. See release history and upgrade/changelog. This mentions the removal of the ports command and suggest that the ability to map is removed. See following snapshot
The workaround which worked for me was to llimit the installed tox-docker version within tox.ini as follows:
requires = tox-docker>=3.0,tox-docker<5.0
The above installed tox-docker 4.1.0 which worked again.
I'm not sure how to use the new expose and environment variable within tox and testscripts, it seems like they basically have to connect a random (stored in env) port rather than a fixed port now. I might be missing somehting here? It is not clear to me why this fixed port assignement was removed.
Any thoughts on this? Perhaps sticking to the old version is the cheapest approach.
Regards,
Frank
The text was updated successfully, but these errors were encountered: