Skip to content
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

FR: PubSub emulator support #1748

Closed
rockyxcoded opened this issue Oct 25, 2019 · 8 comments · Fixed by #1755
Closed

FR: PubSub emulator support #1748

rockyxcoded opened this issue Oct 25, 2019 · 8 comments · Fixed by #1755

Comments

@rockyxcoded
Copy link

@rockyxcoded rockyxcoded commented Oct 25, 2019

I tried running cloud function locally using
Firebase emulators:start

the response i got

i Starting emulators: ["functions","database","hosting"]
⚠ Your requested "node" version "8" doesn't match your global version "10"
✔ functions: Emulator started at http://localhost:5001
i database: Emulator logging to database-debug.log
✔ database: Emulator started at http://localhost:9000
i database: For testing set FIREBASE_DATABASE_EMULATOR_HOST=localhost:9000
i hosting: Serving hosting files from: public
✔ hosting: Local server: http://localhost:5000
✔ hosting: Emulator started at http://localhost:5000
i functions: Watching "/home/roc***/dev/vue/ev***/functions" for Cloud Functions...
i functions[scheduledFunction]: function ignored because the pubsub.googleapis.com emulator does not exist or is not running.
✔ All emulators started, it is now safe to connect.

how do i get the pubsub emulator to work locally?

@samtstern

This comment has been minimized.

Copy link
Member

@samtstern samtstern commented Oct 25, 2019

@rockyxcoded currently we don't have a PubSub emulator as part of the Firebase Emulator Suite. Even though there is a PubSub emulator as part of gcloud, it doesn't support Cloud Functions triggers so it wouldn't be very useful in this context.

I will mark this as a Feature Request for PubSub.

@samtstern samtstern changed the title * function ignored because the pubsub.googleapis.com emulator does not exist or is not running FR: PubSub emulator support Oct 25, 2019
@ggirotto

This comment has been minimized.

Copy link

@ggirotto ggirotto commented Oct 26, 2019

@samtstern What do you recommend to locally test PubSub functions together with firebase functions?

@samtstern

This comment has been minimized.

Copy link
Member

@samtstern samtstern commented Oct 26, 2019

@ggirotto

This comment has been minimized.

Copy link

@ggirotto ggirotto commented Oct 28, 2019

Thanks for the quick answer @samtstern!

@ErwinAI

This comment has been minimized.

Copy link

@ErwinAI ErwinAI commented Oct 29, 2019

I'd like to +1 for this feature request. Unfortunately, some of my pubsub functions are triggered by my http functions. Because of this, the solution to place the pubsub function code in a http function would require me to implement changes in other existing functions if I would want to test a chain of functions.

Because scheduled functions also work with pubsub internally, could these also be within the scope? Or would that be a separate feature request? @samtstern

@samtstern

This comment has been minimized.

Copy link
Member

@samtstern samtstern commented Oct 29, 2019

@ErwinAI

This comment has been minimized.

Copy link

@ErwinAI ErwinAI commented Oct 29, 2019

@samtstern From my point of view, it would be best to only allow manual triggering somehow. To have the scheduled function run on localhost as configured wouldn't make sense; that would only really allow the developer to check if the function actually triggers as configured and that doesn't seem like something you'd want to do.

@samtstern

This comment has been minimized.

Copy link
Member

@samtstern samtstern commented Oct 29, 2019

@ErwinAI ok that seems reasonable.

@abeisgoat here's another FR for a future "emulator UI" panel: we should be able to manually trigger scheduled functions.

@samtstern samtstern mentioned this issue Oct 30, 2019
12 of 12 tasks complete
@samtstern samtstern self-assigned this Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.