windmill-labs/windmill · error

Invalid settings format. Expected include_type array

Error message

Invalid settings format. Expected include_type array

What it means

Follow-up check in the push command's --with-backend-settings validation: include_path was a valid array, but include_type is missing or not an array. The input at fault is the flag's JSON; the push validates both fields because it forwards the object as the workspace git-sync configuration.

Source

Thrown at cli/src/commands/gitsync-settings/push.ts:83

    let settings: any;
    if (opts.withBackendSettings) {
      try {
        const parsedSettings = JSON.parse(opts.withBackendSettings);

        // Validate the structure matches expected test format (raw settings object)
        if (
          !parsedSettings.include_path ||
          !Array.isArray(parsedSettings.include_path)
        ) {
          throw new Error(
            "Invalid settings format. Expected include_path array",
          );
        }
        if (
          !parsedSettings.include_type ||
          !Array.isArray(parsedSettings.include_type)
        ) {
          throw new Error(
            "Invalid settings format. Expected include_type array",
          );
        }

        // Create mock backend response with single repository using provided settings
        const mockRepositoryPath = opts.repository || "u/mock/repo";
        settings = {
          git_sync: {
            repositories: [{
              git_repo_resource_path: mockRepositoryPath,
              settings: {
                include_path: parsedSettings.include_path,
                include_type: parsedSettings.include_type,
                exclude_path: parsedSettings.exclude_path || [],
                extra_include_path: parsedSettings.extra_include_path || [],
              },
            }],
          },

View on GitHub (pinned to e474e8803c)

Solutions

  1. Add include_type as an array of asset-kind strings to the JSON
  2. Pass the backend settings object unchanged rather than a hand-trimmed copy
  3. Run without --with-backend-settings to use the stored settings
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/gitsync-settings/push.ts:83 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/ef02177734679736. Report an issue: GitHub.