{"record":{"id":"e526a3d865e94d55","repo":"windmill-labs/windmill","slug":"failed-to-get-is-github-app-field-from-git-repo","errorCode":null,"errorMessage":"Failed to get `is_github_app` field from git repo resource, please check that the resource has the correct type (git_repository)","messagePattern":"Failed to get `is_github_app` field from git repo resource, please check that the resource has the correct type \\(git_repository\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-worker/src/ansible_executor.rs","lineNumber":1734,"sourceCode":"\n            let serde_json::Value::Object(git_repo_resource) = client\n                .get_resource_value_interpolated::<serde_json::Value>(\n                    &delegated_git_repo.resource,\n                    Some(job.id.to_string()),\n                )\n                .await?\n            else {\n                return Err(windmill_common::error::Error::BadRequest(\n                    \"Git repository resource is not an object\".to_string(),\n                ));\n            };\n\n            let secret_url = git_repo_resource.get(\"url\").and_then(|s| s.as_str()).map(|s| s.to_string())\n                .ok_or(anyhow!(\"Failed to get url from git repo resource, please check that the resource has the correct type (git_repository)\"))?;\n\n            #[cfg(feature = \"enterprise\")]\n            let is_github_app = git_repo_resource.get(\"is_github_app\").and_then(|s| s.as_bool())\n                .ok_or(anyhow!(\"Failed to get `is_github_app` field from git repo resource, please check that the resource has the correct type (git_repository)\"))?;\n            #[cfg(not(feature = \"enterprise\"))]\n            let is_github_app = false;\n\n            let branch = Some(git_repo_resource.get(\"branch\").and_then(|s| s.as_str()).map(|s| s.to_string())\n                .ok_or(anyhow!(\"Failed to get branch from git repo resource, please check that the resource has the correct type (git_repository)\"))?).filter(|s| !s.is_empty());\n\n            let target_path = DELEGATE_GIT_REPO_TARGET.to_string();\n\n            let repo = GitRepo {\n                url: secret_url,\n                commit: interpolated_commit.clone(),\n                branch,\n                target_path,\n            };\n            append_logs(\n                &job.id,\n                &job.workspace_id,\n                format!(\"\\nCloning {}...\\n\", delegated_git_repo.resource),","sourceCodeStart":1716,"sourceCodeEnd":1752,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-worker/src/ansible_executor.rs#L1716-L1752","documentation":"On enterprise builds, handle_ansible_job requires the git_repository resource to carry a boolean `is_github_app` field. A missing or non-boolean value causes this error, since the worker must know whether to authenticate via GitHub App or plain credentials.","triggerScenarios":"Enterprise worker processes an ansible git-repo dependency whose resource lacks `is_github_app` or has it as a non-boolean (string \"true\", null).","commonSituations":"Resources created before the GitHub App feature existed; resources copied from a community-edition instance; hand-written resource JSON omitting the field; UI/version mismatch where the frontend didn't write the field.","solutions":["Edit the resource and set `\"is_github_app\": true` or `false` as a boolean.","Re-save the resource through the current UI so all expected fields are written.","Recreate the resource with the latest git_repository template.","If on community edition, confirm the worker is not built with the enterprise feature expecting this field."],"exampleFix":"// resource payload\n// before\n{ \"type\": \"git_repository\", \"url\": \"https://github.com/org/repo.git\" }\n// after\n{ \"type\": \"git_repository\", \"url\": \"https://github.com/org/repo.git\", \"is_github_app\": false }","handlingStrategy":"validation","validationCode":"if (typeof r.is_github_app !== 'boolean') {\n  throw new Error('git_repository resource must include a boolean is_github_app (enterprise)');\n}","typeGuard":"function hasIsGithubApp(v: unknown): v is { is_github_app: boolean; [k: string]: unknown } {\n  return typeof v === 'object' && v !== null && typeof (v as any).is_github_app === 'boolean';\n}","tryCatchPattern":"try {\n  const isGithubApp = resource.is_github_app;\n} catch (e) {\n  // re-save resource via UI to backfill missing enterprise fields\n}","preventionTips":["Re-save old resources through the current UI after enterprise upgrades","Keep community and enterprise instance resources separated","Validate resource JSON against the git_repository schema before import"],"tags":["validation","resources","enterprise"],"backgroundTag":"missing-resource-field","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"}