windmill-labs/windmill · error · Error
dynamic `// partitioned` script(s) need an explicit partitio
Error message
dynamic `// partitioned` script(s) need an explicit partition for a local run: ${unresolvable.sort().join(", ")} — pass --partition <value>. What it means
Partition guard in the pipeline run command's local mode: dynamic // partitioned scripts derive their partition argument at run start (the backend resolves it when deployed), but a --local run executes from local files where no such resolution exists. The message lists every partitioned script that couldn't get a value (none came from --partition). The missing input is an explicit --partition value.
Source
Thrown at cli/src/commands/pipeline/pipeline.ts:900
// arg is only injected when `--partition` is given (an explicit backfill).
const partitionKindByPath = new Map(
graph.runnables
.filter((r) => r.usage_kind === "script" && r.partition_kind)
.map((r) => [r.path, r.partition_kind!]),
);
const partitionValueFor = (nodePath: string): string | undefined => {
const kind = partitionKindByPath.get(nodePath);
if (!kind) return undefined;
if (opts.partition) return opts.partition;
if (!opts.local) return undefined; // deployed: backend resolves at run start
return defaultPartitionValue(kind);
};
if (opts.local && !opts.partition) {
const unresolvable = order.filter(
(p) => partitionKindByPath.get(p) === "dynamic",
);
if (unresolvable.length > 0) {
throw new Error(
`dynamic \`// partitioned\` script(s) need an explicit partition for a local run: ${unresolvable.sort().join(", ")} — pass --partition <value>.`,
);
}
}
// A `--upload` whose script fell outside the selection is a no-op the user
// should know about, rather than silently ignored.
const orderSet = new Set(order);
const boundInOrder = [...boundBindingsByPath.keys()].filter((p) => orderSet.has(p)).sort();
for (const p of boundBindingsByPath.keys()) {
if (!orderSet.has(p)) log.warn(`--upload for ${p} is unused — it isn't in the run selection.`);
}
for (const p of plainArgsByPath.keys()) {
if (!orderSet.has(p)) log.warn(`--arg for ${p} is unused — it isn't in the run selection.`);
}
if (opts.json) {
// Surface reachable/dropped ends so a machine-readable plan reflects theView on GitHub (pinned to e474e8803c)
Solutions
- Pass --partition <value> so every listed partitioned script gets its partition arg
- Drop --local to run the deployed pipeline, where the backend resolves partitions at run start
- Exclude the partitioned scripts from the selection (--from/--to bounding) if they shouldn't run
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/pipeline/pipeline.ts:900 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/b5dcc02ac1f024a1.
Report an issue: GitHub.