{"record":{"id":"b5dcc02ac1f024a1","repo":"windmill-labs/windmill","slug":"dynamic-partitioned-script-s-need-an-explici","errorCode":null,"errorMessage":"dynamic `// partitioned` script(s) need an explicit partition for a local run: ${unresolvable.sort().join(\", \")} — pass --partition <value>.","messagePattern":"dynamic `// partitioned` script\\(s\\) need an explicit partition for a local run: (.+?) — pass --partition <value>\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/pipeline/pipeline.ts","lineNumber":900,"sourceCode":"  // arg is only injected when `--partition` is given (an explicit backfill).\n  const partitionKindByPath = new Map(\n    graph.runnables\n      .filter((r) => r.usage_kind === \"script\" && r.partition_kind)\n      .map((r) => [r.path, r.partition_kind!]),\n  );\n  const partitionValueFor = (nodePath: string): string | undefined => {\n    const kind = partitionKindByPath.get(nodePath);\n    if (!kind) return undefined;\n    if (opts.partition) return opts.partition;\n    if (!opts.local) return undefined; // deployed: backend resolves at run start\n    return defaultPartitionValue(kind);\n  };\n  if (opts.local && !opts.partition) {\n    const unresolvable = order.filter(\n      (p) => partitionKindByPath.get(p) === \"dynamic\",\n    );\n    if (unresolvable.length > 0) {\n      throw new Error(\n        `dynamic \\`// partitioned\\` script(s) need an explicit partition for a local run: ${unresolvable.sort().join(\", \")} — pass --partition <value>.`,\n      );\n    }\n  }\n\n  // A `--upload` whose script fell outside the selection is a no-op the user\n  // should know about, rather than silently ignored.\n  const orderSet = new Set(order);\n  const boundInOrder = [...boundBindingsByPath.keys()].filter((p) => orderSet.has(p)).sort();\n  for (const p of boundBindingsByPath.keys()) {\n    if (!orderSet.has(p)) log.warn(`--upload for ${p} is unused — it isn't in the run selection.`);\n  }\n  for (const p of plainArgsByPath.keys()) {\n    if (!orderSet.has(p)) log.warn(`--arg for ${p} is unused — it isn't in the run selection.`);\n  }\n\n  if (opts.json) {\n    // Surface reachable/dropped ends so a machine-readable plan reflects the","sourceCodeStart":882,"sourceCodeEnd":918,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/pipeline/pipeline.ts#L882-L918","documentation":"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.","triggerScenarios":"Thrown at cli/src/commands/pipeline/pipeline.ts:900 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}