From 2565685ba75911232520287931ae5f67430dc340 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Fri, 10 Oct 2025 17:24:35 -0700 Subject: [PATCH] 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. --- src/storage/adapters/gcsStorage.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/adapters/gcsStorage.ts b/src/storage/adapters/gcsStorage.ts index 8a107e7c..51b6a4ae 100644 --- a/src/storage/adapters/gcsStorage.ts +++ b/src/storage/adapters/gcsStorage.ts @@ -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