-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add support for FUNCTIONS_WORKER_RUNTIME in host.json #3120
Comments
This needs additional discussion with @pragnagopa @ahmelsayed @mathewc |
as Pragna mentioned. the main issue currently is that the CLI used that value to figure out how to build, run, and publish the app. However, since that setting is stored in |
@ahmelsayed How do you deal with this issue on CI, or multiple developer environments? It seems like there isn't any real solution and we just need to train/document what setting it should be. |
@fabiomilheiro can you please clarify the issue you're seeing with your app? |
@fabiocav, the app works well locally and I go to Azure portal, after deploying the app. Trying to get the URL using the "Get function URL" button achieves the same result. The below is the function definition: As mentioned above, it works locally: So I'm assuming there is some problem with my host.json not having the necessary runtime setting to specify the language. Unfortunately, 404 is not very obvious so I'm struggling to get to the root cause. |
Found the problem. I created the azure function app via Pulumi (which uses Terraform) and the version is ~1 by default. I answered here: https://stackoverflow.com/a/67494279/169034 |
Glad to hear you found the issue. For future issues, it might be helpful to start with new issue describing the problem as the template also requests information that would enable us to look at the logs for your app, which would have made it simpler to detect what was happening. |
@fabiocav I have a problem which would benefit from the same solution (specifying the FunctionWorkerRuntime in the host.json) ... and I agree completely with this issue and @pragnagopa 's original statement, and that fundamentally it is incorrect to store this value in
I am deploying my function app from an Azure DevOps pipeline using the func azure functionapp publish myAwesomeFunction
# Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
# Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnetIsolated' while your local project is set to 'None'.
# You can pass --force to update your Azure app with 'None' as a 'FUNCTIONS_WORKER_RUNTIME' So following what it said, I added func azure functionapp publish myAwesomeFunction --csharp
# Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnetIsolated' while your local project is set to 'dotnet'.
# You can pass --force to update your Azure app with 'dotnet' as a 'FUNCTIONS_WORKER_RUNTIME' But then if I add I would argue the runtime value is not actually an environment setting, but is hard coupled to the functional type / source code and should be in the I do understand the approach you've taken with using
Even if you just support current known application settings in the next major version, and add supplemental as application settings incrementally through a major release lifecycle, that would be a big win. |
@fabiocav Are there any plans to do something about this? I have the same issue as @AdamCoulterOz and I don't really see how I can publish the function with |
This is a very uncomfortable situation. My only workaround is to create a |
host.json should support FUNCTIONS_WORKER_RUNTIME setting. Right now the CLI uses that setting for figuring out your app's type, since many operations (init, new, start, publish, etc) are language specific. Currently that is stored in local.settings.json which is not committed in the repo.
The text was updated successfully, but these errors were encountered: