mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-29 08:06:46 +00:00
fix: query only the kinds a set holds at an explicit path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bc16634c63
commit
4873dd6bc7
@@ -1862,7 +1862,14 @@ async fn list_runs(ctx: &Ctx<'_>, args: &Value) -> ToolResult {
|
||||
}
|
||||
// A flow's inline steps run at paths under the flow's, so a set's queries name the kind too.
|
||||
let queries: Vec<String> = match (&set, path) {
|
||||
(Some(_), Some(_)) => vec![format!("{query}&job_kinds=script,flow")],
|
||||
(Some(set), Some(path)) => {
|
||||
// Only the kinds the set holds at this path: a script and a flow can share one.
|
||||
let kinds: Vec<&str> = ["script", "flow"]
|
||||
.into_iter()
|
||||
.filter(|kind| set.allows(kind, path))
|
||||
.collect();
|
||||
vec![format!("{query}&job_kinds={}", kinds.join(","))]
|
||||
}
|
||||
(Some(set), None) => set
|
||||
.run_queries()
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user