mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix: hash long dedicated worker tags (#7914)
* fix: hash long dedicated worker tags * Update frontend/src/lib/components/dedicated_worker.ts Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,10 @@ use windmill_api_auth::{
|
||||
check_scopes, maybe_refresh_folders, require_owner_of_path, ApiAuthed,
|
||||
};
|
||||
use windmill_common::{
|
||||
utils::{BulkDeleteRequest, WithStarredInfoQuery, HTTP_CLIENT}, webhook::{WebhookMessage, WebhookShared}, workspaces::{check_user_against_rule, ProtectionRuleKind, RuleCheckResult}, DB
|
||||
utils::{BulkDeleteRequest, WithStarredInfoQuery, HTTP_CLIENT},
|
||||
webhook::{WebhookMessage, WebhookShared},
|
||||
workspaces::{check_user_against_rule, ProtectionRuleKind, RuleCheckResult},
|
||||
DB,
|
||||
};
|
||||
use windmill_queue::schedule::clear_schedule;
|
||||
|
||||
@@ -859,10 +862,13 @@ async fn create_script_internal<'c>(
|
||||
}
|
||||
};
|
||||
|
||||
let runnable_settings_handle = windmill_common::runnable_settings::insert_rs(RunnableSettings {
|
||||
debouncing_settings: ns.debouncing_settings.insert_cached(&db).await?,
|
||||
concurrency_settings: ns.concurrency_settings.insert_cached(&db).await?,
|
||||
}, &db)
|
||||
let runnable_settings_handle = windmill_common::runnable_settings::insert_rs(
|
||||
RunnableSettings {
|
||||
debouncing_settings: ns.debouncing_settings.insert_cached(&db).await?,
|
||||
concurrency_settings: ns.concurrency_settings.insert_cached(&db).await?,
|
||||
},
|
||||
&db,
|
||||
)
|
||||
.await?;
|
||||
|
||||
let (
|
||||
@@ -1072,7 +1078,9 @@ async fn create_script_internal<'c>(
|
||||
}
|
||||
if needs_lock_gen {
|
||||
let tag = if ns.dedicated_worker.is_some_and(|x| x) {
|
||||
Some(format!("{}:{}", &w_id, &ns.path,))
|
||||
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 {
|
||||
@@ -1839,7 +1847,9 @@ async fn get_script_by_hash(
|
||||
|
||||
tx.commit().await?;
|
||||
|
||||
Ok(Json(windmill_common::scripts::prefetch_cached_script_with_starred(r, &db).await?))
|
||||
Ok(Json(
|
||||
windmill_common::scripts::prefetch_cached_script_with_starred(r, &db).await?,
|
||||
))
|
||||
}
|
||||
|
||||
async fn raw_script_by_hash(
|
||||
@@ -2042,7 +2052,9 @@ async fn archive_script_by_hash(
|
||||
WebhookMessage::DeleteScript { workspace: w_id, hash: hash.to_string() },
|
||||
);
|
||||
|
||||
Ok(Json(windmill_common::scripts::prefetch_cached_script(script, &db).await?))
|
||||
Ok(Json(
|
||||
windmill_common::scripts::prefetch_cached_script(script, &db).await?,
|
||||
))
|
||||
}
|
||||
|
||||
async fn delete_script_by_hash(
|
||||
@@ -2097,7 +2109,9 @@ async fn delete_script_by_hash(
|
||||
WebhookMessage::DeleteScript { workspace: w_id, hash: hash.to_string() },
|
||||
);
|
||||
|
||||
Ok(Json(windmill_common::scripts::prefetch_cached_script(script, &db).await?))
|
||||
Ok(Json(
|
||||
windmill_common::scripts::prefetch_cached_script(script, &db).await?,
|
||||
))
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user