Skip to content

Newer/older Kubernetes schemas break autocompletion/diagnostics #778

@someone-stole-my-name

Description

@someone-stole-my-name

Summary

While debugging someone-stole-my-name/yaml-companion.nvim#12 we've seen some bizarre behavior. One would expect yaml-language-server to work with Kubernetes schemas higher or lower than the one hardcoded if the user explicitly adds them, but that's not currently the case. Bumping even the patch version seems to break diagnostics and autocompletion behaves differently despite 1.22.4 and 1.22.5 being the same, e.g.

{
    "yaml.schemas": {
        "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.22.5-standalone-strict/all.json": "/*.yaml"
    }
}

With 1.22.5 the following document doesn't display the expected Property foo is not allowed.

apiVersion: networking.k8s.io/v1
kind: Ingress
foo: bar

And autocompletion is not working correctly either. Anything under spec: is not autocompleted as it does in 1.22.4:

apiVersion: networking.k8s.io/v1
kind: Ingress
spec:

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions