Skip to content

Firebase start local emulators for specified codebase only #4878

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

Open
RazaShehryar opened this issue Aug 12, 2022 · 9 comments · May be fixed by #8422
Open

Firebase start local emulators for specified codebase only #4878

RazaShehryar opened this issue Aug 12, 2022 · 9 comments · May be fixed by #8422

Comments

@RazaShehryar
Copy link

RazaShehryar commented Aug 12, 2022

While having two separate codebases (one for v1 and the other one for v2 functions), it is very frustrating that whenever I run firebase emulators:start --only functions:${codebase-name}, it initializes all the codebase functions.

I would like to start only those functions which falls under the specified codebase name.

@RazaShehryar RazaShehryar changed the title Firebase local emulators for specific codebase Firebase start local emulators for specified codebase only Aug 12, 2022
@RazaShehryar
Copy link
Author

A temporary workaround for this issue is by using the following approach. However, it does not deploy the functions properly.

@christhompsongoogle christhompsongoogle transferred this issue from firebase/firebase-tools-ui Aug 15, 2022
@colerogers colerogers self-assigned this Aug 22, 2022
@colerogers
Copy link
Contributor

This is a great feature request! I'm going to add that label here and if anyone in the community wants to open a pull request, that would be awesome!

@RazaShehryar
Copy link
Author

I've successfully managed to start v1 and v2 functions separately using local emulators. I had to define two firebase.json files, one for v1 and the other for v2 (firebase.json and firebase-v2.json. The content of firebase-v2.json is very similar to firebase.json except for the names of source and codebase. In my case, it's functions-v2 and v2, respectively. Now in order to run the v2 functions only, I run this command firebase --config=../firebase-v2.json emulators:start --only functions while for v1 functions, I simply run firebase emulators:start --only functions

@2meters-app
Copy link

I have expected it to work similar to hosting

 firebase emulators:start --only=functions:[codebase-name],

But seems like it loads all the function anyway.

Is this feature still in development? A year has passed.

@henkaumio
Copy link

Any updates on this?

@dabrady
Copy link

dabrady commented Dec 14, 2023

@colerogers Do you know if anyone has prioritized working on this? I've just begun setting up Firebase in a monorepo with multiple "codebases", and while this bug doesn't technically block local dev, it does force us to run our entire monorepo whenever we're really only working on one codebase.

(IMHO this should be classified as a bug, not a feature request, given the emulators:start command is not properly interpreting the --only option.)

@kevpie
Copy link

kevpie commented May 7, 2024

This is becoming even more of a problem with the experimental webframeworks. firebase emulators:start --only functions:codebase,hosting:site should be congruent with the same capability of firebase deploy --only functions:codebase,hosting:site.

Now nextjs ssr function is also getting found and hosted in parallel to the local start dev. No way to cleanly opt out.

@mcanessa
Copy link

Happy to know that I'm not alone.

@Tyg-g
Copy link

Tyg-g commented Apr 8, 2025

I join the request, I'd also need this feature.

@taeold taeold assigned taeold and unassigned colerogers Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants