-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add conversion for v1 Task #5202
Conversation
Skipping CI for Draft Pull Request. |
a46ff58
to
cfd9b17
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/kind misc |
/kind misc |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abayer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM. Thanks Lee! Thoughts:
|
I think pointer receivers need to be implemented in the package where the struct is defined, so probably not.
I'm not sure how this would work exactly; this sounds like something that would accept an |
sink.StdoutConfig = (*v1.StepOutputConfig)(s.StdoutConfig) | ||
sink.StderrConfig = (*v1.StepOutputConfig)(s.StderrConfig) | ||
|
||
// TODO(#4546): Handle deprecated fields |
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.
Q: Will conversions fail if we do not implement this in this PR?
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.
no, since we don't have the v1 version added to our CRD yet. I have a follow-up PR almost ready that adds conversion for Resources. If we did have v1 versions in the task crd, conversion wouldn't fail, but it would silently drop any resources the user has defined. (I think this may only be backwards incompatible once we update the storage version of the crd but I'm not completely sure)
LGTM! Just a typo and a question! |
This commit adds conversion functions between v1beta1 and v1 Task. It does not handle fields deprecated in v1beta1 that will not be present in v1. It implements ConvertTo and ConvertFrom for v1beta1 Task, and leaves these functions unimplemented for v1 Task, since it is the highest known version. Conversions for all types are basically deep copies, rather than using the same struct definition for both API versions. This will allow us to iterate on v1 without making additional changes to v1beta1, after v1 is the stored version.
The following is the coverage report on the affected files.
|
Filed #5250 |
/test tekton-pipeline-unit-tests |
Different flake this time :( |
/test tekton-pipeline-unit-tests |
/lgtm |
Changes
This commit adds conversion functions between v1beta1 and v1 Task.
It does not handle fields deprecated in v1beta1 that will not be present in v1.
It implements ConvertTo and ConvertFrom for v1beta1 Task, and leaves
these functions unimplemented for v1 Task, since it is the highest known version.
Part n of #4984.
Conversions for all types are basically deep copies, rather than using the same struct
definition for both API versions. This will allow us to iterate on v1 without making additional
changes to v1beta1, after v1 is the stored version, as discussed in #5181.
/kind misc
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes