Skip to content
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 for dotnet-isolated version 8.0 for managed APIs #1394

Open
paule96 opened this issue Jan 16, 2024 · 2 comments
Open

Support for dotnet-isolated version 8.0 for managed APIs #1394

paule96 opened this issue Jan 16, 2024 · 2 comments

Comments

@paule96
Copy link

paule96 commented Jan 16, 2024

Is your feature request related to a problem? Please describe.
Dotnet 8.0 is now out for around 2 months, so it would be nice to have the support also in azure static web apps.
Currently when you try to deploy an dotnet 8.0 functions project to azure static webapp you will get with the swa cli the following response:

PS /workspaces/CZ.Azure.FileExchange> swa deploy ./temp/fe/wwwroot/ --deployment-token $token --api-location ./temp/api/

Welcome to Azure Static Web Apps CLI (1.1.6)

Deploying front-end files from folder:
  /workspaces/CZ.Azure.FileExchange/temp/fe/wwwroot

Deploying API from folder:
  /workspaces/CZ.Azure.FileExchange/temp/api

Consider providing api-language and version using --api-language and --api-version flags,
    otherwise default values apiLanguage: node and apiVersion: 16 will apply

Deploying to environment: preview

WARNING: Failed to read staticwebapp.config.json configuration from:
   /workspaces/CZ.Azure.FileExchange/temp/fe/wwwroot/staticwebapp.config.json

The following error was encountered: must be equal to one of the allowed values dotnet:3.1, dotnet:6.0, dotnet-isolated:6.0, dotnet-isolated:7.0, node:12, node:14, node:16, node:18, python:3.8, python:3.9, python:3.10
0: {
1:     "platform": {
2:         "apiRuntime": "dotnet-isolated:8.0"
3:     },

Please fix the above error and try again to load and use the configuration.
Read more: https://aka.ms/swa/config-schema
Deploying project to Azure Static Web Apps...
Could not find StaticSitesClient local binary
[swa] ✔ Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.025241/linux/[email protected]
⠋ Preparing deployment. Please wait...✖ 
✖ Deployment Failed :(
✖ Deployment Failure Reason: spawn ETXTBSY
✖ For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/azure/static-web-apps/

✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
  https://github.com/Azure/static-web-apps-cli/issues/new/choose

When you try it manually (so directly talk to the SWA apis, that I refactored) you get no errors but the following result:
image

This is the behavior if Azure static webapps has a problem to start the functions API

Describe the solution you'd like
I know that there will be some time to go to get in-process support for dotnet 8.0. But it would be nice to have already access to it for isolated installations.

What was confusing is that there is a blog post out, that claims that it should work to deploy a dotnet 8.0 isolated SWA functions API:
https://techcommunity.microsoft.com/t5/apps-on-azure-blog/build-and-deploy-net-8-blazor-wasm-apps-with-serverless-apis/ba-p/3988412

A sample project to try things out can be found here:
codez-one/CZ.Azure.FileExchange#39

@thomasgauvin
Copy link
Contributor

Thanks for bringing this to our attention, looking into it!

@thomasgauvin
Copy link
Contributor

@paule96 thanks for reporting the bug, as a temporary workaround, deploys from a GH Actions/Azure DevOps setup should work as well, worth considering as a workaround for now while we work on the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants