Skip to content
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

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

Open
jasonmreding opened this issue Sep 12, 2024 · 3 comments
Open

Comments

@jasonmreding
Copy link
Collaborator

jasonmreding commented Sep 12, 2024

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
Copy link
Collaborator Author

See grpc/grpc#37707 for grpcio-tools bug.

@yash-ni
Copy link
Collaborator

yash-ni commented Sep 13, 2024

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

@bkeryan
Copy link
Collaborator

bkeryan commented Sep 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants