-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support v4 of azure functions #159
Comments
Putting a "help wanted" tag on this. It's something I'd like to get to, but I'm unclear one what the support in SWA is for Azure Functions v4 (Azure/static-web-apps#1139) and I don't have time to dig into the v4 changes right now. If someone is sufficiently motivated to open a PR for this, I'd be happy to review. The sk_render function code is here: https://github.com/geoffrich/svelte-adapter-azure-swa/blob/main/files/entry.js |
Support for the v4 Node.js programming model for Static Web Apps' managed functions is still pending, so it may not be worth investigating this yet. We'll likely put out an update when support comes, likely months away. |
Thanks for the context Thomas! |
Update, after investigations, the rollout of v4 Node.js is trickling through, still needs to be investigated why there remains some functions that don't yet have Node.js v4 functions. I would say this is no longer blocked-by-upstream, as it's slowly rolling out (if you're having issues, open a support issue so we can investigate why your SWA/region doesn't yet have v4 Node.js) |
* remove function.json - it is not needed anymore * rename function path to "sk_render" since v4 does not allow the path to start with "__" See also: https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-version-4-of-the-node-js-programming-model-is-in/ba-p/3773541 closes geoffrich#159
I've create a working implementation of v4 API here main...derkoe:svelte-adapter-azure-swa:feat/azure-functions-v4 One issue is still open - I need to call Everything seems to work like with the current adapter but I found some issues with both that are "blockers" with the "SvelteKit demo app". Theses issues are already present in the current implementation:
@geoffrich any idea? maybe we can use the routed from the builder to construct a good routes array (but how to deal with auth)? |
This seems only an issue locally with the SWA CLI.
This does not occur on a deployed version but there I get a 500 with the current adapter: https://green-wave-04c808103-preview.westeurope.5.azurestaticapps.net/sverdle |
Thanks for working on this @derkoe!
What breaks if you don't do this? If it's bundling the entry, I wonder if the If both the SWA CLI issues are present in the current implementation, then I wouldn't worry about resolving them as part of the v4 work. At least the full static route issue is already known. The infinite redirect issue also sounds familiar but it's been a bit since I looked at SWA CLI stuff. |
Not sure why you're getting a 500 with the current version of the adapter but my demo app still seems to work: https://polite-desert-00b80111e.2.azurestaticapps.net/sverdle |
Just checked that - it works when I deploy with the GitHub Action (https://green-wave-04c808103.5.azurestaticapps.net/sverdle) but it does not work if I deploy with the SWA CLI 🤷♂️ (https://green-wave-04c808103-v2.westeurope.5.azurestaticapps.net/sverdle). |
Fixed that with derkoe@6ad10e0 The app works perfectly when deployed with the GitHub Action - here is a demo: https://green-wave-04c808103-1.westeurope.5.azurestaticapps.net/ @geoffrich should I create a PR for the change? |
Please do @derkoe ! |
* remove function.json - it is not needed anymore * rename function path to "sk_render" since v4 does not allow the path to start with "__" See also: https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-version-4-of-the-node-js-programming-model-is-in/ba-p/3773541 closes geoffrich#159
Right now the adaptor seems to generate a v3 function sk_render but in my project I'm using v4 functions.
The text was updated successfully, but these errors were encountered: