Skip to content

v2 functions don't support retry even though cloud functions gen2 do #5484

Closed
firebase/firebase-functions
#1463
@pavelgj

Description

@pavelgj

[REQUIRED] Environment info

firebase-tools: 11.21.0

Platform: macOS

[REQUIRED] Test case

exports.customeventhandler = onCustomEventPublished(
  {
    eventType: "firebase.extensions.storage-resize-images.v1.complete",
    retry: true,
  },
  (e) => {
    console.log(JSON.stringify(e));
  });

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

logger.warn("Cannot set a retry policy on Cloud Function", endpoint.id);

EventTrigger has retryPolicy field, so it should be set when retry option is specified.
https://cloud.google.com/functions/docs/reference/rest/v2/projects.locations.functions#eventtrigger

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions