{"record":{"id":"79f7334857642aef","repo":"windmill-labs/windmill","slug":"invalid-worker-group-config-name","errorCode":null,"errorMessage":"Invalid worker group config name","messagePattern":"Invalid worker group config name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/routes/(root)/(logged)/workers/+page.svelte","lineNumber":354,"sourceCode":"\t\t\tawait ConfigService.updateConfig({ name: 'worker__' + configName, requestBody: {} })\n\t\t\tnewGroupPopover?.close()\n\t\t\tawait loadWorkerGroups()\n\t\t\t// Select the new worker group and signal it should auto-open drawer\n\t\t\tselectedTab = configName\n\t\t\tshouldAutoOpenDrawer = configName\n\t\t\tsendUserToast(`Worker group ${configName} created`)\n\t\t} catch (err) {\n\t\t\tsendUserToast(`Could not create worker group: ${err}`, true)\n\t\t}\n\t}\n\n\tlet importConfigDrawer: Drawer | undefined = $state(undefined)\n\tlet importConfigCode = $state('')\n\tlet tag: string = $state('')\n\tasync function importSingleWorkerConfig(c: any) {\n\t\tif (typeof c === 'object' && c !== null) {\n\t\t\tif (!c.name || typeof c.name !== 'string') {\n\t\t\t\tthrow new Error('Invalid worker group config name')\n\t\t\t}\n\n\t\t\tif (workerGroups?.hasOwnProperty(c.name)) {\n\t\t\t\tthrow new Error(`Worker group config with the name ${c.name} already exists`)\n\t\t\t}\n\n\t\t\tawait ConfigService.updateConfig({\n\t\t\t\tname: 'worker__' + c.name,\n\t\t\t\trequestBody: { ...c, name: undefined }\n\t\t\t})\n\t\t} else {\n\t\t\tthrow new Error('Invalid worker group config')\n\t\t}\n\t}\n\n\tasync function importConfigFromYaml() {\n\t\tconst config = YAML.parse(importConfigCode)\n","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/routes/(root)/(logged)/workers/+page.svelte#L336-L372","documentation":"importSingleWorkerConfig validates each parsed worker-group config object from the YAML import drawer. A config without a non-empty string 'name' field is rejected with this error before ConfigService.updateConfig is called, since the backend key is derived as 'worker__' + name.","triggerScenarios":"Pasting/uploading worker config YAML where an entry is an object but lacks 'name', or has name as a non-string (number, null, empty string).","commonSituations":"Hand-written YAML missing the name key on one group; exporting configs from another tool with a different field name (e.g. 'id' or 'group'); YAML indentation accident nesting name under another key.","solutions":["Add a unique non-empty 'name' string field to every worker group entry in the YAML","Check YAML indentation so 'name' is a sibling of the group's other fields","Re-export the config from a source that emits the 'name' field","Fix type coercion — quote numeric-looking names so they parse as strings"],"exampleFix":"// before\nworker_groups:\n  - concurrency: 10\n// after\nworker_groups:\n  - name: my-group\n    concurrency: 10","handlingStrategy":"validation","validationCode":"function validateImport(c: unknown): c is { name: string } {\n  return typeof c === 'object' && c !== null && typeof (c as any).name === 'string' && (c as any).name.trim() !== ''\n}\n// before importing:\nif (!configs.every(validateImport)) throw new Error('Every worker group needs a non-empty string name')","typeGuard":"function isNamedWorkerConfig(c: unknown): c is { name: string; [k: string]: unknown } {\n  return typeof c === 'object' && c !== null && typeof (c as any).name === 'string' && (c as any).name.length > 0\n}","tryCatchPattern":"try {\n  await importConfigFromYaml()\n} catch (e) {\n  if (e.message === 'Invalid worker group config name') {\n    sendUserToast('Each worker group in the YAML needs a non-empty string \"name\" field', true)\n  } else throw e\n}","preventionTips":["Validate the whole YAML with a JSON schema before import","Quote names in YAML so numeric-looking names stay strings","Keep an example/template config in docs with the required name field","Check indentation — name must be a direct child of the group mapping"],"tags":["validation","yaml","workers","import"],"backgroundTag":"missing-required-argument","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"}