-
Notifications
You must be signed in to change notification settings - Fork 225
delete ra deployment when sink is not found #1533
Conversation
/assign |
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 will try verifying it on the cluster later, but I added some comments first.
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.
/approve
/lgtm
/hold
The changes look good, thanks for addressing the comments.
However, I had hard time reproducing the original problem, so, added a /hold
for other eyes.
cc @slinkydeveloper mind having a look?
test/e2e/helpers/kafka_helper.go
Outdated
) | ||
|
||
var ( | ||
topicGVR = schema.GroupVersionResource{Group: strimziApiGroup, Version: strimziApiVersion, Resource: strimziTopicResource} | ||
topicGVR = schema.GroupVersionResource{Group: strimziApiGroup, Version: strimziApiVersion, Resource: strimziTopicResource} | ||
KafkaChannelGVR = schema.GroupVersionResource{Group: "messaging.knative.dev", Version: "v1beta1", Resource: "kafkachannels"} |
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.
Why?
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.
added KafkaCannelGVR for deleting it
0, | ||
}, { | ||
"create_sink", | ||
createChannel, |
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 don't get why you're using the kafka channel here 😄, if you need to create a "sink", can you use a simpler one (like the test images to receive events)?
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 wanted to use the simplest one like you have mentioned, but if am not wrong, if the sink is "v1/Service", it is not validated to see if its available or not. Reconciles to true always. Next option was to use ksvc, but i dint see any ksvc used as sink in any of the eventing tests nor the knative serving components getting installed. Thats why used a channel. Willing to change to simpler ones if there are other options.
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 think you need an addressable, so maybe using a kube service with a pod behind the hood is fine? I would love as much as possible to have this "dependency" between the kafka source tests and kafka channel
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.
but with kube service as i mentioned above , its not reporting the right status on the kafks source. It always reconciles to true whether its there are not. I initially tried with kube service only.
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.
ok so then, more than creating a kafka channel, can you create an imc channel and clearly state you need it for that purpose? Because IMC is part of the eventing "core release", it's installed in the test env for sure. You cannot make the same assumption with kafka channel
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 the sink is "v1/Service", it is not validated to see if its available or not.
Oh, ok, this is the reason that I wasn't able to reproduce the issue. I was trying with a Kube service
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.
used imc initially, the tests failed, then switched to kafka channel. Tried one more time with imc, got the below logs in tests
=== RUN TestKafkaSourceReconciler/create_sink
=== CONT TestKafkaSourceReconciler
creation.go:77: Creating channel &TypeMeta{Kind:InMemoryChannel,APIVersion:messaging.knative.dev/v1beta1,}-e2e-rt-channel
creation.go:85: Failed to create "InMemoryChannel" "e2e-rt-channel": the server could not find the requested resource
creation.go:90: Failed to create "InMemoryChannel" "e2e-rt-channel": the server could not find the requested resource
=== CONT TestKafkaSourceReconciler/create_sink
testing.go:964: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
=== CONT TestKafkaSourceReconciler
test_runner.go:195: EVENT: {{ } {e2e-rt-kafka-source.163333e31993bfcc test-kafka-source-reconciler-wbvf2 /api/v1/namespaces/test-kafka-source-reconciler-wbvf2/events/e2e-rt-kafka-source.163333e31993bfcc 278249f1-af24-4582-93f9-4811b4e4e239 1172 0 2020-09-09 19:22:23 +0000 UTC <nil> <nil> map[] map[] [] [] []} {KafkaSource test-kafka-source-reconciler-wbvf2 e2e-rt-kafka-source be8ceb0b-957b-4e18-813c-5c40244dbdd3 sources.knative.dev/v1beta1 19196 } InternalError getting sink URI: failed to get lister for messaging.knative.dev/v1beta1, Resource=inmemorychannels: inmemorychannels.messaging.knative.dev is forbidden: User "system:serviceaccount:knative-sources:kafka-controller-manager" cannot list resource "inmemorychannels" in API group "messaging.knative.dev" at the cluster scope {kafkasource-controller } 2020-09-09 19:22:23 +0000 UTC 2020-09-09 19:22:25 +0000 UTC 6 Warning 0001-01-01 00:00:00 +0000 UTC nil nil
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.
The first 2 errors (failed to create) are weird, i don't get what's the problem there tbh, double check all the code you use to start the imc. in fact, in testlib.Client there should be a method to create a imc channel (it's from eventing/test/lib), you don't need to develop it by yourself.
The last error is clearly an issue of cluster roles, seems like you need some specific cluster role to check if the addressable is ready. @matzew any thoughts on that?
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.
imc was not set up as part of e2e set up, added those in the e2e scripts and test passes. @slinkydeveloper @matzew
|
/lgtm Thanks for your contribution! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, itsmurugappan, slinkydeveloper 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 |
/unhold |
Hey @itsmurugappan seems like the tests you made are a little bit flaky, can you please check them out? #1561 #1562 #1563 #1564 |
sure , i will take a look. |
Fixes #1493
Proposed Changes
Release Note