You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During development of firebase functions, I want to use the emulator if I've spun it up locally, and I want to use the deployed version if it's not running. I create the Functions and associate with an emulator first and check a basic function call succeeds. If not, I make a new one, "without" an emulator.
The SDK currently can't tell the difference between an instance with an emulator and without, and when "allocating" a new Functions it just does an app/region match, so returns the previous Functions with the emulator still associated.
I cannot remove the old emulator association (to reverse useEmulator())
I cannot remove the old instance to create a clean one.
a) Provide emulator params when construction functions, and make this a core part of distinguishing between different Functions instances.
b) Allow me to destroy my Functions instance once I'm done with it (seems like a sensible thing to add anyway :)
c) Allow me to remove the emulator association on an existing instance (hacky!)
API Proposal
class Functions ....
{
@objc open func removeEmulator() {
emulatorOrigin = nil
}
}
Description
During development of firebase functions, I want to use the emulator if I've spun it up locally, and I want to use the deployed version if it's not running. I create the
Functionsand associate with an emulator first and check a basic function call succeeds. If not, I make a new one, "without" an emulator.The SDK currently can't tell the difference between an instance with an emulator and without, and when "allocating" a new
Functionsit just does an app/region match, so returns the previousFunctionswith the emulator still associated.I cannot remove the old emulator association (to reverse
useEmulator())I cannot remove the old instance to create a clean one.
a) Provide emulator params when construction functions, and make this a core part of distinguishing between different
Functionsinstances.b) Allow me to destroy my
Functionsinstance once I'm done with it (seems like a sensible thing to add anyway :)c) Allow me to remove the emulator association on an existing instance (hacky!)
API Proposal
Firebase Product(s)
Functions