From a48edf435fb1df876c8012bf49a4c4265847d10e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 20 Jul 2023 08:32:44 +0200 Subject: [PATCH] fix: handle pip requirements to git commits --- backend/windmill-worker/src/python_executor.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/windmill-worker/src/python_executor.rs b/backend/windmill-worker/src/python_executor.rs index 7f1becd45c..61aee4d22e 100644 --- a/backend/windmill-worker/src/python_executor.rs +++ b/backend/windmill-worker/src/python_executor.rs @@ -219,7 +219,6 @@ pub async fn handle_python_job( .await?; } logs.push_str("\n\n--- PYTHON CODE EXECUTION ---\n"); - set_logs(logs, &job.id, db).await; let relative_imports = RELATIVE_IMPORT_REGEX.is_match(&inner_content); @@ -514,7 +513,10 @@ pub async fn handle_python_reqs( for req in requirements { // todo: handle many reqs - let venv_p = format!("{PIP_CACHE_DIR}/{req}"); + let venv_p = format!( + "{PIP_CACHE_DIR}/{}", + req.replace(' ', "").replace('/', "").replace(':', "") + ); if metadata(&venv_p).await.is_ok() { req_paths.push(venv_p); continue;