vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

docker-compose.test.yaml file is using prometheus.rules.test.json first

Open MansurAliKoroglu opened this issue 2 years ago • 8 comments

Is your enhancement related to a problem? Please describe.

I have three compose files:

  • docker-compose.development.yaml
  • docker-compose.production.yaml
  • docker-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.

MansurAliKoroglu avatar Jun 28 '23 01:06 MansurAliKoroglu

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 😇

ThomasSanson avatar Jul 12 '23 07:07 ThomasSanson

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.

gorkem avatar Jul 14 '23 17:07 gorkem

Same issue

jontingvold avatar Oct 11 '23 14:10 jontingvold

Hi, I found a solution, just uninstall the yaml extension in VSC.

DanielPachecosts avatar Dec 19 '23 19:12 DanielPachecosts

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.

urosctd avatar Jan 29 '24 08:01 urosctd

Renaming to 'docker-compose-development.yaml'can help while waiting for better fix.

stan-peryt avatar Mar 18 '24 17:03 stan-peryt

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".

dstorfer-cn avatar Jun 26 '24 20:06 dstorfer-cn