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

Isolate job's requirements #280

Open
iszulcdeepsense opened this issue Jul 14, 2023 · 0 comments
Open

Isolate job's requirements #280

iszulcdeepsense opened this issue Jul 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@iszulcdeepsense
Copy link
Collaborator

iszulcdeepsense commented Jul 14, 2023

A job runs a single Python interpreter process that contains 2 codebases:

  • wrapper code (handling http, metrics, swagerUI, etc)
  • actual job's logic

Each of them have its third-party dependencies installed with pip install -r requirements.txt.
That raises a risk of conflicting packages.
Although they are installed in 2 different virtual environments, they're still running in the same single Python process that makes it impossible to load 2 different versions of the same package at the same time.
For instance, if wrapper code relies on fastapi==0.100.0, but the job depends on fastapi==0.90.0, there might be the clash, cause the wrapper's library takes precedence when loading modules in Python and the job will use fastapi==0.90.0

I see the only good way out of here: Wrapper code shouldn't have any third-party dependency (that could be overwritten or conflicted by a job). Then, there won't be any conflict. It can either implement the necessary logic on its own or use "forked" versions of libraries (eg. FastAPI renamed to fastapi_racetrack package).

This task has a low priority as it rarely happens to break something (but when it does, it's astonishing and hard to find).

@iszulcdeepsense iszulcdeepsense changed the title Better job's requirements isolation Isolate job's requirements Jul 14, 2023
@iszulcdeepsense iszulcdeepsense added the enhancement New feature or request label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant