vdk-plugins: fix build of multiple plugins #2445
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were overall 3 issues that needed to be fixed in the build of those plugins:
The first one is 2.0 major release of pytest-docker (https://pypi.org/project/pytest-docker/#history) which we use for starting docker container in some plugin tests . This impacted us because
docker-compose
todocker compose
(no dash)docker-compose
command (with a dash)--
The other problematic library is the installation of docker-compose itself :).
docker-compose depends on PyYaml and PyYAML is having the following issue: yaml/pyyaml#724 (in short a recent release of Cython 3.0 broke PyYAML)
As a workaround, we can pin
PyYAML==5.3.1
And also remove eager (transitive) upgrades when installing the package with pip to reduce the chance of accidentally upgrading it.--
Finally removed all non- testing dependencies from requirements.txt. In one of the plugin was failing to install because it was missing install requirements in setup.py and was not caught during testing because requirements.txt was installing that dependency.
An alternative approach to fix it might have been to switch to use testcontainer (like vdk-trino uses) instead of pytest-docker + docker-compose. But that would require refactoring of the tests so I opted out for now.