Skip to content

V1 schedule.onRun doesn't call onInit #1680

Open
@tecbot

Description

@tecbot

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

labels: { "deployment-scheduled": "true" },

makeCloudFunction is wrapping withInit on the first line

handler = withInit(handler ?? contextOnlyHandler);

However, because of the deployment-scheduled label it uses the non wrapped handler:

promise = contextOnlyHandler(context);

Expected behavior

onInit callback is called

Actual behavior

onInit is not called and causes issues with the function execution

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions