-
Notifications
You must be signed in to change notification settings - Fork 902
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
Extensions with scheduled triggers not supported. PR created ✔ #5374
Comments
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information. |
@polarby because of firebase/extensions#876, i saw you are also using the counter extension in the emulator. Thought you might be interested as well |
If you need to run functions with a low frequency (once every hour/day..) you can usually run those functions manually (as you also most likely won't have the emulator running for that time). Tasks that require high-frequency emulation, will be more challenging to handle and likely need support for scheduled functions from the firebase team. Low-frequency functions (manual emulation)Run the terminal in your project directory
It will show all your callable functions, including your scheduled ones. Run those by calling them:
|
@polarby thank you. Appreciate it. In this case the controllerCore function is not even recognized as a callable function by the emulator. It is completey ignored because of the unknown trigger and therefore does not get loaded/instantiated at all 😞 |
Yeah, that sure is a Problem. A workaround for now (and not too time-consuming) is for sure to copy-paste the source code of those emulated functions and then run them. But let's keep this issue open for the implementation of this essential feature! |
Would it make sense to merge my PR in the mean time? Its not very invasive and at least enables the emulator to parse and instantiate the function, so that It can be triggered from the parent application without copying the source code. |
Thanks for the contribution! Closing this since you added support. |
[REQUIRED] Environment info
firebase-tools: 11.19.0
Platform: Windows
[REQUIRED] Test case
There is a new unit test case in #5373
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Extensions with scheduled trigger are also supported by the emulator.
[REQUIRED] Actual behavior
Extensions with scheduled trigger are also supported by Emulator.
The
triggerHelper
module defines which triggers are supported. The scheduleTrigger is currently not handled and therefore not supported.firebase-tools/src/extensions/emulator/triggerHelper.ts
Lines 33 to 47 in 86a5ba1
To be able to use extensions like
firebase-counter
in the emulator and without modifications we need support for scheduleTriggers. I created PR #5373 which converst the scheduleTrigger to a pubSub trigger which in turn can be triggered by writing to the pubsub topic.The text was updated successfully, but these errors were encountered: