windmill-labs/windmill · error

No resource metadata file found for fileset resource: ${chan

Error message

No resource metadata file found for fileset resource: ${changePath}

What it means

findFilesetResourceFile() looks for the parent resource metadata file of a `.fileset/` folder, checking workspace-specific suffixed files first (when a workspace name is given) then the base `.resource.json` / `.resource.yaml` candidates. It throws when the `.fileset/` folder exists on disk but none of the expected metadata files exist beside it, meaning the fileset is orphaned.

Source

Thrown at cli/src/commands/sync/sync.ts:1062

  // `<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;
    } catch {
      // not found, try next
    }
  }
  throw new Error(
    `No resource metadata file found for fileset resource: ${changePath}`,
  );
}

type FilesetPushResult =
  | { status: "pushed"; resourceFilePath: string }
  | { status: "already-synced"; resourceFilePath: string }
  | { status: "parent-missing" };

async function pushFilesetParentResource(
  childPath: string,
  workspaceId: string,
  alreadySynced: string[],
  cachedWsName: string | null,
  specificItems?: SpecificItemsConfig,
): Promise<FilesetPushResult> {
  let resourceFilePath: string;
  try {

View on GitHub (pinned to e474e8803c)

Solutions

  1. Restore or re-create the metadata file `<base>.resource.json` (or `.yaml`) next to the `.fileset/` folder — easiest via `wmill sync pull` or re-pulling that single resource
  2. If the resource is intentionally deleted, delete the whole `<base>.fileset/` folder so no orphan child changes remain
  3. Check whether the metadata lives under a workspace-suffixed name that does not match the workspace you are syncing; align the suffix or pass the correct wsName
  4. Check git status — a pending rename or unmerged path may have removed the metadata; resolve the merge properly

Example fix

// before (orphaned)
u/my_resource.fileset/data.json   // no u/my_resource.resource.json
// after
wmill resource pull u/my_resource  # regenerates u/my_resource.resource.json beside the .fileset folder
Defensive patterns

Strategy: validation

Validate before calling

import { statSync } from 'fs';
const base = changePath.slice(0, changePath.indexOf('.fileset'));
const ok = ['.resource.json', '.resource.yaml'].some(ext => {
  try { return statSync(base + ext).isFile(); } catch { return false; }
});
if (!ok) console.error(`orphaned fileset: ${changePath}`);

Type guard

function hasFilesetMetadata(basePath: string): boolean {
  return ['.resource.json', '.resource.yaml'].some(ext => existsSync(basePath + ext));
}

Try / catch

try {
  const meta = await findFilesetResourceFile(childPath, ws);
} catch {
  // treat as parent-missing: skip push or re-pull the resource
}

Prevention

When it happens

Trigger: A `.fileset/` directory exists (or a change is reported inside one) but `<base>.resource.json`, `<base>.resource.yaml`, and their workspace-suffixed variants are all missing — e.g. the metadata file was deleted/renamed, or the folder was renamed without renaming the metadata.

Common situations: Manually deleting or renaming the `.resource.json`/`.resource.yaml` while keeping the `.fileset/` folder; git merge/checkout leaving the folder but not the metadata; workspace-specific metadata expected under a suffixed name that was never pulled; partial restore from backup.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/ac3bd13bd644224a. Report an issue: GitHub.