fix: relock importers on their own tag, not the bare dependency tag (#11359)

* fix: relock importers on their own tag, not the bare dependency tag

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test: pin the tag of relocks triggered by a changed import

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-09-25 17:32:25 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 53a5cfd17a
commit a1abb36d9f
4 changed files with 73 additions and 14 deletions
+1 -13
View File
@@ -2858,19 +2858,7 @@ async fn create_script_internal<'c>(
tracing::info!("creating script {hash:?} at path {script_path} on workspace {w_id}",);
}
if needs_lock_gen {
let tag = if ns.dedicated_worker.is_some_and(|x| x) {
Some(windmill_common::worker::dedicated_worker_tag(
&w_id, &ns.path,
))
} else if ns.tag.as_ref().is_some_and(|x| x.contains("$args[")) {
None
} else if lang == ScriptLang::Bunnative {
// if a custom tag is set for a bunnative script, this prevents the custom tag to be used for the dependency job
// forcing the bundling to run on a worker with the bun tag
None
} else {
ns.tag
};
let tag = windmill_common::scripts::dependency_job_tag(ns.tag, &lang);
let mut args: HashMap<String, Box<serde_json::value::RawValue>> = HashMap::new();
if let Some(dm) = ns.deployment_message {