-
Notifications
You must be signed in to change notification settings - Fork 592
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
Trigger conversion function (v1alpha1 <-> v1beta1) #2508
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vaikas 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 |
// Converts obj from v1beta1.Trigger into v1alpha1.Trigger | ||
func (sink *Trigger) ConvertDown(ctx context.Context, obj apis.Convertible) error { | ||
switch source := obj.(type) { | ||
case *v1beta1.Trigger: |
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 should be v1alpha1.Trigger right?
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.
wait what the...
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.
ah ok the older version takes the conversion. I see.
|
||
// ConvertDown implements apis.Convertible | ||
func (sink *Trigger) ConvertDown(ctx context.Context, source apis.Convertible) error { | ||
return fmt.Errorf("v1 is the highest known version, got: %T", source) |
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.
v1 -> v1beta1
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.
thanks, fixed.
/lgtm There is a nit on #2508 (comment) with the wrong version in the error message. |
/lgtm |
The following is the coverage report on the affected files.
|
@vaikas: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Addresses #1869
Proposed Changes
Release Note