-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devfile 2.0 parser #2918
Comments
We are unmarshaling here first to get the Then again unmarshaling to corresponding apiVersion structure. |
@adisky Is there any outlook on the devfile 2.0 parser? There are quite a few items currently depending on that. |
@elsony yes i am working on the parser. few points i would like to get suggestions from team, problem here is Devfile v1 and v2 structures are completely different e.g.
It is very difficult to come to common types https://github.com/openshift/odo/blob/master/pkg/devfile/parser/data/common/types.go I can think of following options to solve it.
|
as discussed with @kadel, since it is difficult to map |
I think it is fine to implement v2 parser separately. I guess the main question is more on how we can easily stage in the v2 functions. Before we have the functions based on v2 implemented enough to replace v1, we'll probably still need to keep the v1 functions around. To do that, the suggested adapter layer approach is probably the cleanest to implement. |
@adisky Will your changes include implementing the v2 adapter? |
@johnmcollier @elsony Since We were not sure about the adapter approach (creating adapter for each versions), I have added conversion structures from v1 to common, Please check the WIP PR
|
The current approach that we have is to covert the devfile v2 to the common structure which is currently based on v1.0. I think it is a simpler way to get the devfile v2 to work with existing code. In a long term, does it makes more sense to have the common structure based on the v2.0 and convert from v1.0 to the common which is based on v2.0? The reason that I am saying that is because by the time that we remove the experimental flag, we'll most likely remove the v1.0 support and only v2.0 devfile will be supported. So using v2.0 as the based for common structure may work better. |
yes in the long run, common structures would be based on V2.0. We can modify the common structures one by one, so that it does not break adapters, and also with the features addition based on v2.0. |
This approach sounds good to me |
closed by #3216 |
/kind user-story
User Story
Add devfile parser support to read devfiles that users the devfile 2.0 specification. Details of devfile 2.0 specification can be found under:
devfile/api#15
Devfile schema link: TBD
Acceptance Criteria
Links
/kind user-story
/area devfile
The text was updated successfully, but these errors were encountered: