-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Labels
Description
firebase-functions: 6.3.2
If creating a schedule.onRun function, onInit is not called because of this lines:
Will set label deployment-scheduled to true
firebase-functions/src/v1/providers/pubsub.ts
Line 155 in cce55b5
labels: { "deployment-scheduled": "true" }, |
makeCloudFunction is wrapping withInit on the first line
firebase-functions/src/v1/cloud-functions.ts
Line 370 in cce55b5
handler = withInit(handler ?? contextOnlyHandler); |
However, because of the deployment-scheduled label it uses the non wrapped handler:
firebase-functions/src/v1/cloud-functions.ts
Line 411 in cce55b5
promise = contextOnlyHandler(context); |
Expected behavior
onInit callback is called
Actual behavior
onInit is not called and causes issues with the function execution