azure-functions-extension
azure-functions-extension copied to clipboard
Document behavior when no triggers are configured.
When deploying the sidecar to K8s during initiatlization it tries to connect to port 3001 even if you aren't using the trigger. So I had a function with a dapr output binding that wasn't working because port 3001 wasn't alive. I mitigated by adding a dapr trigger to the same app, but ideally we'd spin up a listener on 3001 if any dapr bindings were used
Thanks Jeff for opening this issue so we can track it. As I pointed out yesterday in the teams channel, this is an identified issue and Connor has a pr #21 open to address this. This pr is code reviewed a few weeks back, @ConnorMcMahon is there any particular thing blocking you from merging the pr?
My main concern is that my approach is not perfect, as it will open the port if the extension is installed and no bindings are created.
This is a problem for things like extension bundles, where customers will get this extension without explicitly opting into installing it, meaning that customers who aren't explicitly using DAPR will open this port unnecessarily, which can lead to lots of problems, especially if they are using something like slots, or hosting multiple apps on the same worker.
I think the easiest option at this point would be to require some field in the host.json that specifies to open this port, and we document that DAPR customers need to use this. Otherwise, I cannot think of a feasible way to open this port only when DAPR bindings or triggers are used.
As discussed in our last meeting, this is not really a bug, but something that we should clearly document.