windmill-labs/windmill · error
Not a fileset resource path: ${changePath}
Error message
Not a fileset resource path: ${changePath} What it means
findFilesetResourceFile() maps a change path inside a fileset resource (a resource whose files live under `<base>.fileset/`) back to its parent metadata file (`<base>.resource.json` or `.resource.yaml`). The CLI throws this error when the given path does not contain a `.fileset/` segment, so it cannot be a fileset child and no parent resource can be derived from it. It is an internal invariant guard: callers are expected to pass only paths discovered under a `.fileset/` directory.
Source
Thrown at cli/src/commands/sync/sync.ts:1039
filesetMap[k] = false;
} else {
if (v.format_extension) {
formatExtMap[k] = v.format_extension;
}
filesetMap[k] = v.is_fileset ?? false;
}
}
return { formatExtMap, filesetMap };
}
export async function findFilesetResourceFile(
changePath: string,
wsName?: string | null,
): Promise<string> {
// Extract the base path before .fileset/
const filesetIdx = changePath.indexOf(".fileset" + SEP);
if (filesetIdx === -1) {
throw new Error(`Not a fileset resource path: ${changePath}`);
}
const basePath = changePath.substring(0, filesetIdx);
const candidates = [basePath + ".resource.json", basePath + ".resource.yaml"];
// A workspace-specific resource keeps its children at the server-canonical
// `<base>.fileset/` while its metadata file carries the workspace suffix.
// The suffixed file is this workspace's authoritative metadata, so it must
// win over a base file that coexists with it.
if (wsName) {
candidates.unshift(
toWorkspaceSpecificPath(basePath + ".resource.json", wsName),
toWorkspaceSpecificPath(basePath + ".resource.yaml", wsName),
);
}
for (const candidate of candidates) {
try {
const s = await stat(candidate);
if (s.isFile()) return candidate;View on GitHub (pinned to e474e8803c)
Solutions
- Check the path actually contains a `.fileset/` segment; if it is a plain resource metadata file, route it through the normal resource push instead of the fileset flow
- Verify SEP matches your OS path separator and that the path was not normalized to use a different separator
- Re-pull the resource (`wmill sync pull`) so the `.fileset/` folder and metadata file are regenerated consistently
- If calling findFilesetResourceFile yourself, pre-check `path.includes('.fileset' + SEP)` and handle non-fileset paths separately
Example fix
// before
const meta = await findFilesetResourceFile(changePath, ws); // throws on plain paths
// after
if (!changePath.includes('.fileset' + SEP)) {
await pushResourceFile(changePath); // normal resource path
} else {
const meta = await findFilesetResourceFile(changePath, ws);
} Defensive patterns
Strategy: validation
Validate before calling
import * as path from 'path';
const SEP = path.sep;
function isFilesetResourcePath(changePath: string): boolean {
return changePath.includes('.fileset' + SEP);
}
// call findFilesetResourceFile only if isFilesetResourcePath(p)
Type guard
function isFilesetPath(p: string): p is `${string}.fileset/${string}` {
return p.includes('.fileset/');
} Try / catch
try {
const meta = await findFilesetResourceFile(changePath, ws);
} catch (e) {
if (String(e).message.startsWith('Not a fileset resource path')) {
// fall back to normal resource handling
} else throw e;
} Prevention
- Pre-check the path contains '.fileset' + SEP before invoking the fileset flow
- Route plain resource metadata files through the normal resource push path
- Keep path separators consistent (use path.join, don't mix / and \\ manually)
When it happens
Trigger: Calling findFilesetResourceFile (directly or via pushFilesetParentResource during `wmill sync push`) with a change path that lacks `.fileset` + separator — e.g. a plain `foo.resource.json` path, a misbuilt path where the separator SEP differs from the one used on disk, or a hand-edited watcher/sync input.
Common situations: Running sync on a checkout where a resource was renamed so its `.fileset/` folder and the metadata file no longer line up; cross-platform checkouts (Windows vs POSIX separators) altering path formats; custom tooling feeding non-fileset paths into the fileset push flow.
Related errors
- No resource metadata file found for fileset resource: ${chan
- No resource metadata file found for fileset resource: ${chan
- Workspace folder not found, are you in the right directory?
- Resource ${remotePath} uses '!inline_fileset ${dirPath}', bu
- Found ${wrongFormatPaths.length} directory(ies) using ${foun
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/304b6718a43b767f.
Report an issue: GitHub.