vscode-yaml
vscode-yaml copied to clipboard
docker-compose.test.yaml file is using prometheus.rules.test.json first
Is your enhancement related to a problem? Please describe.
I have three compose files:
docker-compose.development.yamldocker-compose.production.yamldocker-compose.test.yaml
For docker-compose.test.yaml extension suggests prometheus.rules.test.json first and validates with that. Which is incorrect because my file is a compose file it starts with docker-compose.
Describe the solution you would like
Files start with docker-compose should be detected as a compose file first.
Describe alternatives you have considered
I can change with settings.json locally however this seems to a valid issue to me.
I have the same issue, so I'm commenting to track the progress. Unfortunately, I won't have time to investigate for a while due to a happy event 😇
As I have explained in this comment I suppose schema store added this filematch mapping which is causing vscode-yaml to select the incorrect schema.
Same issue
Hi, I found a solution, just uninstall the yaml extension in VSC.
Hi, I found a solution, just uninstall the yaml extension in VSC.
Sorry @DanielPachecosts, but that's not a solution.. I don't know if you've noticed but this is github repo of the YAML extension. This is why an issue has been opened.
Renaming to 'docker-compose-development.yaml'can help while waiting for better fix.
gorkem is correct.
To be much more specific, the SchemaStore project has mapped "*.test.yaml" to prometheus rules which must take precedence over the mapping of "**/docker-compose.*.yaml" to docker's compose-spec.json.
I think that Prometheus using *.test.yaml is a little rude in its broadness. We have helm files named "values.test.yaml" I would think is a common name. Funny thing, however, when I searched online for that, it appears most people used "values-test.yaml", which would not have the same issue. Even Helm's entry in the SchemaStore is strange to me. Perhaps my entire company is doing it wrong, but this is the only filematch that could pick up values.yaml or values-test.yaml - "/helmfile.d//*.yaml". I was unaware that you would be required to store them in a folder called "helmfile.d".