fix: ensure GCS storage initialization before pagination

Adds ensureInitialized() call to getNodesWithPagination() to prevent
null bucket access during index rebuild on container restart. Fixes
initialization hang that prevented Cloud Run/GKE deployments.
This commit is contained in:
David Snelling 2025-10-10 17:24:35 -07:00
parent bde27e68ab
commit 2565685ba7

View file

@ -1019,6 +1019,8 @@ export class GcsStorage extends BaseStorage {
hasMore: boolean
nextCursor?: string
}> {
await this.ensureInitialized() // CRITICAL: Must initialize before using this.bucket
const limit = options.limit || 100
const useCache = options.useCache !== false