windmill-labs/windmill · warning
Metadata for ${filePath} appears stale (content changed sinc
Error message
Metadata for ${filePath} appears stale (content changed since last 'wmill generate-metadata').
The schema and lock may not match the current code. Consider running 'wmill generate-metadata' first. What it means
After confirming a lock entry exists, `wmill push` compares the script's current content hash against the hash recorded by the last `wmill generate-metadata`. If the content changed since metadata was generated, the schema and lock may be out of sync with the code; wmill warns (non-blocking) that you should regenerate before pushing.
Source
Thrown at cli/src/commands/script/script.ts:216
"Cannot push a file/fileset resource content file as a script, push its .resource.yaml with 'wmill resource push' instead"
);
}
await requireLogin(opts);
// Warn about metadata state before pushing
try {
const content = await readScriptContent(filePath);
const remotePath = removeExtensionToPath(filePath).replaceAll(SEP, "/");
const contentHash = await computePushMetadataHash(filePath, content);
const conf = await readLockfile();
const hasLockEntry = conf.locks && (conf.locks[remotePath] !== undefined || conf.locks[`${remotePath}.ts`] !== undefined);
if (!hasLockEntry) {
log.warn(colors.yellow(
`No metadata generated yet for ${filePath}. Run 'wmill generate-metadata' to generate schema and lock.`
));
} else if (!(await checkifMetadataUptodate(remotePath, contentHash, conf))) {
log.warn(colors.yellow(
`Metadata for ${filePath} appears stale (content changed since last 'wmill generate-metadata').\n` +
`The schema and lock may not match the current code. Consider running 'wmill generate-metadata' first.`
));
}
} catch {
// Don't block push if check fails
}
const codebases = await listSyncCodebases(opts as SyncOptions);
await handleFile(
filePath,
workspace,
[],
opts.message,
opts,
await getRawWorkspaceDependencies(true),
codebasesView on GitHub (pinned to e474e8803c)
Solutions
- Run `wmill generate-metadata` to refresh schema and lock, then push
- If the change is intentionally metadata-independent, push anyway knowing the schema/lock may be stale
- If args changed, also verify downstream callers use the new required args before pushing
Example fix
// before wmill push f/scripts/foo.ts # warns: stale metadata // after wmill generate-metadata wmill push f/scripts/foo.ts
Defensive patterns
Strategy: validation
Validate before calling
if (hash !== lock.locks[remotePath].content_hash) await run('wmill generate-metadata'); Prevention
- regenerate before push
- never hand-edit hashes
- CI pre-push generate step
When it happens
Trigger: Editing a script after running `wmill generate-metadata`, then running `wmill push` without regenerating; reverting code to a state that differs from the stored hash; pushing from a branch where the metadata was generated for different content.
Common situations: Iterating on a script's logic (which changes required args via its schema) without regenerating; CI pushing code that differs from what a developer generated metadata for; forgetting generate-metadata as part of the edit workflow.
Related errors
- Invalid language: ${language}
- Skipping ${label}: ${err instanceof Error ? err.message : er
- Runnable ${runnableId} content is still an !inline reference
- This command is deprecated. Use "wmill generate-metadata" in
- Warning: ${normalizedPath} depends on something inside "${fo
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/0ac88216f3cabcf6.
Report an issue: GitHub.