windmill-labs/windmill · error
Deletion not supported for kind: ${kind}
Error message
Deletion not supported for kind: ${kind} What it means
deleteItemInWorkspace removes a deployed item by kind, but deletion is not implemented/possible for every deployable kind. When the kind falls past all handled delete branches (script, flow, app, variable, resource, resource_type, folder, datatable_migration, trigger kinds — note schedules among others may be excluded), it throws `Deletion not supported for kind: <kind>`. This is a capability limitation, not a corrupt input.
Source
Thrown at cli/windmill-utils-internal/src/deploy.ts:835
} else if (kind === "resource") {
await provider.deleteResource({ workspace, path });
} else if (kind === "resource_type") {
await provider.deleteResourceType({ workspace, path });
} else if (kind === "folder") {
await provider.deleteFolder({ workspace, name: folderName(path) });
} else if (kind === "schedule") {
await provider.deleteSchedule({ workspace, path });
} else if (kind === "datatable_migration") {
const { datatable, timestamp } = parseDatatableMigrationDeployPath(path);
await provider.deleteDatatableMigration({
workspace,
datatableName: datatable,
timestamp,
});
} else if (isTriggerKind(kind)) {
await provider.deleteTriggerByKind(kind, { workspace, path });
} else {
throw new Error(`Deletion not supported for kind: ${kind}`);
}
return { success: true };
} catch (e: unknown) {
return { success: false, error: toError(e) };
}
}
// ---------------------------------------------------------------------------
// getOnBehalfOf
// ---------------------------------------------------------------------------
/**
* Get the value of an item for diff comparison.
* Returns a normalized representation suitable for JSON comparison.
*/
export async function getItemValue(
provider: DeployProvider,
kind: DeployKind,View on GitHub (pinned to e474e8803c)
Solutions
- Skip deletion for the unsupported kind and remove it manually in the Windmill UI or via a direct API call
- Upgrade the CLI — newer versions add delete support for more kinds
- Filter the delete set by supported kinds before invoking deleteItemInWorkspace
- Check whether the item should be archived (e.g. scripts/flows are archived) through its own API instead
Example fix
// before
for (const item of staleItems) await deleteItemInWorkspace(provider, item);
// after
for (const item of staleItems) {
if (isTriggerKind(item.kind) || DELETABLE_KINDS.includes(item.kind)) {
await deleteItemInWorkspace(provider, item);
}
} Defensive patterns
Strategy: validation
Validate before calling
const DELETABLE = ['script','flow','app','variable','resource','resource_type','folder','datatable_migration']; const deletableItems = staleItems.filter(i => DELETABLE.includes(i.kind) || isTriggerKind(i.kind)); const manualItems = staleItems.filter(i => !deletableItems.includes(i));
Type guard
function isDeletableKind(kind: string): boolean {
return DELETABLE.includes(kind) || isTriggerKind(kind);
} Try / catch
const r = await deleteItemInWorkspace(provider, item);
if (!r.success && r.error?.startsWith('Deletion not supported')) {
console.warn(`Delete ${item.path} manually in the UI`);
} Prevention
- Check which kinds the CLI can delete before enabling sync deletions
- Treat unsupported kinds as manual-cleanup items and surface them to the operator
- Prefer archiving (scripts/flows) over deleting where the API supports it
When it happens
Trigger: Calling deleteItemInWorkspace (from the sync prune/delete flow) on an item whose kind has no delete branch — e.g. attempting to delete a `schedule` or other kind unsupported for deletion via this provider path.
Common situations: Running `wmill sync push` with deletion enabled against items of a kind the CLI cannot delete; custom automation pruning all workspace items; a kind that exists for deploy but has no delete API wired in this CLI version.
Related errors
- Unknown kind: ${kind}
- ${relPath} is ${Math.ceil(size / 1024 / 1024)} MB, over the
- ${req.status} - ${req.statusText} - ${await req.text()}
- ${project} and ${other} deploy to the same path, so pushing
- App ${appPath} not found
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/035bfed05881cd2f.
Report an issue: GitHub.