fix: Fixed issue with repositories appearing in the carousel when indexing fails on first sync (#305)

This commit is contained in:
Brendan Kellam 2025-05-12 12:10:20 -07:00 committed by GitHub
parent e64f37178a
commit e4e36bd745
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 2 deletions

View file

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed
- Fixed issue with repos appearing in the carousel when they fail indexing for the first time. [#305](https://github.com/sourcebot-dev/sourcebot/pull/305)
## [3.1.4] - 2025-05-10 ## [3.1.4] - 2025-05-10
### Fixed ### Fixed

View file

@ -334,7 +334,6 @@ export class ConnectionManager implements IConnectionManager {
}, },
data: { data: {
syncStatus: ConnectionSyncStatus.FAILED, syncStatus: ConnectionSyncStatus.FAILED,
syncedAt: new Date(),
syncStatusMetadata: syncStatusMetadata as Prisma.InputJsonValue, syncStatusMetadata: syncStatusMetadata as Prisma.InputJsonValue,
} }
}); });

View file

@ -392,7 +392,6 @@ export class RepoManager implements IRepoManager {
}, },
data: { data: {
repoIndexingStatus: RepoIndexingStatus.FAILED, repoIndexingStatus: RepoIndexingStatus.FAILED,
indexedAt: new Date(),
} }
}) })
} }

View file

@ -41,6 +41,7 @@ model Repo {
displayName String? displayName String?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
/// When the repo was last indexed successfully.
indexedAt DateTime? indexedAt DateTime?
isFork Boolean isFork Boolean
isArchived Boolean isArchived Boolean
@ -86,6 +87,7 @@ model Connection {
isDeclarative Boolean @default(false) isDeclarative Boolean @default(false)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
/// When the connection was last synced successfully.
syncedAt DateTime? syncedAt DateTime?
repos RepoToConnection[] repos RepoToConnection[]
syncStatus ConnectionSyncStatus @default(SYNC_NEEDED) syncStatus ConnectionSyncStatus @default(SYNC_NEEDED)