feat: Make Python Virtual Environment Persistent: Install Persistent Environment in Computing Unit #5901
feat: Make Python Virtual Environment Persistent: Install Persistent Environment in Computing Unit #5901SarahAsad23 wants to merge 15 commits into
Conversation
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5901 +/- ##
============================================
- Coverage 54.91% 54.56% -0.35%
+ Complexity 2956 2896 -60
============================================
Files 1117 1110 -7
Lines 43133 42951 -182
Branches 4648 4631 -17
============================================
- Hits 23685 23435 -250
- Misses 18054 18145 +91
+ Partials 1394 1371 -23
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
# Conflicts: # frontend/src/app/workspace/component/power-button/computing-unit-selection.component.spec.ts
kunwp1
left a comment
There was a problem hiding this comment.
Left some comments.
In the PR description, please mention that user cannot create a venv anymore from the CU modal.
There was a problem hiding this comment.
Please use a different venv name that follows your new validation check.
| if (!cur) { | ||
| toInstall.push({ name: db.name, versionOp: db.versionOp, version: db.version }); | ||
| } else if ((cur.version ?? "").trim() !== (db.version ?? "").trim()) { | ||
| toDelete.push({ name: cur.name, version: (cur.version ?? "").trim() }); | ||
| toInstall.push({ name: db.name, versionOp: db.versionOp, version: db.version }); | ||
| } |
There was a problem hiding this comment.
I don't understand this part. Is changing a constraint from ==1.26.0 to >=1.26.0 (same number, different operator) treated as no change and not reinstalled? What's the logic behind this decision?
What changes were proposed in this PR?
This PR adds support for installing persistent Python Virtual Environments (PVEs) into a Computing Unit (CU). All PVEs associated with a user are displayed within the CU management interface, allowing users to select and install an environment when it is needed for workflow execution.
When a PVE is installed, the environment is recreated inside the CU using the package information stored in the database. Once installation completes, the environment becomes available for Python UDF execution within that CU.
If a PVE has already been installed in a CU, users may choose to Reinstall it. During reinstallation, the packages currently installed in the CU are compared against the packages stored in the persistent PVE definition, and any missing or updated packages are applied. This allows an existing CU environment to be synchronized with the latest persistent PVE definition without requiring a full reinstall.
Users may also make package changes directly within a CU after installation. These changes remain local to the CU and are not persisted to the PVE stored in the database. A warning message is displayed in the CU management interface to indicate that manual changes made within a CU are not reflected in the persistent PVE definition.
Note: Users can no longer create virtual environments from the CU modal anymore.
Any related issues, documentation, discussions?
Closes #5361.
How was this PR tested?
Tested Manually and test cases in computing-unit-selection.component.spec.
Was this PR authored or co-authored using generative AI tooling?
Co-authored using: Claude Code