Skip to content
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

Consider moving the Devfile Parser to the top level and update the Parse function also validate #2669

Closed
rajivnathan opened this issue Mar 3, 2020 · 4 comments · Fixed by #2726
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation kind/user-story An issue of user-story kind
Projects

Comments

@rajivnathan
Copy link
Contributor

rajivnathan commented Mar 3, 2020

Which functionality do you think we should add?

We can consider moving pkg/devfile/parser and pkg/devfile/versions to a top-level folder since it seems like it could be moved to a separate repo altogether and so should be more decoupled from the odo code. Maybe pkg/parser or pkg/devfile-parser so it will make it easier to separate it out later?

#2629 removed some validation code. Maybe we can add it back to a new package like pkg/devfile/validation that lives within the odo code. I'm thinking for odo we'd want the pkg/devfile/Parse function to still validate but just call the validation from an odo package.

This is based on a previous comment: #2629 (comment)

/kind user-story
/area devfile
/remove kind user-story

@openshift-ci-robot openshift-ci-robot added area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation labels Mar 3, 2020
@kadel
Copy link
Member

kadel commented Mar 3, 2020

I think that whole pkg/devfile should be mostly generic

@rajivnathan
Copy link
Contributor Author

@kadel Do you mean odo code should not be in pkg/devfile? The devfile adapter code which is only for odo is currently under pkg/devfile/adapters, are you suggesting we move that somewhere else?

@openshift-ci-robot openshift-ci-robot added the kind/user-story An issue of user-story kind label Mar 3, 2020
@girishramnani girishramnani added this to For consideration in Sprint 181 via automation Mar 9, 2020
@kadel
Copy link
Member

kadel commented Mar 11, 2020

@kadel Do you mean odo code should not be in pkg/devfile? The devfile adapter code which is only for odo is currently under pkg/devfile/adapters, are you suggesting we move that somewhere else?

I would probably put adapters to pkg/adapters.

@kanchwala-yusuf
Copy link
Contributor

@kadel, @rajivnathan :
Currently, the devfile parser related stuff is spread across multiple packages (viz. parser, versions). I was wondering if it would make sense to move all the devfile parser related packages into a single package pkg/devfile/parser.

And I would suggest to keep all the devfile related packages within pkg/devfile to keep the devfile related functionality at one place under one package. So, we can have adapters under pkg/devfile/adapters itself. To address this issue, we can have another package for validation pkg/devfile/validations.

Do you guys concur with the above opinion?

@girishramnani girishramnani moved this from For consideration to To do in Sprint 181 Mar 11, 2020
@girishramnani girishramnani removed this from To do in Sprint 181 Mar 30, 2020
@girishramnani girishramnani added this to For consideration in Sprint 182 via automation Mar 30, 2020
@girishramnani girishramnani moved this from For consideration to To do in Sprint 182 Mar 30, 2020
@girishramnani girishramnani moved this from To do to In progress in Sprint 182 Mar 30, 2020
Sprint 182 automation moved this from In progress to Done Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation kind/user-story An issue of user-story kind
Projects
No open projects
Sprint 182
  
Done
Development

Successfully merging a pull request may close this issue.

6 participants