-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adding dockerfile component #106
Conversation
Co-authored-by: William Tam <wtam@redhat.com>
This is targeted to 2.1.0 but we have only a single version of types. How is this versioning going to work? |
@kadel I'm not sure i understand your question, do you mean the schemaVersion? In the devfile library, devfile 2.0.0 and 2.1.0 are separate schema, but i figured that the kubernetes-api can have all the common structs to be used. |
Yes, I'm wondering how is this going to work with For example, If I have a devfile that has |
btw @ranakan19, you need to run |
I assume that at some point we would have to keep several versions of the K8S apis (like the v1, v2alpha1, etc, ...), and possibly maintain a mapping between a devfile schema version (semantic-versioning compatible) and the corresponding K8S API version. That's something that is done for K8S itself for example. But we should obviously discuss how this could be achieved as simply as possible in our case, knowing that we want to avoid in upcoming devfile schema versions, changes that would introduce incompatible changes. |
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 order to correctly manage:
- unions
- mandatory fields that should be made optional in overrides
There would be some additional changes to add to this PR to have it complete. I'll provide them as a PR on your PR asap.
NOTE: In the future things should be simpler since:
- PR checks would validate the changes
- Some tooling would allow generating these additional manual changes automatically.
I created PR ranakan19#2 to fix some small errors, and add required code for correct union management. |
I have 2 other questions:
//Source within dockerfile component
type Source struct {
// path to local source directory folder
SourceDir string `json:"sourceDir,omitempty"`
// path to source repository hosted locally or on cloud
Location string `json:"location,omitempty"`
} Are the 2 fields mutually exclusive and can they both have a value defined.
|
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 assume we should first clearly define how devfile schema versioning vs K8S APIs versioning will work, before merging this PR.
cc @l0rd
Got some clarification ... |
for 1, Yes the fields are mutually exclusive. I'm not sure about 2, we should discuss it in the meeting. |
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.
This PR is superseded by #127. Please close this one.
Closing in favor of #127 |
What does this PR do?
Adds dockerfile component for devfile 2.1.0
What issues does this PR fix or reference?
In reference to https://github.com/devfile/parser/issues/26
Is your PR tested? Consider putting some instruction how to test your changes
Not applicable.
Docs PR