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

Virtualenv issues when queueing jobs #167

Open
jrs65 opened this issue Mar 30, 2021 · 2 comments
Open

Virtualenv issues when queueing jobs #167

jrs65 opened this issue Mar 30, 2021 · 2 comments

Comments

@jrs65
Copy link
Contributor

jrs65 commented Mar 30, 2021

If you submit a job while in one virtual environment to run in a different environment (via the venv key) it will run the linter against the first one even though it should be running against the second one.

@anjakefala anjakefala self-assigned this Mar 30, 2021
@ljgray ljgray assigned ljgray and unassigned anjakefala Jan 31, 2023
@ljgray
Copy link
Contributor

ljgray commented Jan 31, 2023

https://bugs.python.org/issue46473
python/importlib_metadata#364

Basically, importlib import_module ignores any egg-link files, so any of our modules which are linked that way won't be checked and importlib will fall back to the active venv path. Explicitly adding the code directories (i.e. ../code/ch_pipeline) gets past this issue, but really we just need to modify how some of our packages are installed to avoid egg-link files in the venv site-packages.

As far as I can tell, only ch_pipeline and the various chimedb packages use egg-link files.

@ljgray
Copy link
Contributor

ljgray commented Jan 31, 2023

It seems like the logging uses class names from the current active venv rather than the venv that we're running the pipeline in. For example, if we have class1 in the venv we want to use, and in the active venv we've renamed it class2 and aliased class1 = class2, logs will display class2 even though that doesn't exist in the venv we're running in.

@ljgray ljgray removed their assignment Aug 1, 2024
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