Skip to content

V2 scheduled functions do not refuse to deploy if the scheduler region is incompatible #1293

Closed

Description

@akauppi

[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.

Activity

  1. google-oss-bot commented on Oct 31, 2022

    @google-oss-bot
    Collaborator

    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.
  2. changed the title [-][Beta] `Cannot read properties of undefined (reading 'service')`, deploying a scheduled function (v2)[/-] [+][Beta] Unable to deploy CF v2 scheduled function to `europe-north1`, `europe-west4` regions[/+] on Oct 31, 2022
  3. inlined commented on Oct 31, 2022

    @inlined
    Member

    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:

    1. Deploy a v2 function in a region taht is supported by both Run and Scheduler
    2. Deploy a v1 function, which puts the scheduler and function in different regions.
  4. changed the title [-][Beta] Unable to deploy CF v2 scheduled function to `europe-north1`, `europe-west4` regions[/-] [+]V2 scheduled functions do not refuse to deploy if the scheduler region is incompatible[/+] on Oct 31, 2022
  5. akauppi commented on Oct 31, 2022

    @akauppi
    Author

    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.

  6. inlined commented on Oct 31, 2022

    @inlined
    Member

    Well, thank you for both battle-testing our product and for reporting the bugs you encounter.

  7. KurtMar commented on May 14, 2023

    @KurtMar

    I just spent an hour trying to figure out why the service account does not have permissions, until I figured out that the region is not supported.

  8. exaby73 commented on Nov 10, 2023

    @exaby73
    Contributor

    Hello @akauppi. With Cloud Functions now supporting most regions, either through tier 1 or tier 2 pricing, do you still have this issue? You original regions, 'europe-north1andeurope-west4` both support gen 2 functions on the tier 1 plan

  9. added
    needs-author-feedback
    on Nov 10, 2023
  10. akauppi commented on Nov 11, 2023

    @akauppi
    Author

    @exaby73 I no longer use Firebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-author-feedback

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions