firebase-tools
firebase-tools copied to clipboard
Multi-region callable function triggers parsed incorrectly
Related to #4307
Due to the following snippet: https://github.com/firebase/firebase-tools/blob/2d21bb2fdbb5f3a32587e0881a98c8c33556a5f3/src/deploy/functions/runtimes/node/parseTriggers.ts#L197-L199
A function that is deployed with >= 2 destination regions has the trigger for the >=2nd trigger incorrectly computed as a httpsTrigger
instead of a callableTrigger
in the subsequent iterations of the loop, since the annotation.labels["deployment-callable"]
property shared on the annotation
object that the triggers for the individual regions comes from is removed.
If the function does not already exist in GCP for the second and additional regions, deploy is successful. On subsequent deploys however we are met with "Changing from a callable function to an HTTPS function is not allowed."
I note there is also a subtle difference in how the function appears in the GCP web ui. The triggers incorrectly parsed as a httpsTrigger show "Require HTTPS":
Despite firebase functions:list
reporting that both deployed functions have the 'callable' trigger type:
❯ firebase functions:list | grep addPayMethod
│ addPayMethod │ callable │ australia-southeast1 │ 256 │ nodejs16 │
│ addPayMethod │ callable │ us-central1 │ 256 │ nodejs16 │
We can reproduce this issue with firebase --version
10.6.0
([email protected]
).
export default functions
.region("europe-west6", "us-central1")
.https.onCall(***);
Workaround is to always delete all cloud functions and redeploy them.
If they exist and we try to deploy them, the mentioned error arises:
Changing from a callable function to an HTTPS function is not allowed. Please delete your function and create a new one instead.
Hey folks, sorry for the delayed response. I've tried to repro this issue but each re-deploy is turning out successful without any error messages. Can you both confirm that you're still experiencing this issue. Thanks!
Hey @delaneyb. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@delaneyb if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.