{"record":{"id":"1674d3a6be04482f","repo":"windmill-labs/windmill","slug":"a-variable-was-created-at-path-while-this-setup","errorCode":null,"errorMessage":"A variable was created at ${path} while this setup was running. Choose another path and try again.","messagePattern":"A variable was created at (.+?) while this setup was running\\. Choose another path and try again\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/workspaceSettings/addDataTableModel.ts","lineNumber":485,"sourceCode":"\t\treturn 'kept'\n\t}\n}\n\n/**\n * The read answers both questions at once: whether anything is there, and who last wrote it.\n * Replacing this run's own work is required for Try again; replacing anyone else's loses a\n * generated Supabase password, which Supabase never shows twice.\n */\nasync function writeSecret(\n\tdeps: RunDeps,\n\tclaims: Claims,\n\tpath: string,\n\tvalue: string,\n\tdescription: string\n): Promise<Claims> {\n\tconst held = await secretMark(deps, path)\n\tif (held) {\n\t\tif (!stillOurs(claims, 'secret', path, held)) throw new Error(pathTakenLate('variable', path))\n\t\tawait VariableService.updateVariable({\n\t\t\tworkspace: deps.workspace,\n\t\t\tpath,\n\t\t\trequestBody: { value, is_secret: true }\n\t\t})\n\t} else {\n\t\tawait VariableService.createVariable({\n\t\t\tworkspace: deps.workspace,\n\t\t\trequestBody: { path, value, is_secret: true, description, is_oauth: false }\n\t\t})\n\t}\n\treturn claim(claims, 'secret', path, (await secretMark(deps, path)) ?? deps.username)\n}\n\n/**\n * A revision, not an author: the same person editing the variable in another tab leaves\n * `edited_by` unchanged, and that write is no more ours to discard than a stranger's.\n * `undefined` when nothing is there.","sourceCodeStart":467,"sourceCodeEnd":503,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/workspaceSettings/addDataTableModel.ts#L467-L503","documentation":"writeSecret claims a variable path and, if the claim holds, updates the existing variable. Before updating it re-verifies via stillOurs that the variable found at the path is the one this setup claimed; if someone else created/took the path in the meantime, it throws pathTakenLate('variable', path) — this exact message.","triggerScenarios":"Another admin creates a variable at the same path while the add-data-table setup is running, between the setup's initial secretMark claim and the VariableService.updateVariable call.","commonSituations":"Two admins running the data-table setup concurrently; an automation or teammate creating the same variable path (e.g. u/root of the database) mid-setup.","solutions":["Pick a different variable path for the secret and rerun the setup","Remove or rename the conflicting variable (or ask its owner to) and rerun the setup","Serialize workspace setup: only one admin runs the wizard at a time"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const existing = await VariableService.getVariable({ workspace, path }).catch(() => null)\nif (existing && !isOurClaim(existing)) console.warn(`Variable '${path}' already exists — choose another path`)","typeGuard":null,"tryCatchPattern":"try {\n  await runSetup(...)\n} catch (e) {\n  if (String(e.message).includes('A variable was created at')) {\n    // prompt for a new variable path and retry the setup\n  }\n}","preventionTips":["Coordinate variable paths across admins before running the setup","Use namespaced paths (e.g. f/my_setup/...) unlikely to collide","Don't leave a half-finished setup wizard open while someone else configures the workspace"],"tags":["race-condition","variables","secrets","setup-wizard"],"backgroundTag":"concurrent-setup-path-conflict","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"}