Describe the bug
Git connections defined in config.json cause errors and don't load in the UI. The connectionType field gets set to "git" instead of "generic-git-host", causing the application to fail when processing these connections.
packages/backend/src/configManager.ts:85 assigns newConnectionConfig.type (which is "git" from the v3 config schema) directly to the connectionType field, but the codebase expects "generic-git-host".
To reproduce
- Add a git connection to config.json:
{
"connections": {
"my-repos": {
"type": "git",
"url": "file:///repos/my-org/*"
}
}
}
- Attempt to load the connections view in a browser.
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): v4.8.1
Additional information
I have applied the following patch to my local build in the meantime to get around the issue:
diff --git a/packages/backend/src/configManager.ts b/packages/backend/src/configManager.ts
index 14c6b0d..2e5ca51 100644
--- a/packages/backend/src/configManager.ts
+++ b/packages/backend/src/configManager.ts
@@ -82,7 +82,7 @@ export class ConfigManager {
data: {
name: key,
config: newConnectionConfig as unknown as Prisma.InputJsonValue,
- connectionType: newConnectionConfig.type,
+ connectionType: newConnectionConfig.type === 'git' ? 'generic-git-host' : newConnectionConfig.type,
isDeclarative: true,
org: {
connect: {
Describe the bug
Git connections defined in config.json cause errors and don't load in the UI. The connectionType field gets set to "git" instead of "generic-git-host", causing the application to fail when processing these connections.
packages/backend/src/configManager.ts:85 assigns newConnectionConfig.type (which is
"git"from the v3 config schema) directly to theconnectionTypefield, but the codebase expects"generic-git-host".To reproduce
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): v4.8.1
Additional information
I have applied the following patch to my local build in the meantime to get around the issue: