-
Notifications
You must be signed in to change notification settings - Fork 262
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
feature(serving): Update API to serving.knative.dev/v1 #640
Conversation
Due to an issue with 0.12.0 (a missing constant) the update also includes an update to the latest knative-serving and knative-eventing dependencies from master (as reflected in version.go) Signed-off-by: Roland Huß <[email protected]>
/retest |
The following is the coverage report on the affected files.
|
/retest
|
/retest |
@navidshaikh any idea how we could fix that ? For me it looks like a backend race condition within serving though. We would need to isolate the test (e.g. the concrete backend calls) and then pen an issue in serving. |
@navidshaikh tests are green now, not sure how to review this beast best though ;-) |
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.
/lgtm
Nice! A lot of clean up also went in with this work, specially fixing the import aliases!
Thank you!
dynamicfake "k8s.io/client-go/dynamic/fake" | ||
eventingv1alpha1 "knative.dev/eventing/pkg/apis/eventing/v1alpha1" | ||
servingv1 "knative.dev/serving/pkg/apis/serving/v1" | ||
) |
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.
👍
if p.AnyMutation(cmd) { | ||
err = servinglib.UpdateName(template, name) | ||
if err == servinglib.ApiTooOldError && !cmd.Flags().Changed("revision-name") { | ||
// Ignore the error if we don't support revision names and nobody | ||
// explicitly asked for one. | ||
} else if err != nil { | ||
return err | ||
} | ||
template.Name = name | ||
} |
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.
👍
template, err := servinglib.RevisionTemplateOfService(service) | ||
assert.NilError(t, err) | ||
template.Spec.GetContainer().EnvFrom = []corev1.EnvFromSource{ | ||
template := &service.Spec.Template | ||
template.Spec.Containers[0].EnvFrom = []corev1.EnvFromSource{ |
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.
👍
}, | ||
} | ||
|
||
// ResolveSink returns the Destination referred to by the flags in the acceptor. | ||
// It validates that any object the user is referring to exists. | ||
func (i *SinkFlags) ResolveSink(knclient kn_dynamic.KnDynamicClient, namespace string) (*duckv1beta1.Destination, error) { | ||
func (i *SinkFlags) ResolveSink(knclient clientdynamic.KnDynamicClient, namespace string) (*duckv1.Destination, error) { |
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.
👍
func getRevisionTemplate() (*servingv1.RevisionTemplateSpec, *corev1.Container) { | ||
template := &servingv1.RevisionTemplateSpec{ |
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.
👍
func getV1alpha1Service() (*servingv1alpha1.Service, *servingv1alpha1.RevisionTemplateSpec, *corev1.Container) { | ||
template, container := getV1alpha1RevisionTemplateWithOldFields() | ||
service := &servingv1alpha1.Service{ | ||
func getV1alpha1Service() (*servingv1.Service, *servingv1.RevisionTemplateSpec, *corev1.Container) { |
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.
func getV1alpha1Service() (*servingv1.Service, *servingv1.RevisionTemplateSpec, *corev1.Container) { | |
func getV1Service() (*servingv1.Service, *servingv1.RevisionTemplateSpec, *corev1.Container) { |
We can rename the function in a subsequent PR.
sink := &v1.Destination{ | ||
Ref: &v12.ObjectReference{Name: sinkService, Kind: "Service", Namespace: "default", APIVersion: "serving.knative.dev/v1alpha1"}, | ||
sink := &duckv1.Destination{ | ||
Ref: &duckv1.KReference{Name: sinkService, Kind: "Service", Namespace: "default", APIVersion: "serving.knative.dev/v1"}, |
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.
👍
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh, rhuss 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 |
Due to an issue with 0.12.0 (a missing constant) the update also includes an update
to the latest knative-serving and knative-eventing dependencies from master
(as reflected in version.go)