Open danielbankhead opened 1 year ago
The Go GCS client looks like it had some similar issues in the past. There's a fair bit in that repo if you search issues for STORAGE_EMULATOR_HOST
, but this ticket is the closest to this and has two PRs linked to fix it: https://github.com/googleapis/google-cloud-go/issues/2476
The changes there look functionally equivalent to what I proposed in #2070, so I'm wondering if the firebase emulator may already have problems with the Go client? I have no experience with the firebase emulator, so I couldn't say for sure.
A thought: as a stepping stone to avoid a "hard break", might it be useful to temporarily permit a second environment variable indicating how to interpret STORAGE_EMULATOR_HOST
, with the initial default being the current behavior, and some specific value indicating to use the "new style", and at some point that default changes, and later that second env var is dropped?
Friendly check-in to see if there's any progress on decisions for how this might move forwards?
@mgabeler-lee-6rs hey, thanks for the inquiry; we plan to sync with peer teams on this and other issues over the next few months.
Just checking in on status and confirming that this is still of interest.
@mgabeler-lee-6rs We have alignment between teams and we're likely to resolve this in the current quarter.
Obviously missed Q2, Q3 maybe? :)
@mgabeler-lee-6rs yea, I’m aiming for this half :)
Update: we had a few other high priority features to take care of; however we still have this as a key item to get to shortly.
Today,
baseUrl
is equivalent to theSTORAGE_EMULATOR_HOST
, when available. This leads to limitations when using the client. Here's the relevant code snippet:https://github.com/googleapis/nodejs-storage/blob/14472691121aa6af0a316c0bf78728edb164c66c/src/storage.ts#L650-L668
Ideally,
STORAGE_EMULATOR_HOST
should only be a host (without any path associations, e.g.http://localhost:9199
) while the client calls the appropriate path on the host (e.g./storage/v1
). That implementation should look something like this: https://github.com/googleapis/nodejs-storage/commit/c75b8b82262dddb794304a71f648bd6e03cafb30This requires coordination with Firebase and updates to Firebase Storage Emulator. Additionally, we should explore practices to ensure reliability and a consistent experience between Firebase and Google Cloud Storage (e.g. code consolidation and integration testing).
Related:
Background: