windmill-labs/windmill · warning
Failed to compute shared UI diff for dry-run preview: ${e}
Error message
Failed to compute shared UI diff for dry-run preview: ${e} What it means
During `wmill sync push --dry-run`, the CLI attempts to compute a UI diff for the shared UI folder so the preview shows shared-UI changes alongside file changes. This is wrapped in a catch that downgrades any failure to a log.warn because the shared-UI diff is purely supplemental — the dry-run of the main fileset still completes. The thrown value `e` is interpolated into the message.
Source
Thrown at cli/src/commands/sync/sync.ts:5318
for (const c of await diffSharedUi(
workspace.workspaceId,
opts.keepDeleted,
)) {
if (c.type === "added") {
changes.push({ name: "added", path: c.path, content: "" });
} else if (c.type === "deleted") {
changes.push({ name: "deleted", path: c.path });
} else {
changes.push({
name: "edited",
path: c.path,
before: c.before,
after: c.after,
});
}
}
} catch (e) {
log.warn(`Failed to compute shared UI diff for dry-run preview: ${e}`);
}
}
log.info(
`remote (${workspace.name}) <- local: ${changes.length} changes to apply`,
);
// Check that every folder referenced in the changeset has a local folder.meta.yaml
const missingFolders: string[] = [];
if (changes.length > 0) {
const folderNames = new Set<string>();
for (const change of changes) {
const parts = change.path.split(SEP);
if (parts.length >= 3 && parts[0] === "f" && change.name !== "deleted") {
folderNames.add(parts[1]);
}
}
for (const folderName of folderNames) {
const basePath = path.join("f", folderName, "folder.meta.yaml");View on GitHub (pinned to e474e8803c)
Solutions
- Check the interpolated error `e` in the warning to see the root cause (usually an HTTP status or network error).
- Verify the API token/workspace has access to the shared UI folder (retry with an admin token).
- Ignore if shared UI diff is irrelevant to you — the dry-run preview of regular files is still produced.
- Upgrade the CLI/server if the shared UI endpoints are missing on your server version.
Example fix
// The failure is already handled; if you want the dry run to fail loudly on shared UI errors:
// before (library code)
} catch (e) {
log.warn(`Failed to compute shared UI diff for dry-run preview: ${e}`);
}
// after
} catch (e) {
log.error(`Failed to compute shared UI diff for dry-run preview: ${e}`);
process.exit(1);
} Defensive patterns
Strategy: try-catch
Validate before calling
// Before dry-run, check shared UI access:
const folders = await wmill.listFolders({ workspace });
// ensure the shared UI folder exists and the token can read it; otherwise skip the shared-UI diff Type guard
function isHttpError(e: unknown): e is { statusCode: number; message: string } {
return typeof e === 'object' && e !== null && 'statusCode' in e;
} Try / catch
try {
await computeSharedUiDiff();
} catch (e) {
log.warn(`Skipping shared UI diff (non-fatal): ${e instanceof Error ? e.message : e}`);
} Prevention
- Use a token with read access to the shared UI folder before dry-running
- Test connectivity to the workspace API before long sync operations
- Pin CLI and server versions to compatible releases
- Treat this warning as ignorable unless shared UI matters to your deployment
When it happens
Trigger: Running `wmill sync push --dry-run` on a workspace whose shared UI folder diff computation fails — e.g. the remote shared UI folder cannot be listed (network error, 4xx/5xx from the API, permission denied on the folder) or local shared UI files fail to parse.
Common situations: Token lacking read access to the shared UI folder; server unreachable mid-dry-run; malformed shared UI files locally; older server version without the shared UI endpoints.
Related errors
- ⚠ ${syncPushDestructiveWarning(opts.keepDeleted)}
- Failed to push shared UI folder: ${e}
- Workspace folder not found, are you in the right directory?
- Not a fileset resource path: ${changePath}
- No resource metadata file found for fileset resource: ${chan
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/ba5ea710b9e2a35d.
Report an issue: GitHub.