{"record":{"id":"bcad12f80517d8c7","repo":"windmill-labs/windmill","slug":"both-workspaces-and-legacykey-found-in","errorCode":null,"errorMessage":"⚠️  Both 'workspaces' and '${legacyKey}' found in wmill.yaml. Using 'workspaces' and ignoring '${legacyKey}'.","messagePattern":"⚠️  Both 'workspaces' and '(.+?)' found in wmill\\.yaml\\. Using 'workspaces' and ignoring '(.+?)'\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/core/conf.ts","lineNumber":270,"sourceCode":"        legacyKey = \"git_branches\";\n        legacyData = conf.git_branches;\n      }\n\n      if (legacyKey && legacyData) {\n        conf.workspaces = convertGitBranchesToWorkspaces(legacyData);\n        if (!legacyConfigWarned) {\n          log.warn(\n            `⚠️  '${legacyKey}' in wmill.yaml is deprecated. Use 'workspaces' instead.\\n` +\n            `   Run 'wmill config migrate' to update your configuration automatically.`\n          );\n          legacyConfigWarned = true;\n        }\n      }\n    } else if (conf?.workspaces) {\n      // If both workspaces and any legacy key exist, warn and use workspaces\n      for (const legacyKey of [\"gitBranches\", \"environments\", \"git_branches\"] as const) {\n        if ((conf as any)[legacyKey]) {\n          log.warn(\n            `⚠️  Both 'workspaces' and '${legacyKey}' found in wmill.yaml. Using 'workspaces' and ignoring '${legacyKey}'.`\n          );\n        }\n      }\n    }\n    // Clean legacy keys from in-memory config\n    delete conf?.gitBranches;\n    delete (conf as any)?.environments;\n    delete conf?.git_branches;\n\n    if (conf?.defaultTs == undefined) {\n      log.warn(\n        \"No defaultTs defined in your wmill.yaml. Using 'bun' as default.\"\n      );\n    }\n\n    // Initialize global nonDottedPaths setting from config\n    setNonDottedPaths(conf?.nonDottedPaths ?? false);","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/conf.ts#L252-L288","documentation":"Config precedence notice from readConfigFile: wmill.yaml contains both the modern 'workspaces' key and a legacy key (gitBranches/environments/git_branches). The 'workspaces' section wins and the legacy key is ignored (and later deleted from the in-memory config); the warning names which legacy key was shadowed.","triggerScenarios":"Thrown at cli/src/core/conf.ts:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the legacy key from wmill.yaml to remove ambiguity","Run 'wmill config migrate' to normalize the file to 'workspaces' only","Verify the 'workspaces' section carries everything the legacy key did"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}