Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-13669

Install Python wheel and dependencies to local venv in SDK harness

Details

    • Improvement
    • Status: Open
    • P1
    • Resolution: Unresolved
    • 2.35.0
    • None
    • sdk-py-harness

    Description

      With the --setup-file option, the Python SDK harness compiles and installs a wheel and its package dependencies on the taskmanager SDK sidecar containers. Unfortunately, this installation is global and persistent, so consecutive job submissions will reuse the previously installed wheel instead of reinstalling or updating it. This makes it impossible to submit updated code (beyond the main .py file, which will always be fresh) without deleting and recreating all taskmanager containers. It also messes with dependencies of other jobs and can cause inconsistencies or errors that are extremely hard to debug.

      Suggestion: Create a temporary venv per job, install packages there, delete venv after job completion or failure.

      Fixes: Stale or conflicting dependencies in persistent SDK containers. Pip will not reinstall existing packages by default, even if their version numbers differ and the number of installed dependency packages grows unnecessarily over time. There is also no point in keeping the --setup-file wheel installed for all eternity.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              phoerious Janek Bevendorff
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: