Firebase-tools: Functions emulator only works in default us-central region

Created on 16 Nov 2018  Â·  5Comments  Â·  Source: firebase/firebase-tools

Version info

6.0.1

Platform Information

Mac (Mojave)

Steps to reproduce

const functions = require('firebase-functions');
exports.here = functions.https.onRequest((res) => res.ok());
exports.there = functions.region('asia-northeast1').https.onRequest((res) => res.ok());
firebase serve --only functions

creates the following endpoints

✔  functions: there: http://localhost:5000/my-project/us-central1/there
✔  functions: here: http://localhost:5000/my-project/us-central1/here

Both of them contains us-central1

Expected behavior

I'm expecting that one of them contains asia-northeast1 instead of us-central1 in the path.

Actual behavior

It's not a big deal but it got me confused, I wasn't sure multi region was actually working until I eventually deployed the functions.
Once deployed to production the function name contains asia-northeast1.

I see it as a very low priority, I don't mind if you guys want to close it as won't fix but I just wanted to leave a record of it for others that might be confused.

functions bug

All 5 comments

Personally, I think you're right. If you have a region specified, maybe we should be using that region in the URL.

I've made an internal bug and brought it up with the right people, I'll follow up after that discussion.

Internal tracking number: 119670123

any updates on this?

This is a bug and we are tracking it, but there are no updates yet.

This bug was fixed when we released the new functions emulator backend. When supplying a region, it will now be in the URL like http://localhost:5000/project_id/asia-northeast1/helloWorld

Was this page helpful?
0 / 5 - 0 ratings