V2 scheduled functions do not refuse to deploy if the scheduler region is incompatible
akauppi opened this issue · 7 comments
[REQUIRED] Version info
node: 16
firebase-functions: 4.0.1
firebase-tools: 11.15.0
firebase-admin: n/a
[REQUIRED] Test case
https://github.com/akauppi/cfv2-deploy-311022
[REQUIRED] Steps to reproduce
You will need:
- A Firebase project created, with Cloud Functions enabled
- Docker running
Follow the instructions in the above repo's README.md
and PROBLEM-2.md
, to reproduce.
[REQUIRED] Expected behavior
I am able to deploy a Firebase "v2" scheduled function, to any Firebase region.
[REQUIRED] Actual behavior
On europe-west2
(at least), deployment succeeds.
On europe-north1
and europe-west4
, I get:
HTTP Error: 403, The principal (user or service account) lacks IAM permission "cloudscheduler.jobs.update" for the resource "projects/abc-3011/locations/europe-west4/jobs/firebase-schedule-abc-europe-west4" (or the resource may not exist).
Were you able to successfully deploy your functions?
Yes, but only to europe-west2
.
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.
Good news is you've found a bug
Bad news is that it's more of a documentation bug
V2 scheduled functions use schedules in the region of the function, but Cloud Scheduler is not yet available in europe-west-4
(or 5) nor europe-north
anything. This is not something we can change easily, so you can either:
- Deploy a v2 function in a region taht is supported by both Run and Scheduler
- Deploy a v1 function, which puts the scheduler and function in different regions.
I have no personal stake at this, and it's not slowing me down. Just something I wanted to report, as part of "v2" beta / public preview.
Well, thank you for both battle-testing our product and for reporting the bugs you encounter.