Compare commits

...

5 Commits

Author SHA1 Message Date
pyranota
fd838fd982 Merge branch 'main' into fix-no-uv-fallback 2024-12-09 19:01:42 +01:00
pyranota
1106f72daa Merge branch 'main' into fix-no-uv-fallback 2024-12-09 18:32:14 +01:00
Alexander Petric
484a612017 Merge branch 'main' into fix-no-uv-fallback 2024-12-04 10:44:50 -05:00
pyranota
dac4dcee75 Make it build 2024-12-04 16:38:23 +01:00
pyranota
5c266fb102 fix no_uv not affecting deploy
Before this fix no_uv, no_uv_compile and no_uv_install were not affecting Dependency jobs

These jobs are only affected if used USE_PIP_COMPILE or USE_PIP_INSTALL env variables

To make it more consistant, no_uv should also affect dep jobs.

Also make ansible use uv by default
2024-12-04 15:50:52 +01:00
2 changed files with 13 additions and 5 deletions

View File

@@ -116,8 +116,8 @@ async fn handle_ansible_python_deps(
job_dir,
worker_dir,
&mut Some(occupancy_metrics),
true,
true,
false,
false,
)
.await?;
additional_python_paths.append(&mut venv_path);

View File

@@ -13,7 +13,7 @@ use windmill_common::flows::{FlowModule, FlowModuleValue, FlowNodeId};
use windmill_common::get_latest_deployed_hash_for_path;
use windmill_common::jobs::JobPayload;
use windmill_common::scripts::ScriptHash;
use windmill_common::worker::{to_raw_value, to_raw_value_owned, write_file};
use windmill_common::worker::{to_raw_value, to_raw_value_owned, write_file, PythonAnnotations};
use windmill_common::{
apps::AppScriptId,
error::{self, to_anyhow},
@@ -1567,6 +1567,8 @@ async fn python_dep(
w_id: &str,
worker_dir: &str,
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
no_uv_compile: bool,
no_uv_install: bool,
) -> std::result::Result<String, Error> {
create_dependencies_dir(job_dir).await;
let req: std::result::Result<String, Error> = uv_pip_compile(
@@ -1579,7 +1581,7 @@ async fn python_dep(
worker_name,
w_id,
occupancy_metrics,
false,
no_uv_compile,
false,
)
.await;
@@ -1596,7 +1598,7 @@ async fn python_dep(
job_dir,
worker_dir,
occupancy_metrics,
false,
no_uv_install,
false,
)
.await;
@@ -1647,6 +1649,8 @@ async fn capture_dependency_job(
.join("\n")
};
let PythonAnnotations { no_uv, no_uv_install, no_uv_compile, .. } =
PythonAnnotations::parse(job_raw_code);
python_dep(
reqs,
job_id,
@@ -1658,6 +1662,8 @@ async fn capture_dependency_job(
w_id,
worker_dir,
&mut Some(occupancy_metrics),
no_uv_compile | no_uv,
no_uv_install | no_uv,
)
.await
}
@@ -1681,6 +1687,8 @@ async fn capture_dependency_job(
w_id,
worker_dir,
&mut Some(occupancy_metrics),
false,
false,
)
.await
}