{"record":{"id":"e6e20ae985e71c43","repo":"windmill-labs/windmill","slug":"no-instancesettingspath-found","errorCode":null,"errorMessage":"No ${instanceSettingsPath} found","messagePattern":"No (.+?) found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/core/settings.ts","lineNumber":515,"sourceCode":"        skip_reencrypt: !reencrypt,\n      },\n    });\n  } else {\n    log.debug(`Workspace encryption key is up to date`);\n  }\n}\n\nexport async function readInstanceSettings(opts: InstanceSyncOptions) {\n  let localSettings: GlobalSetting[] = [];\n\n  await checkInstanceSettingsPath(opts);\n\n  try {\n    localSettings = (await yamlParseFile(\n      instanceSettingsPath\n    )) as GlobalSetting[];\n  } catch {\n    log.warn(`No ${instanceSettingsPath} found`);\n  }\n  return localSettings;\n}\n\nconst SENSITIVE_FIELD: string[] = [\"license_key\", \"jwt_secret\"];\n\nasync function processInstanceSettings(\n  settings: GlobalSetting[],\n  mode: \"encode\" | \"decode\"\n): Promise<GlobalSetting[]> {\n  const encKey = process.env.WMILL_INSTANCE_LOCAL_ENCRYPTION_KEY;\n  if (encKey) {\n    const res: GlobalSetting[] = [];\n\n    for (const s of settings) {\n      if (SENSITIVE_FIELD.includes(s.name) && typeof s.value === \"string\") {\n        res.push(\n          (await processField(s, \"value\", encKey, mode)) as GlobalSetting","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/settings.ts#L497-L533","documentation":"readInstanceSettings in the Windmill CLI reads instance settings from the local YAML file at instanceSettingsPath (e.g. instance_settings.yaml, optionally folder-scoped via InstanceSyncOptions). If yamlParseFile cannot read or parse the file (missing file, unreadable, invalid YAML), the catch block logs this warning instead of throwing and returns an empty array. It is a non-fatal warning so commands like `wmill settings pull --preview` still work on a fresh checkout with no local settings yet.","triggerScenarios":"Calling readInstanceSettings (directly or via localSettings / pullInstanceSettings --preview / pushInstanceSettings) when instanceSettingsPath does not exist on disk, has no read permission, or contains YAML that fails to parse.","commonSituations":"Running `wmill settings pull --preview` or `settings push` before ever running `wmill settings pull` (the file was never created); a typo in the --instance-settings-folder option; a teammate's .gitignore excludes the settings file; the YAML was hand-edited and broken.","solutions":["Run `wmill settings pull` once to generate instance_settings.yaml from the remote instance.","Check the file exists at the expected path (ls instance_settings.yaml) and that the --instance-settings-folder option (if used) points to the right folder.","Validate the YAML syntax (e.g. paste into a YAML linter) and fix parse errors.","Fix filesystem permissions (chmod/chown) if the file exists but is unreadable.","Ignore the warning if intentionally starting from an empty local settings set."],"exampleFix":"// before: push without a local file\nwmill settings push\n// Warning: No instance_settings.yaml found\n\n// after: pull first, then push\nwmill settings pull\nwmill settings push","handlingStrategy":"validation","validationCode":"import { existsSync } from \"node:fs\";\nif (!existsSync(\"instance_settings.yaml\")) {\n  console.log(\"no local instance settings; run `wmill settings pull` first\");\n}","typeGuard":"function isGlobalSettings(v: unknown): v is GlobalSetting[] {\n  return Array.isArray(v) && v.every((s) => typeof s === \"object\" && s !== null && typeof (s as any).name === \"string\");\n}","tryCatchPattern":"try {\n  const settings = await readInstanceSettings(opts);\n  if (settings.length === 0) log.warn(\"local settings empty — did you forget `wmill settings pull`?\");\n} catch (e) {\n  // readInstanceSettings itself swallows the parse error; handle empty-result case instead\n}","preventionTips":["Always run `wmill settings pull` before push/preview in a new checkout","Commit instance_settings.yaml (with the encryption key set) to the repo","Lint YAML files in CI before running wmill sync commands","Double-check --instance-settings-folder values in scripts"],"tags":["cli","file-not-found","yaml","settings-sync"],"backgroundTag":"missing-config-file","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"}