-
Notifications
You must be signed in to change notification settings - Fork 36
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
Port over odo parser #34
Conversation
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
V2 parser structure 2
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think it's a bad idea to have no-logic getters on exported fields (e.g. return d.Parent
) unless we can justify more complicated logic in the future.
@amisevsk they reason why we have those |
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
pkg/devfile/parser/context/fake.go
Outdated
@@ -0,0 +1,10 @@ | |||
package parser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should FakeContext
be move to testingutil
package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all fields inDevfileCtx
are defined as internal, and cannot be accessible outside of the context package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Let's move FakeContext() to xxx_test.go so that it is not visible outside of tests. Also, we should consider not exporting this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we should rename the file to avoid confusion.
The function should be kept as exported, because consumers(like odo) would need that function for their testing purpose.
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
I don't thing that this is a good approach. I was under assumption that we have agreement on evolving and doing all necessary changes to parser in odo repo first, and then once we have independent parser package in odo we extract it from odo and put it here. The first step was supposed to be in a the opposite direction. If there are additional things in devfile/parser that are not in odo it should be added into odo parser package. |
When will odo parser finish with evolving? |
I haven't seen this issue on odo side before redhat-developer/odo#4117 (comment) |
Signed-off-by: Stephanie <[email protected]>
Should we be vendoring the go module dependencies here? Might be a good idea |
IMO if we're going to start vendoring dependencies in this repo, it should be done in a separate PR. |
@amisevsk I'm fine with either way. I will modify the commit history if we want to remove the vendor folder. I don't want the git history to be too big. @adisky And additional concerns? I would like to get approval from you two before merging this PR. |
@yangcao77 To keep the history clean you can squash all the commits before merging
For Porting purpose from odo to here, It is good to go from my side but more work needed to make it consumable as library |
If we're squashing this commit before merging then removing the vendoring is essential -- otherwise the commit that ends up in the history is completely useless from a history point of view. I have no problem with force-pushes to PR branches personally. Vendor vs not vendor is a topic worth discussing and not something we should slide into a PR about something generally separate. |
Signed-off-by: Stephanie <[email protected]>
Signed-off-by: Stephanie <[email protected]>
0661819
to
6c0f459
Compare
I do not want to squash all commit into one single commit, that would lose all commit history inside this PR. |
I'm going to merge this PR if no additional concerns have been raised end of Tuesday(EDT). We need this PR to proceed our next step. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the review comments were addressed for the PR
/lgtm
What does this PR do?
This PR moves the parser pkg from Odo repo to devfile/parser, and integrates with latest devfile go structs defined in devfile/api
What issues does this PR fix or reference?
Fixes devfile/api#183
Is your PR tested? Consider putting some instruction how to test your changes
Tested by running the unit tests within this PR.