windmill-labs/windmill · error

${msg}

Error message

${msg}

What it means

Generic fatal-error reporting in `wmill sync push`: the variable `msg` holds a push-blocking message that is logged via log.error (or log.warn in JSON output mode) and the process exits with code 1. The message text is produced by earlier validation — commonly the non-canonical fileset pointer check, or other pre-apply validations.

Source

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

        console.log(
          JSON.stringify(
            {
              success: false,
              error: "missing_folders",
              missing_folders: missingFolders,
              message: msg,
            },
            null,
            2,
          ),
        );
      } else {
        log.error(msg);
      }
      process.exit(1);
    }
    if (!opts.jsonOutput) {
      log.warn(msg);
    }
  }

  // Non-canonical fileset pointers abort here — before the dry-run output and
  // before any change is applied (deletes run first in the apply loop, so a
  // mid-apply rejection would leave a partial deploy). All violations are
  // reported at once.
  {
    const wsNameForPointerCheck =
      wsNameForFiles || (isGitRepository() ? getCurrentGitBranch() : null);
    const pointerErrors: string[] = [];
    for (const change of changes) {
      if (change.name !== "added" && change.name !== "edited") {
        continue;
      }
      const normalizedPath = change.path.replaceAll(SEP, "/");
      if (
        !normalizedPath.endsWith(".resource.yaml") &&

View on GitHub (pinned to e474e8803c)

Solutions

  1. Read the `msg` text — it names the exact violation.
  2. Fix the offending wmill.yaml entries (e.g. normalize fileset pointers to canonical paths).
  3. Re-run `wmill sync push --dry-run` to confirm the validation passes before pushing.

Example fix

// before (wmill.yaml with a non-canonical pointer)
includes:
  - "./u/My Script.*"
// after
cf:
  includes:
    - "u/my_script.*"
Defensive patterns

Strategy: validation

Validate before calling

// Before push, validate wmill.yaml pointers are canonical:
import { parseConfigFile } from './config.js';
const conf = await parseConfigFile(confPath);
for (const [ptr, v] of Object.entries(conf.includes ?? {})) {
  if (ptr !== ptr.replaceAll('\\', '/')) throw new Error(`Non-canonical pointer: ${ptr}`);
}

Type guard

function hasCanonicalPointers(conf: { includes?: Record<string, unknown> }): boolean {
  return Object.keys(conf.includes ?? {}).every((k) => k === k.replaceAll('\\', '/'));
}

Try / catch

try {
  await wmill sync push(opts);
} catch (e) {
  if (typeof e === 'object' && e !== null && 'code' in e && e.code === 1) {
    // validation aborted pre-apply — safe to fix config and retry
  }
  process.exitCode = 1;
}

Prevention

When it happens

Trigger: `wmill sync push` aborts during pre-flight validation, most often when wmill.yaml contains non-canonical fileset pointers (paths that don't match the expected canonical form). In JSON output mode the message goes to log.warn instead of log.error, then `process.exit(1)` still runs.

Common situations: Hand-edited wmill.yaml with irregular file/folder paths; generated configs from other tooling; also used for other fatal push validations (auth failures, workspace resolution errors).

Related errors


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