-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: trigger Action for base rate update #72
base: development
Are you sure you want to change the base?
fix: trigger Action for base rate update #72
Conversation
@whilefoo Struggling a bit here. The idea is that when it is a push event, I want to forward the event to the corresponding action from the worker. This part seems to work fine, but every time I get "invalid signature" from the Action run. I thought the order of the inputs was changing, but even when manually ordering them the problem remained the same. Two questions:
Edit: to answer my own question, it seems that indeed both payloads are different which most likely implies a different signature: Wouldn't it be beneficial to have the same payloads and let the SDK decode them properly so both payloads can be forwarded seamlessly between workers and actions? This would most likely be helpful for plugins needing both like telegram or much likely the user personal agent, that has a very complex bridge at the moment. |
Yeah I was also thinking about making the payloads the same in actions and workers, Action plugins were added later and it only supports strings and not objects so that's why the worker still has objects
I like to avoid that approach but if there's no other way then it's fine. What is the problem that you're trying to solve by mixing actions and workers? |
Okay I'll test having the same payload and same signature for both and see how that goes. What I am trying to solve is that because this plugin should react quickly on label change (so a Worker), but when it is running due to changes in the base multiplier, it has to check all the issues and update the price which is slow (so an Action). Recently everything was moved to an action due to the base rate change handling, but it would be much more user friendly to have instant price change on label change and have the long running update in the background (which is essentially what the spec describes). |
Well we can make this just a Worker and then make a different plugin that handles only base rate changes as an Action. |
That would be nice to be able to have hybrids easily because this would not be the only plugin who would benefit from this. And splitting the functionality to another plugin would mean copy/paste the configuration for each configuration using this plugin, which is why it is not preferable. |
Perhaps the telegram bridge can be used as reference but I'm skeptical it's the best implementation of a dual runtime plugin. |
Maybe what we need to do is move away from Cloudflare because it doesn't have Node and has low time limits. If we use another platform (Azure?) that has decent start-up time, has Node and higher time limits then we wouldn't even need to use Actions. |
|
@whilefoo and maybe it would fix the random skipping of events we currently experience. however this long running task of updating all the labels is really long (around 10 to 15 minutes depending of the amount of issues) which wouldn't probably fit in Azure either. |
Resolves #69