feat(storage): native Google Cloud Storage support for self-hosting#5728
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview The app wires GCS through the same upload stack as existing providers: env-driven bucket config per file context, Docs and ops: self-hosting guides, Reviewed by Cursor Bugbot for commit b2dec5d. Configure here. |
Greptile SummaryThis PR adds native Google Cloud Storage support for self-hosted deployments. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "fix(storage): validation pass — gcs serv..." | Re-trigger Greptile |
Adds GCS as a third object-storage backend with full parity with S3 and Azure Blob: uploads, streaming downloads, deletes, head, V4 signed URLs (single + batch), and browser/server multipart uploads via the GCS XML API. Selection precedence is Azure Blob > S3 > GCS > local disk. - new provider client at lib/uploads/providers/gcs (cached singleton, ADC/Workload Identity or inline GCS_CREDENTIALS_JSON auth) - per-context GCS_*_BUCKET_NAME config wired through getStorageConfig - shared getServeStoragePrefix() replaces hardcoded blob/s3 serve paths - docs (object-storage, environment-variables), .env.example, helm values.yaml + values-gcp.yaml storage section
… quote normalization - getGcsConfig falls back to the general bucket for every context (GCS bucket names are globally unique, so the S3-style sim-execution-files literal default would point at an unowned bucket; empty per-context buckets previously made uploads and downloads disagree) - completeGcsMultipartUpload restores quotes on ETags stripped by the shared browser upload client before building the completion XML - docs/.env.example/helm updated for the fallback behavior
b9e9c2a to
524722a
Compare
|
@cursor review |
…ection through getStorageConfig
- getChatStorageConfig delegates to getStorageConfig('chat') (identical for
S3/Azure, picks up the GCS general-bucket fallback instead of reading the
raw chat config and rejecting valid chat files)
- parse route resolves the execution bucket via getStorageConfig('execution')
for all providers, so GCS execution files in the fallback bucket are still
recognized as our own objects
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d6feccb. Configure here.
…s + CORS doc fix - extractStorageKey, extractFilename, and extractEmbeddedFileRef now strip the gcs/ serve prefix like s3/ and blob/, so direct-uploaded files on GCS parse, delete, download, and embed correctly (previously only the serve route knew the prefix) - file-download storageProvider union includes 'gcs' - completeGcsMultipartUpload defensively rejects a 200 response carrying an XML error document - docs: CORS example lists concrete x-goog-meta-* header names (GCS matches responseHeader entries exactly; wildcards are only supported for origin)
13a02bd to
b2dec5d
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b2dec5d. Configure here.
Summary
GOOGLE_APPLICATION_CREDENTIALS) or inline service-account JSON (GCS_CREDENTIALS_JSON); signed URLs fall back to IAM signBlob when no private key is presentGCS_BUCKET_NAME,GCS_KB_BUCKET_NAME,GCS_EXECUTION_FILES_BUCKET_NAME, chat/copilot/profile-pictures/og-images/workspace-logos) matching the S3/Azure layout; selection precedence is Azure Blob > S3 > GCS > local diskUSE_BLOB_STORAGE ? 'blob' : 's3'serve-path literals with a sharedgetServeStoragePrefix()helper.env.example, helmvalues.yaml+ a real storage section invalues-gcp.yamlType of Change
Testing
check:api-validationpasses,helm lint+helm templatewith values-gcp.yaml render correctlyChecklist