{"record":{"id":"18d98397beccb56d","repo":"windmill-labs/windmill","slug":"upload-for-p-is-unused-it-isn-t-in-the-run","errorCode":null,"errorMessage":"--upload for ${p} is unused — it isn't in the run selection.","messagePattern":"--upload for (.+?) is unused — it isn't in the run selection\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/pipeline/pipeline.ts","lineNumber":911,"sourceCode":"    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\n    // same trimming the human-facing warning does — a resolved-but-unreachable\n    // `--to` must not look like a clean plan that silently runs only the start.\n    console.log(\n      JSON.stringify({\n        start: runAll ? null : scriptPathOf(start!),\n        ends: ends.map(idLabel),\n        reachableEnds: reachableEnds.map(idLabel),\n        droppedEnds: droppedEnds.map(idLabel),\n        order,\n        cyclic,\n        uploads: boundInOrder,","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/pipeline/pipeline.ts#L893-L929","documentation":"In `wmill pipeline run`, each --upload binding whose target script did not make it into the final run selection is a silent no-op, so the CLI warns per path. It tells you the binding value will never be consumed by this run.","triggerScenarios":"Passing --upload <path>=<value> for a script that was excluded from the selection — outside the --start/--end window, behind a barrier, on a cycle, filtered as not-runnable, or the path has a typo.","commonSituations":"Leftover --upload flags from a previous run invocation; uploading to a script that is not downstream of --start; a --to/--end narrowing that quietly excluded the bound script.","solutions":["Check the plan output (use --json to see reachable/dropped ends) and widen the selection (--start/--end) so the script runs.","Correct the path in --upload if it is misspelled or renamed.","Remove the unused --upload flag if the binding is no longer needed.","Resolve cycles/barriers that excluded the script (see other warnings in the same run)."],"exampleFix":"// before: bound script not in selection\nwmill pipeline run f/myflow --start a --end b --upload f/myflow/c=file.csv\n// after: widen window to include c\nwmill pipeline run f/myflow --start a --end c --upload f/myflow/c=file.csv","handlingStrategy":"validation","validationCode":"// confirm every --upload target is inside the planned selection\nconst plan = JSON.parse(execSync('wmill pipeline run f/x --start a --end b --json').toString());\nconst uploads = ['f/myflow/c'];\nconst missing = uploads.filter(p => !plan.order.includes(p));\nif (missing.length) throw new Error(`--upload targets not in selection: ${missing}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-derive --upload flags whenever you change --start/--end.","Use --json plan output to verify the selection before the real run.","Keep run commands in scripts that are updated together with the flow.","Grep long run commands for stale flags before reusing them."],"tags":["cli","pipeline","unused-argument","dag"],"backgroundTag":"unused-cli-argument","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"}