Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
412 stars 201 forks source link

[Issue] Update azure.yaml reference on DevHub to reflect that `service` `language` property can be omitted. #1307

Closed savannahostrowski closed 1 year ago

savannahostrowski commented 1 year ago

In our docs, we currently list that language property is required for the service. The currently supported values per the docs are: dotnet, csharp, fsharp, py, python, js, ts, java.

However, if you are developing an Azure Container App hosted project, you can write code in whatever language you please, since it's in a container. In our docs, we should make it clear that other languages are not "disallowed" when using container apps as you can easily omit this property, provision and deploy without issue (an example: https://github.com/savannahostrowski/terminal-personal-site/blob/main/azure.yaml... this is a Hugo app).

ellismg commented 1 year ago

However, if you are developing an Azure Container App hosted project, you can write code in whatever language you please, since it's in a container. In our docs, we should make it clear that other languages are not "disallowed" when using container apps as you can easily omit this property, provision and deploy without issue (an example:

Internally, all projects must have a language assigned to them. If language is not set on a service, we default it to be a .NET service (this is a historical artifact, and probably something we should remove, and force a user to set a value).

The reason we require a language to be set today (even for containerized applications where you are correct we should not care) is so that azd restore can run the correct language specific restore actions. As much as I dislike azd restore, I think we need it now for cases where you run containerized applications locally after initializing a repository, since our templates are configured to run the applications outside of the containers when running locally.

jongio commented 1 year ago

I think we keep as-is until we:

  1. Auto-detect what language should be used.
  2. If we can't detect or find multiple, then ask the user to specify in Azure.yaml
savannahostrowski commented 1 year ago

This is no longer true with https://github.com/Azure/azure-dev/pull/2066