windmill-labs/windmill · error · Error
Missing triggers kind for legacy trigger deploy
Error message
Missing triggers kind for legacy trigger deploy
What it means
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.
Source
Thrown at frontend/src/lib/utils_workspace_deploy.ts:508
kind: Kind,
path: string,
workspace: string
): Promise<DeployResult> {
return sharedDeleteItem(makeProvider(), kind as DeployKind, path, workspace)
}
/**
* Check if an item already exists in the target workspace.
*/
export async function checkItemExists(
kind: Kind,
path: string,
workspace: string,
additionalInformation?: AdditionalInformation
): Promise<boolean> {
if (kind === 'trigger') {
if (!additionalInformation?.triggers) {
throw new Error('Missing triggers kind for legacy trigger deploy')
}
return existsTrigger({ workspace, path }, additionalInformation.triggers.kind)
}
return sharedCheckItemExists(makeProvider(), kind as DeployKind, path, workspace)
}
/**
* Get the value of an item for diff comparison.
*/
export async function getItemValue(
kind: Kind,
path: string,
workspace: string,
additionalInformation?: AdditionalInformation
): Promise<unknown> {
if (kind === 'trigger') {
if (!additionalInformation?.triggers) return {}
try {View on GitHub (pinned to e474e8803c)
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
Example fix
// before
await checkItemExists('trigger', path, workspace)
// after
await checkItemExists('trigger', path, workspace, { triggers: { kind: 'http' } }) Defensive patterns
Strategy: validation
Validate before calling
if (kind === 'trigger' && !(additionalInformation?.triggers?.kind)) {
throw new Error('trigger deploys require additionalInformation.triggers.kind')
} Type guard
function hasTriggerKind(info?: AdditionalInformation): info is AdditionalInformation & { triggers: { kind: string } } {
return !!info?.triggers?.kind
} Try / catch
try {
await checkItemExists(kind, path, workspace, info)
} catch (e) {
if (e.message.includes('Missing triggers kind')) {
console.error('Pass { triggers: { kind } } for trigger deploys')
} else throw e
} Prevention
- Always build additionalInformation for trigger deploys from the trigger's own kind field
- Migrate off legacy trigger deploy paths
When it happens
Trigger: Calling checkItemExists with kind 'trigger' and an undefined/null additionalInformation, or additionalInformation without a `triggers.kind` field.
Common situations: Older deploy code paths (legacy trigger deploy) built before additionalInformation was threaded through; custom deploy tooling that omits the extra info for triggers.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- --kind is required. Valid kinds: ${TRIGGER_TYPES.join(", ")}
- Invalid trigger kind: ${opts.kind}. Valid kinds: ${TRIGGER_T
- File already exists: ${filePath}
- git ${args.join(" ")} failed (exit ${status}): ${r.stderr ??
- Unknown kind: ${kind}
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/044e515ae52b4a56.
Report an issue: GitHub.