Bug 1732740
| Summary: | [CONSOLE-1476] Give correct help info in YAML editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yadan Pei <yapei> | ||||
| Component: | Management Console | Assignee: | Josh Pinkney <jpinkney> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.2.0 | CC: | aos-bugs, jokerman, jpinkney, mbenitez, mmccomas, spadgett, yapei | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.2.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-10-16 06:31:08 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Yadan Pei
2019-07-24 09:05:17 UTC
Created attachment 1593139 [details]
The suggestions look correct for kind
I'm not able to reproduce. (See screenshot.) Do I need some key combinations? 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. *** |