Closed valeriangalliat closed 1 year ago
Hi @valeriangalliat
It looks like setting CPU to 6 or 8 is part of a BETA.
https://cloud.google.com/run/docs/configuring/cpu#setting
Because its a preview setting, having to do something on the GCP platform directly might be your only options.
You're mentioning that updating on Google Cloud console works.
There are docs on updating the launch-stage annotation here.
I don't see any place on firebase's side to update launch-stage annotations to BETA
.
Sounds good, thanks for looking into it! I wasn't sure where the Firebase CLI stood about Google Cloud beta options. We can close this then. 👌
Edit: if that can help anyone, here's the behavior I've noticed so far:
cpu: 8
in the function source, it will fail to deploy initiallyBETA
annotation to the Cloud Run servicecpu
in the function source, any further firebase deploy
will reset the CPU to 2cpu: 8
in the source, but the function that's currently live is 2, but it's got the BETA
flag from before, the deploy will work but the CPU will stay at 2cpu: 8
in the source and the function that's currently live is also 8, then it'll stay at 8 after a firebase deploy
[REQUIRED] Environment info
firebase-tools: 11.24.0
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
The function deploys with 8 vCPU.
[REQUIRED] Actual behavior
The deploy fails with the following logs:
Notes
Settingcpu: 8
works well infunctions.https.onRequest
. It properly sets the annotationrun.googleapis.com/launch-stage: BETA
on Cloud Run.Only infunctions.pubsub.onMessagePublished
(and possibly in other non-HTTPS handler) this behavior is broken.Edit: I got this issue with
functions.https.onRequest
as well so after all it might be common to all v2 functions.Once I go in the Google Cloud console and update the CPU to 6 or 8 from there though the Firebase CLI has no problem switching around the CPU value.