{"record":{"id":"044e515ae52b4a56","repo":"windmill-labs/windmill","slug":"missing-triggers-kind-for-legacy-trigger-deploy","errorCode":null,"errorMessage":"Missing triggers kind for legacy trigger deploy","messagePattern":"Missing triggers kind for legacy trigger deploy","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/src/lib/utils_workspace_deploy.ts","lineNumber":508,"sourceCode":"\tkind: Kind,\n\tpath: string,\n\tworkspace: string\n): Promise<DeployResult> {\n\treturn sharedDeleteItem(makeProvider(), kind as DeployKind, path, workspace)\n}\n\n/**\n * Check if an item already exists in the target workspace.\n */\nexport async function checkItemExists(\n\tkind: Kind,\n\tpath: string,\n\tworkspace: string,\n\tadditionalInformation?: AdditionalInformation\n): Promise<boolean> {\n\tif (kind === 'trigger') {\n\t\tif (!additionalInformation?.triggers) {\n\t\t\tthrow new Error('Missing triggers kind for legacy trigger deploy')\n\t\t}\n\t\treturn existsTrigger({ workspace, path }, additionalInformation.triggers.kind)\n\t}\n\treturn sharedCheckItemExists(makeProvider(), kind as DeployKind, path, workspace)\n}\n\n/**\n * Get the value of an item for diff comparison.\n */\nexport async function getItemValue(\n\tkind: Kind,\n\tpath: string,\n\tworkspace: string,\n\tadditionalInformation?: AdditionalInformation\n): Promise<unknown> {\n\tif (kind === 'trigger') {\n\t\tif (!additionalInformation?.triggers) return {}\n\t\ttry {","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/utils_workspace_deploy.ts#L490-L526","documentation":"Thrown by checkItemExists during a legacy-style trigger deploy when kind === 'trigger' but the additionalInformation argument carries no `triggers` object (or no `kind` on it). Trigger existence checks need the trigger sub-kind to select the right exists* API.","triggerScenarios":"Calling checkItemExists with kind 'trigger' and an undefined/null additionalInformation, or additionalInformation without a `triggers.kind` field.","commonSituations":"Older deploy code paths (legacy trigger deploy) built before additionalInformation was threaded through; custom deploy tooling that omits the extra info for triggers.","solutions":["Populate additionalInformation.triggers.kind with the trigger kind when deploying triggers","Update the deploy tooling to the current non-legacy trigger deploy path","For non-trigger kinds, pass the correct DeployKind so the sharedCheckItemExists branch is used"],"exampleFix":"// before\nawait checkItemExists('trigger', path, workspace)\n// after\nawait checkItemExists('trigger', path, workspace, { triggers: { kind: 'http' } })","handlingStrategy":"validation","validationCode":"if (kind === 'trigger' && !(additionalInformation?.triggers?.kind)) {\n  throw new Error('trigger deploys require additionalInformation.triggers.kind')\n}","typeGuard":"function hasTriggerKind(info?: AdditionalInformation): info is AdditionalInformation & { triggers: { kind: string } } {\n  return !!info?.triggers?.kind\n}","tryCatchPattern":"try {\n  await checkItemExists(kind, path, workspace, info)\n} catch (e) {\n  if (e.message.includes('Missing triggers kind')) {\n    console.error('Pass { triggers: { kind } } for trigger deploys')\n  } else throw e\n}","preventionTips":["Always build additionalInformation for trigger deploys from the trigger's own kind field","Migrate off legacy trigger deploy paths"],"tags":["deploy","trigger","missing-parameter"],"backgroundTag":"missing-required-argument","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}