Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Cloud Functions to v2 (Gen2) #598

Open
nilsreichardt opened this issue Jan 6, 2024 · 11 comments
Open

Upgrade Cloud Functions to v2 (Gen2) #598

nilsreichardt opened this issue Jan 6, 2024 · 11 comments
Labels
blocked enhancement New feature or request

Comments

@nilsreichardt
Copy link

It would be great to be able to upgrade to Cloud Functions v2 because they have less cold starts.

@jauntybrain jauntybrain added blocked enhancement New feature or request and removed blocked labels Jan 26, 2024
@jauntybrain
Copy link
Contributor

jauntybrain commented Jan 26, 2024

Hi @nilsreichardt!

Unfortunately, Extensions currently support only v1 http-triggered Cloud Fnctions and Firestore triggers.

We are monitoring updates, so v2 functions will be added once Extensions start fully supporting them.

@ryanwhitemedia
Copy link

@jauntybrain any update on the node version making the extension deprecated?

@pr-Mais
Copy link
Member

pr-Mais commented Jan 31, 2024

@ryanwhitemedia version [email protected] is using node18 and is live.

I'm assuming you're still on the deprecated extension, per this comment the extensions are now on the Invertase publisher.

@alexl2012
Copy link

Any update on this V1 is being decommissioned soon... @jauntybrain

@steffdimitrov
Copy link

steffdimitrov commented May 23, 2024

I've got an email from Firebase with next content:

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](https://notifications.google.com/g/p/ANiao5oFRq6lPtXyWp3-Wxbk8xM2uWHKc69gh0gcPF09Ldp5IC4dZIfl6cZ1CEPBCVH0CD9gibbrx1rgj8N_TxUh5P7xn_184qos7YIvpTDtbmAmlsavR8AqU9HII7SxTB4rRrq8GFnJl3gl-WyLJKdJ4kLTdL3sP-6leC1esPIdsaCtXu_9a249cMYjWItAce281QZ0HYfKvotVJmEk7O6s5y9sHmCmMt1OSEvJ2NKC8ZV2LoI-2YdNvjqfCA).

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.

This means that you have to upgrade to gen version 2 or to explicit import from 'firebase-functions/v1' SDK.

Are you going to upgrade to gen2 functions? Please, answer.

@Hibrix-net
Copy link

Any insight on this would be greatly appreciated.

@pr-Mais
Copy link
Member

pr-Mais commented Sep 19, 2024

I've got an email from Firebase with next content:

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](https://notifications.google.com/g/p/ANiao5oFRq6lPtXyWp3-Wxbk8xM2uWHKc69gh0gcPF09Ldp5IC4dZIfl6cZ1CEPBCVH0CD9gibbrx1rgj8N_TxUh5P7xn_184qos7YIvpTDtbmAmlsavR8AqU9HII7SxTB4rRrq8GFnJl3gl-WyLJKdJ4kLTdL3sP-6leC1esPIdsaCtXu_9a249cMYjWItAce281QZ0HYfKvotVJmEk7O6s5y9sHmCmMt1OSEvJ2NKC8ZV2LoI-2YdNvjqfCA).

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.

This means that you have to upgrade to gen version 2 or to explicit import from 'firebase-functions/v1' SDK.

Are you going to upgrade to gen2 functions? Please, answer.

Firebase Extensions are not affected by this, see this comment.
firebase/extensions#2127 (comment)

@Hibrix-net
Copy link

I've got an email from Firebase with next content:

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](https://notifications.google.com/g/p/ANiao5oFRq6lPtXyWp3-Wxbk8xM2uWHKc69gh0gcPF09Ldp5IC4dZIfl6cZ1CEPBCVH0CD9gibbrx1rgj8N_TxUh5P7xn_184qos7YIvpTDtbmAmlsavR8AqU9HII7SxTB4rRrq8GFnJl3gl-WyLJKdJ4kLTdL3sP-6leC1esPIdsaCtXu_9a249cMYjWItAce281QZ0HYfKvotVJmEk7O6s5y9sHmCmMt1OSEvJ2NKC8ZV2LoI-2YdNvjqfCA).

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.

This means that you have to upgrade to gen version 2 or to explicit import from 'firebase-functions/v1' SDK.
Are you going to upgrade to gen2 functions? Please, answer.

Firebase Extensions are not affected by this, see this comment. firebase/extensions#2127 (comment)

The original suggestion is to upgrade "stripe-firebase-extensions" from Cloud Functions v1 to v2. I personally agree and will follow through on it.

@pr-Mais
Copy link
Member

pr-Mais commented Sep 19, 2024

@Hibrix-net Unfortunately, v2 function triggers (including Firestore) are still not yet supported in Firebase Extensions, so we cannot do anything about it until then, once it's supported we can upgrade 🙂 check the docs here.

@Hibrix-net
Copy link

@Hibrix-net Unfortunately, v2 function triggers (including Firestore) are still not yet supported in Firebase Extensions, so we cannot do anything about it until then, once it's supported we can upgrade 🙂 check the docs here.

We already know that from @jauntybrain's response above. However, that doesn't mean we can't support the original suggestion in this thread, which could also help prompt an update to Firebase Extensions.

@pr-Mais
Copy link
Member

pr-Mais commented Sep 19, 2024

@Hibrix-net Unfortunately, v2 function triggers (including Firestore) are still not yet supported in Firebase Extensions, so we cannot do anything about it until then, once it's supported we can upgrade 🙂 check the docs here.

We already know that from @jauntybrain's response above. However, that doesn't mean we can't support the original suggestion in this thread, which could also help prompt an update to Firebase Extensions.

Sorry, I'm not following. The original request was to upgrade the functions deployed by this extension to v2, or did you mean something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants