Skip to content
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

Merged
merged 3 commits into from
Feb 7, 2020

Conversation

rhuss
Copy link
Contributor

@rhuss rhuss commented Feb 6, 2020

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)

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]>
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 6, 2020
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 6, 2020
@maximilien
Copy link
Contributor

/retest

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/service/configuration_edit_flags.go 82.4% 83.0% 0.6
pkg/kn/commands/service/describe.go 79.8% 80.0% 0.2
pkg/kn/commands/service/service.go 87.0% 85.7% -1.2
pkg/kn/commands/source/apiserver/apiserver.go 59.1% 62.5% 3.4
pkg/kn/commands/source/binding/binding.go 58.8% 58.2% -0.6
pkg/kn/commands/source/cronjob/cronjob.go 59.1% 62.5% 3.4
pkg/serving/config_changes.go 79.8% 79.9% 0.1
pkg/serving/revision_template.go 62.9% 58.1% -4.8
pkg/serving/service.go 90.6% 94.7% 4.1
pkg/serving/v1/client.go Do not exist 82.7%
pkg/serving/v1/client_mock.go Do not exist 94.9%

@navidshaikh
Copy link
Collaborator

/retest

Failed to successfully execute 'kn service create hello --image gcr.io/knative-samples/helloworld-go -n kne2etests3': Execution error: stderr: 'RevisionMissing: Revision "hello-lvkcn-1" referenced in traffic not found.

@rhuss
Copy link
Contributor Author

rhuss commented Feb 7, 2020

/retest

@rhuss
Copy link
Contributor Author

rhuss commented Feb 7, 2020

Failed to successfully execute 'kn service create hello --image gcr.io/knative-samples/helloworld-go -n kne2etests3': Execution error: stderr: 'RevisionMissing: Revision "hello-lvkcn-1" referenced in traffic not found.

@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.

@rhuss
Copy link
Contributor Author

rhuss commented Feb 7, 2020

@navidshaikh tests are green now, not sure how to review this beast best though ;-)

@navidshaikh
Copy link
Collaborator

@rhuss: We've been seeing this failure only against serving v0.12.0, didnt notice any against serving nightly though. Raised #641 to see we this occurs against serving v0.12.1.

Copy link
Collaborator

@navidshaikh navidshaikh left a 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!

Comment on lines +26 to 29
dynamicfake "k8s.io/client-go/dynamic/fake"
eventingv1alpha1 "knative.dev/eventing/pkg/apis/eventing/v1alpha1"
servingv1 "knative.dev/serving/pkg/apis/serving/v1"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 249 to 251
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
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines -192 to +188
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{
Copy link
Collaborator

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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +636 to +637
func getRevisionTemplate() (*servingv1.RevisionTemplateSpec, *corev1.Container) {
template := &servingv1.RevisionTemplateSpec{
Copy link
Collaborator

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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2020
@knative-prow-robot knative-prow-robot merged commit 1b9a76b into knative:master Feb 7, 2020
@knative-prow-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants