windmill-labs/windmill · error

Invalid settings format. Expected include_path array

Error message

Invalid settings format. Expected include_path array

What it means

Schema validation of the --with-backend-settings flag in the git-sync settings pull command: the flag's JSON parsed, but the resulting object's include_path is missing or not an array. The flag is meant to carry a raw backend git-sync settings object (as read from the backend's settings endpoint); the input at fault is the JSON string passed to --with-backend-settings, whose include_path field is absent or of the wrong type.

Source

Thrown at cli/src/commands/gitsync-settings/pull.ts:56

    promotion?: string;
  },
) {
  const workspace = await resolveWorkspace(opts);
  await requireLogin(opts);

  try {
    // Parse and validate --with-backend-settings if provided
    let settings: any;
    if (opts.withBackendSettings) {
      try {
        const parsedSettings = JSON.parse(opts.withBackendSettings);

        // Validate the structure matches expected 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,

View on GitHub (pinned to e474e8803c)

Solutions

  1. Pass the settings object verbatim from the backend/API (it must include include_path as an array of strings)
  2. Add or fix the field: \"include_path\": [\"f/myfolder/*\"] in the JSON you pass
  3. Omit --with-backend-settings entirely to let the command fetch settings from the backend
Defensive patterns

Strategy: validation

When it happens

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