ni / grpc-labview

gRPC client and server support for LabVIEW
MIT License
91 stars 62 forks source link

Repo should be pinning Python dependencies used for running tests #382

Open jasonmreding opened 2 months ago

jasonmreding commented 2 months ago

The build_release_artifacts github action utilizes grpc clients via Python to test grpc-labview generated server code from a proto file. It does this by installing a Python virtual environment via the CreatePythonVirtualEnv.bat file. However, this batch file doesn't specify specific versions of packages to install. As a result, it will always install the latest versions which can result in regression failures which are unrelated to the PR being submitted. This happened when trying to submit #377, and took considerable time to diagnose. Rather than always installing the latest dependencies, we should really be using Poetry projects to manage dependencies and using Poetry to install which will automatically create the venv. For an example of other NI repos that do this, see here.

For now, the batch file has been updated to pin the version for the problematic dependency. This change should be reverted once this issue is fixed.

AB#2856073

jasonmreding commented 2 months ago

See https://github.com/grpc/grpc/issues/37707 for grpcio-tools bug.

yash-ni commented 2 months ago

Sure @jasonmreding. This has been on my mind for a while now. I'll update it shortly.

bkeryan commented 2 months ago

Note that by default, Poetry creates venvs in a per-user cache directory. To create venvs in the project directory, use the virtualenvs.in-project setting in poetry.toml (not pyproject.toml). Example: https://github.com/ni/measurement-plugin-python/blob/main/packages/service/poetry.toml