-
Notifications
You must be signed in to change notification settings - Fork 941
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
v2 functions don't support retry
even though cloud functions gen2 do
#5484
Closed
pavelgj opened this issue
Feb 2, 2023
· 3 comments
· Fixed by firebase/firebase-functions#1463 or #6391
Closed
v2 functions don't support retry
even though cloud functions gen2 do
#5484
pavelgj opened this issue
Feb 2, 2023
· 3 comments
· Fixed by firebase/firebase-functions#1463 or #6391
Comments
Any news on this issue? |
any news on this? its concerning that you cant deploy event functions with retries since the ability to retry an event is kind of the whole point. for anyone stuck on this you can update this file (with patch-package) to set a
diff --git a/node_modules/firebase-tools/lib/gcp/cloudfunctionsv2.js b/node_modules/firebase-tools/lib/gcp/cloudfunctionsv2.js
index 38ed977..8da2118 100644
--- a/node_modules/firebase-tools/lib/gcp/cloudfunctionsv2.js
+++ b/node_modules/firebase-tools/lib/gcp/cloudfunctionsv2.js
@@ -241,7 +241,8 @@ function functionFromEndpoint(endpoint, source) {
proto.renameIfPresent(gcfFunction.eventTrigger, endpoint.eventTrigger, "triggerRegion", "region");
proto.copyIfPresent(gcfFunction.eventTrigger, endpoint.eventTrigger, "channel");
if (endpoint.eventTrigger.retry) {
- logger_1.logger.warn("Cannot set a retry policy on Cloud Function", endpoint.id);
+ gcfFunction.eventTrigger.retryPolicy = 'RETRY_POLICY_RETRY'
+ // logger_1.logger.warn("Cannot set a retry policy on Cloud Function", endpoint.id);
}
gcfFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, gcfFunction.serviceConfig.environmentVariables), { FUNCTION_SIGNATURE_TYPE: "cloudevent" });
}
|
upvote on this, any plans for it? |
This was referenced Sep 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[REQUIRED] Environment info
firebase-tools: 11.21.0
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
firebase deploy --only functions
[REQUIRED] Expected behavior
Should deploy function with retry policy
[REQUIRED] Actual behavior
Shows a warning
Cannot set a retry policy on Cloud Function
and does not set the retry policy.Warning is coming from here:
firebase-tools/src/gcp/cloudfunctionsv2.ts
Line 528 in a2b9389
EventTrigger
hasretryPolicy
field, so it should be set whenretry
option is specified.https://cloud.google.com/functions/docs/reference/rest/v2/projects.locations.functions#eventtrigger
The text was updated successfully, but these errors were encountered: