-
Notifications
You must be signed in to change notification settings - Fork 924
Add support for running the emulators in Cloud Workstation #8968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: e61c657 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Changeset File Check ✅
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (238,599 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
Vertex AI Mock Responses Check
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with knowledge of the time constraints.
If time allowed, I would consider a more generalized solution where the connection class isn't concerned with special behaviors for certain URLs. Rather it could be parameterized to send this browser managed auth with a flag.
And at a higher level, I'm not sure if this will also be useful to external customers. If so, it could be exposed as a public setting. But that may be a future config, like the discussed SSL option for connectXyzEmulator(...)
.
If this work needs to be deferred, I'm okay with that too.
return this.performRPCRequest<Req, Resp>(rpcName, url, headers, req).then( | ||
const { host } = new URL(url); | ||
const forwardCredentials = | ||
isCloudWorkstation(host) && this.databaseInfo.isUsingEmulator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if you need && this.databaseInfo.isUsingEmulator
?
Would it be acceptable to only check for isCloudWorkstation(host)
?
I'm concerned that a user could connect to the emulator without calling connectFirestoreEmulator(...)
, simply by using FirestoreSettings. initializeFirestore(app, { host: cloudWorkstationUrl, ssl: true, port: 443 })
. Using that path, it appears that isUsingEmulator would be set to false.
And it may be the agent that attempts to connect that way, not be a developer choice.
If an app is connected to Firebase Studio, then we should use credentials along with each request, to ensure that the auth cookie for the workstation is forwarded to each request in the emulator.
Products Affected: