Description of problem: Hover help text should give correct instructions Version-Release number of selected component (if applicable): 4.2.0-0.nightly-2019-07-24-000310 How reproducible: Always Steps to Reproduce: 1. User open Import YAML editor, try to add content manually 2. Try to add these lines and see what hints will be given in YAML editor when hover the 'kind' text apiVersion: build.openshift.io/v1 kind: 3. ry to add these lines and see what hints will be given in YAML editor when hover the 'kind' text apiVersion: image.openshift.io/v1 kind: 4. ry to add these lines and see what hints will be given in YAML editor when hover the 'kind' text apiVersion: apps.openshift.io/v1 kind: Actual results: 2. Incorrect type, Expected "string" Value is not accepted. Valid values: "Build", "Build" 3. Incorrect type, Expected "string" Value is not accepted. Valid values: "ImageStreamLayers" 4. Incorrect type, Expected "string" Value is not accepted. Valid values: "DeploymentConfig", "DeploymentConfig" Expected results: 2. for apiVersion `build.openshift.io/v1`, we have kind: Build, kind: BuildConfig 3. for apiVersion `image.openshift.io/v1`, we also have more kinds supported, such as Image, ImageStream etc 4. for apiVersion `apps.openshift.io/v1`, we have DeploymentConfig, but the hover help info shows duplicate items Additional info:
Created attachment 1593139 [details] The suggestions look correct for kind
I'm not able to reproduce. (See screenshot.)
Do I need some key combinations?
I'm experiencing comment 3 on Firefox 68 and Chrome 75
We found out the combination key to get resource lists: control + space For apiVersion: apps.openshift.io/v1, the suggestion list is: DeleleOptions DeploymentConfig DeploymentConfigList DeploymentConfigRollback DeploymentLog DeploymentRequest Scale WatchEvent Some of the kind, DeploymentConfigList,DeploymentConfigRollback,DeploymentLog,DeploymentRequest,Scale,WatchEvent,DeleleOptions seems invalid, because when use these kind to create resources, the server will return error message "The server doesn't have a resource type "kind: Scale, apiVersion: apps.openshift.io/v1"."
The messages can be seen when hover the ~~~ " Incorrect type, Expected "string" Value is not accepted. Valid values: "Build", "Build" "
$ oc api-resources --api-group=apps.openshift.io NAME SHORTNAMES APIGROUP NAMESPACED KIND deploymentconfigs dc apps.openshift.io true DeploymentConfig So the only one kind for `apps.openshift.io/v1` is `DeploymentConfig`
When given these text in YAML editor apiVersion: build.openshift.io/v1 kind: Hover the text 'kind' it will give message: Incorrect type, Expected "string" Value is not accepted. Valid values: "Build", "BuildConfig", "BuildConfigList","BuildList","BuildLog","BuildRequest","DeleteOptions","WatchEvent" When I check supported API Resources via oc $ oc api-resources --api-group=build.openshift.io NAME SHORTNAMES APIGROUP NAMESPACED KIND buildconfigs bc build.openshift.io true BuildConfig builds build.openshift.io true Build It means only "Build" and "BuildConfig" are supported API resources in API Group 'build.openshift.io'. Can you explain why in YAML editor it shows some other suggested resources "BuildConfigList","BuildList","BuildLog","BuildRequest","DeleteOptions","WatchEvent" ?
It's not something I have control over from my side (the language server side). If that is the case then the JSON schema itself is wrong. I've turned the JSON schema that the YAML language server is given by the console into a github gist: https://gist.githubusercontent.com/JPinkney/5a74222b083db6ff85b3d74ed9e445be/raw/74c86e37edacb199e81d5e733d007d6f2fc67156/testschema.json. If you search for build.openshift.io you'll find that "BuildConfigList","BuildList","BuildLog" etc are all associated with build.openshift.io.
Those are valid resources in the API group, which include subresources. ❯ oc get --raw /apis/build.openshift.io/v1 { "kind": "APIResourceList", "apiVersion": "v1", "groupVersion": "build.openshift.io/v1", "resources": [ { "name": "buildconfigs", "singularName": "", "namespaced": true, "kind": "BuildConfig", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "bc" ], "categories": [ "all" ] }, { "name": "buildconfigs/instantiate", "singularName": "", "namespaced": true, "kind": "BuildRequest", "verbs": [ "create" ] }, { "name": "buildconfigs/instantiatebinary", "singularName": "", "namespaced": true, "kind": "BinaryBuildRequestOptions", "verbs": [ "create" ] }, { "name": "buildconfigs/webhooks", "singularName": "", "namespaced": true, "kind": "Build", "verbs": [ "create" ] }, { "name": "builds", "singularName": "", "namespaced": true, "kind": "Build", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "categories": [ "all" ] }, { "name": "builds/clone", "singularName": "", "namespaced": true, "kind": "BuildRequest", "verbs": [ "create" ] }, { "name": "builds/details", "singularName": "", "namespaced": true, "kind": "Build", "verbs": [ "update" ] }, { "name": "builds/log", "singularName": "", "namespaced": true, "kind": "BuildLog", "verbs": [ "get" ] } ] }
Thank you all for your explanation. Moving to VERIFIED since the issues have been resolved
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2922
*** Bug 1735685 has been marked as a duplicate of this bug. ***