From ec552d5ef6fdb5e824e453f196f9cf16629ee2ea Mon Sep 17 00:00:00 2001 From: pyranota <92104930+pyranota@users.noreply.github.com> Date: Fri, 6 Jun 2025 19:49:59 +0200 Subject: [PATCH] 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 --- backend/windmill-worker/src/worker_lockfiles.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/backend/windmill-worker/src/worker_lockfiles.rs b/backend/windmill-worker/src/worker_lockfiles.rs index 9dd021d26f..33c0375f09 100644 --- a/backend/windmill-worker/src/worker_lockfiles.rs +++ b/backend/windmill-worker/src/worker_lockfiles.rs @@ -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![];