Extract PveResolver from web's PveManager into common/config
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Task Summary
`PythonWorkflowWorker` (in `amber/src/main/scala/org/apache/texera/amber/engine/architecture/pythonworker/`) calls `PveManager.getPythonBin(cuid, pveName)` to resolve the Python interpreter path for a workflow's Python venv. `PveManager` lives under `amber/src/main/scala/org/apache/texera/web/resource/pythonvirtualenvironment/` — i.e. the engine reaches into the web layer for a pure utility computation.
The `getPythonBin` body is just regex validation, path construction, and a file-existence check. No web concerns. Move it (with its companion bits — `SafePveName.pattern`, `VenvRoot`, `pythonBinPath`) to `common/config/src/main/scala/org/apache/texera/amber/util/PveResolver.scala` so both engine and web depend on a shared util instead of engine depending on a web resource.
`PveManager`'s REST surface stays in web; its body delegates to the new `PveResolver`.
Part of #5424.
### Task Type
- [x] Refactor / Cleanup
Contributor guide
Assessment
This issue has not been assessed yet.