Failed to start workspaces using devfile spec v2.1.0
See original GitHub issueDescribe the bug
When I try to start a workspace using a factory link it fails with “Failed to resolve a devfile.”
Che version
Nightly
Steps to reproduce
Deploy Che, on OpenShift, with devworkspace support enabled
$ cat patch.yaml
spec:
devWorkspace:
enable: true
$ chectl server:deploy --che-operator-cr-patch-yaml=patch.yaml \
-p openshift --no-olm-suggested-namespace \
-n workspaces-server
Open a factory link
open ${CHE_URL}/#https://github.com/l0rd/spring-petclinic/ # <== devfile v2
open ${CHE_URL}/#https://github.com/l0rd/spring-petclinic/tree/che-happy-path # <== devfile v1
Runtime
OpenShift 4.7.1
Installation method
$ chectl version
chectl/0.0.20210315-next.19bcb80 darwin-x64 node-v12.21.0
Environment
OpenShift dev cluster
More screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Chapter 4. Authoring devfiles - Red Hat Customer Portal
This section explains the concept of a devfile and how to configure a CodeReady Workspaces workspace by using a devfile of the 1.0...
Read more >Introduction to Devfile - GitHub Pages
A list of commands: actions to manage the workspace components like running the dev tools, starting the runtime environments etc… Example of the...
Read more >Devfile v2 and IDE plug-ins in Eclipse Che - Medium
1.0 specification. Devfile v1 were handled by Eclipse Che Server workspace engine using Java/Kubernetes API. There is a new engine for devfile ......
Read more >Devfile v2 and IDE plug-ins - Eclipse Che Blog
1.0 specification. Devfiles v1 were handled by Eclipse Che Server workspace engine using Java/Kubernetes API. There is a new engine for v2 ......
Read more >VS Code and IntelliJ with CodeReady Workspaces v2 ... - l0rd.io
The Devfile is a CNCF Sandbox project and the full specification of the file format is here. A simple devfile as the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
to be honest, that check is done only when we fetch Devfile via ID or URI(devfile plugin component), but the goal is to rework it to DevWorkspaceTemplate, or both.
DevWorkspace CRD itself does not have
schemaVersion
at all(since it’s devfile metadata which is not part of devfile which is included into devworkspace.spec.template). DevWorkspace CRD has only the following versions:Go side just ignore unknown fields, but kubectl does validation and throw an error when unknown field is used, and tell how to skip validation. So, technically dashboard should also warn user if validation is failed.
Kubectl validation details
We’ve thus far been rolling with whatever the latest schemaVersion for devfile 2.x is. Since 2.x is supposed to be backwards compatible, our check is basically the regex
2\..*
.However, on the Go side, trying to deserialize unknown fields isn’t an error – if DWO supports only 2.0 (no cpuLimit) they’ll just be ignored if you throw a 2.1.0 devfile at it. Since we don’t have a full 2.1.0 release yet, currently DWO supports devfile features as of commit https://github.com/devfile/api/commit/283b0c54946e9fea9872c25e1e086c303688f0e8, which is in-line with a
2.1.0-alpha
.