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

compose: azd add does not force alpha schema annotation #4572

Open
1 task done
JeffreyCA opened this issue Nov 21, 2024 · 1 comment
Open
1 task done

compose: azd add does not force alpha schema annotation #4572

JeffreyCA opened this issue Nov 21, 2024 · 1 comment
Labels
compose composability enhancement good first issue Good for newcomers
Milestone

Comments

@JeffreyCA
Copy link

Output from azd version
azd version 1.11.0 (commit 5b92e06)

Describe the bug
Image

To Reproduce

  1. azd config set alpha.compose on
  2. git clone https://github.com/luabud/TheCatSaidNo.git
  3. cd TheCatSaidNo
  4. azd init - select Use code in the current directory and then Confirm and continue initializing my app
  5. Open azure.yaml in VS Code. Make sure the YAML extension is installed.

Expected behavior
There shouldn't be a schema validation error flagged - it may be due to line 1 referencing the 1.0 YAML schema instead of the alpha one:

# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json

If you instead go through the azd init flow using the Create a minimal project flow, the generated azure.yaml uses the alpha schema:

# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/alpha/azure.yaml.json

Environment

  • IDE and version: VS Code 1.95.3
@weikanglim
Copy link
Contributor

weikanglim commented Nov 21, 2024

We could make a small tweak to automatic update the resource schema annotation to alpha when running azd add, somewhere in the code here.

Just for completeness, the intellisense will show up as red, but azd will work as normal regardless of the schema annotation, so this is a minor presentation change but a good UX improvement.

@weikanglim weikanglim added this to the Backlog milestone Nov 21, 2024
@weikanglim weikanglim added the good first issue Good for newcomers label Nov 21, 2024
@weikanglim weikanglim changed the title [Issue] azure.yaml schema validation error after going through "simplified init" flow with alpha.compose on compose: azd add does not force alpha schema annotation Nov 21, 2024
@weikanglim weikanglim added the compose composability label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compose composability enhancement good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants