extensions icon indicating copy to clipboard operation
extensions copied to clipboard

🐛 [firestore-bigquery-export] Explicitly target the firebase functions API

Open vandres opened this issue 1 year ago • 1 comments

[READ] Step 1: Are you in the right place?

Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to Firebase support directly.

[REQUIRED] Step 2: Extension name

This feature request is for extension: firestore-bigquery-export

What feature would you like to see?

This is partly a feature request, partly a bug and also a question/concern.

I got the enclosed mail from Google. After updating my functions, I checked our used extensions and the BigQuery-Export is installed. Is the issue, mentioned in the the mail, also affecting extensions? Will you provide an update before September?

E-Mail from Google

Since Cloud Functions for Firebase is built on Google Cloud Functions, we’re writing to let you know about some changes that are being made to the Google Cloud Functions.

What you need to know

Starting September 1, 2024, future versions of the gcloud functions deploy CLI command will create Cloud Functions using 2nd generation by default. If you do not wish to create a 2nd generation function, you can override this behavior by using the --no-gen2 CLI flag.

Additionally, the firebase-functions Node.js SDK will begin defaulting to the v2 API instead of the v1 API. The v2 API is available now at firebase-functions/v2.

Cloud Functions for Firebase has two product versions:

Cloud Functions (1st generation), the original version, used whenever targeting the firebase-functions/v1 SDK.

Cloud Functions (2nd generation), a new version built on Cloud Run and Eventarc providing an enhanced feature set, which has been generally available since 2022.

This is used whenever you need to target the firebase-functions/v2 SDK.

You can learn more about the benefits of Cloud Functions for Firebase (2nd generation) in the Cloud Functions version comparison documentation.

What you need to do

If you are unable to upgrade at this time, change your import from firebase-functions to firebase-functions/v1 to preserve your existing codebase.

If you automate the creation of new Cloud Functions for Firebase evaluate the differences between generations when creating 2nd generation functions to avoid any issues.

If you conclude that you need to create functions in 1st generation, update your imports from firebase-functions to firebase-functions/v1 before September 1, 2024.

We’re here to help

We know this change may take some planning, and we're committed to supporting you during this transition. If you have any questions or require assistance, please contact Google Cloud support.

vandres avatar Jun 25 '24 23:06 vandres

We are also using the firebase/firestore-bigquery-export extension, and so far the extension has not been updated to Cloud Functions v2, nor has the import of the source code from firebase-functions to firebase-functions/v1 been updated. We would like to know how we can continue to use the extension after September 1st. Thank you in advance.

jonathanrose9 avatar Jul 01 '24 12:07 jonathanrose9

@cabljac Sorry for mentioning you directly. Can we at least get a comment on this?

vandres avatar Aug 01 '24 10:08 vandres

Hey! Extensions don't currently support v2, so we should explicitly target them, you're right. I will investigate this and get back to you. Thanks for bringing this to my attention!

cabljac avatar Aug 01 '24 11:08 cabljac

I'm not sure yet whether we will need to update the code, as extensions explicitly target functions v1 via the extension.yaml. See https://github.com/firebase/extensions/blob/next/firestore-bigquery-export/extension.yaml#L77 for example. I have still raised this with the extensions team. If it is needed then I will put out new releases next week.

Thanks again for tagging me though, this was definitely worth us getting on top of!

cabljac avatar Aug 02 '24 06:08 cabljac

@cabljac Thank you very much!

vandres avatar Aug 02 '24 10:08 vandres

That email, unfortunately, does not cover Firebase Extensions. This it will not affect Firebase Extensions as the change affects function deploy operations via the CLI. The Firebase Extensions deployment is done via the extensions backend (not using the CLI) so as @cabljac mentioned the functions versions defined in the extensions.yaml have full/explicit control.

pavelgj avatar Aug 07 '24 14:08 pavelgj

@pavelgj Thanks for the heads up. That's good news for me :)

vandres avatar Aug 08 '24 10:08 vandres