vscode-openshift-tools icon indicating copy to clipboard operation
vscode-openshift-tools copied to clipboard

Check devfile version is 2.0.0 before using it in odo --devfile option

Open dgolovin opened this issue 4 years ago • 2 comments

New Component is using devfile.yaml silently without checking what is actually inside it. That approach fails for devfiles v < 2.0.0.

dgolovin avatar Mar 13 '21 00:03 dgolovin

@dgolovin so in Che if we have a project with a devfile v1 in, will this change allow a user to create a new component with s2i? Or does odo still detect there's a devfile and still try and fail to apply it (schema validation)?

sympatheticmoose avatar Apr 15 '21 09:04 sympatheticmoose

@sympatheticmoose I was not thinking about che at all. Good point. Was actually thinking to backup the devfile v1 and create devfile component after that. This obviously is not going to work well for che.

For components like this we can just show the warning message instead of letting odo to fail. Would that work?

dgolovin avatar Apr 16 '21 05:04 dgolovin

As odo and OpenShift DevSpaces all uses devfile v2. The extension should show the error message that occurs when an older version devfile (v1) is used.

mohitsuman avatar Nov 13 '22 13:11 mohitsuman