windmill-labs/windmill · error

⚠️ '${legacyKey}' in wmill.yaml is deprecated. Use 'workspa

Error message

⚠️  '${legacyKey}' in wmill.yaml is deprecated. Use 'workspaces' instead.\n   Run 'wmill config migrate' to update your configuration automatically.

What it means

One-time migration notice from readConfigFile: wmill.yaml defines workspaces via a legacy key (gitBranches, environments or git_branches) instead of 'workspaces'. The config is transparently converted in memory (convertGitBranchesToWorkspaces); the warning (once per process via legacyConfigWarned) tells how to persist the migration.

Source

Thrown at cli/src/core/conf.ts:259

    if (conf && !conf.workspaces) {
      let legacyKey: string | null = null;
      let legacyData: LegacyBranchesConfig | undefined;

      if (conf.gitBranches) {
        legacyKey = "gitBranches";
        legacyData = conf.gitBranches;
      } else if (conf.environments) {
        legacyKey = "environments";
        legacyData = conf.environments;
      } else if (conf.git_branches) {
        legacyKey = "git_branches";
        legacyData = conf.git_branches;
      }

      if (legacyKey && legacyData) {
        conf.workspaces = convertGitBranchesToWorkspaces(legacyData);
        if (!legacyConfigWarned) {
          log.warn(
            `⚠️  '${legacyKey}' in wmill.yaml is deprecated. Use 'workspaces' instead.\n` +
            `   Run 'wmill config migrate' to update your configuration automatically.`
          );
          legacyConfigWarned = true;
        }
      }
    } else if (conf?.workspaces) {
      // If both workspaces and any legacy key exist, warn and use workspaces
      for (const legacyKey of ["gitBranches", "environments", "git_branches"] as const) {
        if ((conf as any)[legacyKey]) {
          log.warn(
            `⚠️  Both 'workspaces' and '${legacyKey}' found in wmill.yaml. Using 'workspaces' and ignoring '${legacyKey}'.`
          );
        }
      }
    }
    // Clean legacy keys from in-memory config
    delete conf?.gitBranches;

View on GitHub (pinned to e474e8803c)

Solutions

  1. Run 'wmill config migrate' to rewrite wmill.yaml to the 'workspaces' key
  2. Or manually rename the legacy key to 'workspaces' with the same shape
  3. Ignore — behavior is unchanged thanks to in-memory conversion
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/core/conf.ts:259 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/01a1f31d16442bdd. Report an issue: GitHub.