{"record":{"id":"e0417172b62a529e","repo":"windmill-labs/windmill","slug":"server-side-lock-generation-failed-for-f-path","errorCode":null,"errorMessage":"⚠ server-side lock generation FAILED for ${f.path} — the deployed script is broken until it locks.${f.error ? \"\\n  \" + f.error.split(\"\\n\")[0] : \"\"}","messagePattern":"⚠ server-side lock generation FAILED for (.+?) — the deployed script is broken until it locks\\.(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/sync/sync.ts","lineNumber":6548,"sourceCode":"        newDatatableMigrations,\n        {\n          yes: opts.yes,\n          jsonOutput: opts.jsonOutput,\n        },\n      );\n    } catch (e: any) {\n      log.warn(\n        `Failed to run new datatable migrations: ${e?.body ?? e?.message ?? e}`,\n      );\n    }\n    const lockJobs = await checkServerLockJobs(\n      workspace.workspaceId,\n      pushStartedAt,\n      changes.map((c) => c.path.replaceAll(SEP, \"/\")),\n    );\n    if (!opts.jsonOutput) {\n      for (const f of lockJobs.failed) {\n        log.warn(\n          `⚠ server-side lock generation FAILED for ${f.path} — the deployed script is broken until it locks.` +\n            (f.error ? `\\n  ${f.error.split(\"\\n\")[0]}` : \"\"),\n        );\n      }\n      if (lockJobs.pending > 0) {\n        log.info(\n          colors.gray(\n            `${lockJobs.pending} server-side lock job(s) still running — locks (and inferred assets) land when they finish; check the Runs page if a script stays broken.`,\n          ),\n        );\n      }\n    }\n    const pushedCount = changes.length - failedChanges.length;\n    if (opts.jsonOutput) {\n      const result = {\n        success: failedChanges.length === 0,\n        lock_jobs: lockJobs,\n        ...(failedChanges.length > 0 ? { failed: failedChanges } : {}),","sourceCodeStart":6530,"sourceCodeEnd":6566,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/sync/sync.ts#L6530-L6566","documentation":"After `wmill sync push` applies changes, the CLI asks the server to generate locks for each deployed script (checkServerLockJobs). If lock generation failed for a file, this warning names the path and the first line of the server-side error. A deployed script without a valid lock is broken — it cannot execute — until it locks, so this warning should be acted on despite its log level.","triggerScenarios":"Server-side lock generation (dependency resolution/compilation for Python/TypeScript etc.) fails for one or more pushed scripts — e.g. unsatisfiable dependencies, syntax errors in the script's entrypoint, or lock service timeout.","commonSituations":"requirements.txt/pyproject.toml pinning incompatible packages; TypeScript scripts importing packages that don't resolve; oversized dependency sets timing out; pushing a script with a top-level error.","solutions":["Read the first line of f.error shown under the warning for the concrete lock failure.","Fix the script's dependencies (e.g. remove/replace the failing requirement) or fix the reported syntax error.","Re-push just the affected script (`wmill push <path>`) or re-run sync to regenerate the lock.","If lock generation times out, reduce dependencies or check the server's lock/worker service health."],"exampleFix":"// before (requirements.txt of the failing script)\nnumpy==2.0.0\npandas==1.5.0  # incompatible with numpy 2.0 → lock fails\n// after\nnumpy==1.26.4\npandas==2.1.4","handlingStrategy":"validation","validationCode":"// Validate script dependencies locally before push:\n// Python: pip install -r requirements.txt && python -c 'import module' in a clean venv\n// TypeScript: bun/npm install and type-check the script entrypoint","typeGuard":null,"tryCatchPattern":"const lockJobs = await checkServerLockJobs(workspaceId, startedAt, paths);\nfor (const f of lockJobs.failed) {\n  console.error(`${f.path} deployed WITHOUT lock — fix and re-push: ${f.error?.split('\\n')[0]}`);\n  process.exitCode = 1;\n}","preventionTips":["Pin mutually compatible dependency versions in requirements.txt / package.json","Smoke-test dependency installation in CI before sync push","Keep dependency lists minimal to avoid lock timeouts","Monitor worker/lock service health on the server","Treat this warning as blocking — the script is broken until it locks"],"tags":["cli","sync","lock-generation","deployment","dependencies"],"backgroundTag":"lock-generation-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}