Repository navigation
feat: Add Python Virtual Environment Support: Uninstalling User Defined Packages - #5035
Merged
Merged
Conversation
SarahAsad23
marked this pull request as ready for review
May 12, 2026 22:01
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5035 +/- ##
============================================
- Coverage 42.78% 42.76% -0.03%
Complexity 2199 2199
============================================
Files 1045 1045
Lines 39989 40092 +103
Branches 4220 4232 +12
============================================
+ Hits 17111 17145 +34
- Misses 21817 21884 +67
- Partials 1061 1063 +2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kunwp1
reviewed
May 13, 2026
kunwp1
enabled auto-merge (squash)
May 13, 2026 03:45
…exera into pve-delete-package
auto-merge was automatically disabled
May 13, 2026 04:05
Head branch was pushed to by a user without write access
kunwp1
approved these changes
May 13, 2026
Contributor
|
@SarahAsad23 It will be good to include a screenshot in the description. |
kunwp1
pushed a commit
that referenced
this pull request
May 19, 2026
…ide PVEs (#5069) <!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR is an extension of PR #4484, #4902, and #5035. This PR adds support for running Python UDFs inside user configured Python Virtual Environments. Previously, UDFs executed using the default system environment, which limited dependency isolation and reproducibility across workflows. With this change, users can associate a PVE with a UDF execution environment, allowing workflows to run with custom package installations and environment specific dependencies. ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves #1234` or `Closes #1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> This change is part of ongoing efforts to support environment isolation and reproducibility within Texera. Related issue includes #4296. This PR closes sub-issue #5068 ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested Manually and PveResourceSpec test file updated. To test: - To create a PVE follow directions in PR #4902 - Import necessary packages in UDF code - Select PVE in UDF property panel - Execute workflow ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Co-authored using: ChatGPT (OpenAI)
kunwp1
added a commit
to kunwp1/texera
that referenced
this pull request
May 28, 2026
…ration (apache#5138) <!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR is an extension of PR apache#4484, apache#4902, apache#5035, and apache#5069. It adds Kubernetes gateway routing and access control configurations. ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> This change is part of ongoing efforts to support environment isolation and reproducibility within Texera. Related issue includes apache#4296. This PR closes sub-issue apache#5137. ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested manually and test added to AccessControlResourceSpec. ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Co-authored using: Claude Code (claude-opus-4-7) --------- Co-authored-by: Kunwoo (Chris) <143021053+kunwp1@users.noreply.github.com>
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…ed Packages (apache#5035) <!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR is an extension of PR apache#4484 and apache#4902. Previously, we introduced support for creating Python Virtual Environments (PVEs) with system-level dependencies preinstalled, along with support for installing user-defined packages. This PR extends that functionality by allowing users to uninstall user-installed packages from their PVEs. ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> This change is part of ongoing efforts to support environment isolation and reproducibility within Texera. Related issue includes apache#4296. This PR closes sub-issue apache#4466. ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested Manually and PveResourceSpec test file updated. To test: On CU click "+" Python Environments. Input environment name. Input package name and version. Click "OK" and wait for pip logs. To delete click on "Delete Icon" and click "OK" ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Co-authored using: ChatGPT (OpenAI) --------- Co-authored-by: Kunwoo (Chris) <143021053+kunwp1@users.noreply.github.com>
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…ide PVEs (apache#5069) <!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR is an extension of PR apache#4484, apache#4902, and apache#5035. This PR adds support for running Python UDFs inside user configured Python Virtual Environments. Previously, UDFs executed using the default system environment, which limited dependency isolation and reproducibility across workflows. With this change, users can associate a PVE with a UDF execution environment, allowing workflows to run with custom package installations and environment specific dependencies. ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> This change is part of ongoing efforts to support environment isolation and reproducibility within Texera. Related issue includes apache#4296. This PR closes sub-issue apache#5068 ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested Manually and PveResourceSpec test file updated. To test: - To create a PVE follow directions in PR apache#4902 - Import necessary packages in UDF code - Select PVE in UDF property panel - Execute workflow ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Co-authored using: ChatGPT (OpenAI)
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…ration (apache#5138) <!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR is an extension of PR apache#4484, apache#4902, apache#5035, and apache#5069. It adds Kubernetes gateway routing and access control configurations. ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> This change is part of ongoing efforts to support environment isolation and reproducibility within Texera. Related issue includes apache#4296. This PR closes sub-issue apache#5137. ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested manually and test added to AccessControlResourceSpec. ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> Co-authored using: Claude Code (claude-opus-4-7) --------- Co-authored-by: Kunwoo (Chris) <143021053+kunwp1@users.noreply.github.com>
This was referenced Nov 25, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Nov 26, 2026
### What changes were proposed in this PR? Remove redundant code from the frontend, the licensing scripts, two Scala sources and the agent service (**+26/−41 lines**). There is no behavior change. - **Dataset and model detail pages:** each `route.params` emission was switched to `this.route.data`, and the empty `.subscribe()` threw away what that emitted. The pages now `tap` the params, so the same fetches run in the same order without the extra subscription. The dataset page's `THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and the hub spec import the copy in `hub-workflow-detail.component.ts`, never this one. - **Version uploader:** the abort handler's 404 branch called `done()` and returned, which is what the handler already does for every error it does not retry. Its three constants become file-local: nothing imported `FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two. The spec now states the retry policy it expects. - **Computing-unit actions:** `confirmAndTerminate` reads `unit.computingUnit.uri` and `unit.computingUnit.name` before `unit?.computingUnit.type`, so the `?.` goes. - **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec imported it, and the spec now checks the backend's `"LoopEnd"` name directly. - **Agent interaction:** two imports from `agent.service` become one. - **Licensing scripts:** `audit_jar_licenses.py` stored each group's notice hash in a field that nothing reads, and the NOTICE test helper `make_jar` had an `extra` parameter that no caller passes. - **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers. - **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`. The `_` matches those types as well, so each becomes `case _`. - **`agent-service/.dockerignore`:** Docker reads the ignore file at the root of the build context. CI's image matrix (`build-and-push-images.yml`) and `bin/build-images.sh` both use the repository root as the context, and the agent Dockerfile copies `agent-service/...` paths from there, so the root `.dockerignore` applies and this file is never read. | Event | PR / Commit | | --- | --- | | Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269 (2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05), moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09); loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13); licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10); `PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013 (2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25); `agent-service/.dockerignore`: apache#4495 (2026-04-28) | | Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01) added the agent image's Dockerfile with paths from the repository root, so no build has read the file. Everything else: unused or redundant since introduction. | As of 2026-11-25: - The SQL sources' fallback arms have listed redundant types for over 5 years. - The dataset page's discarded subscription is almost 3 years old. - The version uploader's 404 branch has been redundant for over 10 months. - `agent-service/.dockerignore` has gone unread for almost 7 months. - The duplicate agent import is 12 days old. ### Any related issues, documentation, discussions? Closes apache#9691. ### How was this PR tested? Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24 with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff` 0.14.7; JDK 17): ```bash cd frontend npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.spec.ts' npx tsc --noEmit -p src/tsconfig.app.json npx tsc --noEmit -p src/tsconfig.spec.json yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src) yarn eslint $(git diff --name-only --relative origin/main -- src) cd .. pytest bin/licensing ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py python bin/licensing/audit_jar_licenses.py <directory of 60 jars> sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" ``` - **Frontend:** the six specs run 379 tests, all passing on both sides. Both typechecks, prettier-eslint and ESLint pass. - **Python:** the licensing tests run 53 tests and 5 subtests, all passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints the same report on both sides for 60 jars from the local Coursier cache. - **Scala:** - The 11 `source.sql` suites run 204 tests, all passing on both sides. - The two PVE resource suites run 75 tests on both sides: 74 pass and 1 is canceled. The canceled test needs a file that is not executable, which this Windows filesystem cannot represent. - scalafmt and scalafix pass on both modules. - **`agent-service/.dockerignore`:** no image was built. The build context comes from `context="."` for every `bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from the `..` that `bin/build-images.sh` passes from `bin/`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
This PR is an extension of PR #4484 and #4902. Previously, we introduced support for creating Python Virtual Environments (PVEs) with system-level dependencies preinstalled, along with support for installing user-defined packages. This PR extends that functionality by allowing users to uninstall user-installed packages from their PVEs.
Any related issues, documentation, discussions?
This change is part of ongoing efforts to support environment isolation and reproducibility within Texera. Related issue includes #4296. This PR closes sub-issue #4466.
How was this PR tested?
Tested Manually and PveResourceSpec test file updated.
To test:
On CU click "+" Python Environments.
Input environment name.
Input package name and version.
Click "OK" and wait for pip logs.
To delete click on "Delete Icon" and click "OK"
Was this PR authored or co-authored using generative AI tooling?
Co-authored using: ChatGPT (OpenAI)