fix(python): account instance version when cli deploy and local lockfile (#5894)

* fix: do not ignore instance python version with cli deploy and local lockfile

* ellipsis
This commit is contained in:
pyranota
2025-06-06 19:49:59 +02:00
committed by GitHub
parent 3c3fdbdf26
commit ec552d5ef6

View File

@@ -1965,12 +1965,11 @@ async fn ansible_dep(
use windmill_parser_yaml::add_versions_to_requirements_yaml;
use crate::ansible_executor::{
create_ansible_cfg, get_collection_locks, get_git_ssh_cmd, get_role_locks,
install_galaxy_collections,
};
create_ansible_cfg, get_collection_locks, get_git_ssh_cmd, get_role_locks,
install_galaxy_collections,
};
use windmill_common::client::AuthedClient;
let python_lockfile = python_dep(
reqs.python_reqs.join("\n").to_string(),
job_id,
@@ -2102,7 +2101,12 @@ async fn capture_dependency_job(
(
job_raw_code.to_owned(),
crate::PyV::parse_from_requirements(&split_requirements(job_raw_code)),
match crate::PyV::try_parse_from_requirements(&split_requirements(
job_raw_code,
)) {
Some(pyv) => pyv,
None => crate::PyV::gravitational_version(job_id, w_id, None).await,
},
)
} else {
let mut version_specifiers = vec![];