-
Notifications
You must be signed in to change notification settings - Fork 225
KafkaChannel reconciler to use KafkaChannel v1beta1 API #1407
KafkaChannel reconciler to use KafkaChannel v1beta1 API #1407
Conversation
Did some work, there's still compile errors and crap, will do the rest after knative/eventing#3702 is done |
Now this PR needs #1408 to get merged |
12d8580
to
fc04911
Compare
fc04911
to
3886b9c
Compare
/retest |
I am able to reproduce the problem in the failing tests:
To reproduce:
apiVersion: v1
kind: ConfigMap
metadata:
name: config-kafka
namespace: knative-eventing
data:
# Broker URL. Replace this with the URLs for your kafka cluster,
# which is in the format of my-cluster-kafka-bootstrap.my-kafka-namespace:9092.
bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092
apiVersion: messaging.knative.dev/v1alpha1
kind: KafkaChannel
metadata:
name: kafka-channel
spec: {}
apiVersion: messaging.knative.dev/v1
kind: Subscription
metadata:
name: subscription
spec:
channel:
apiVersion: messaging.knative.dev/v1alpha1
kind: KafkaChannel
name: kafka-channel
subscriber:
ref:
apiVersion: v1
kind: Service
name: foo |
Hmm, the root cause of the problem looks like having the annotation as v1 on v1alpha1 resource. When I apply the resource
and then describe:
I don't get why the |
@matzew Yes, it looks like it does. I pushed a new commit. Let's see what happens. |
These log lines from eventing-controller seem interesting as well (there are multiple of them), but I'm not sure if they are related:
|
Yes, they're related. That's exactly the problem. The subscriber reconciler wants to patch the channel with a |
/retest I don't see the |
@nlopezgi does this ring a bell for you? |
It might be related, as the issue I'm seeing is also related to subscribers. I think there might be something missing in the types to properly do this migration (e.g., does the This issue might be related to the one I'm seeing if the reason you are seeing the Not sure if this helps, but more details of the error I'm seeing are in knative/eventing#3789. |
So I looked a bit more at the types code to try to understand what is happening. I think the core issue is related to the ChannelableCombined. This type is supposed to represent "a skeleton type wrapping Subscribable and Addressable of both v1alpha1 and v1beta1 duck types". This leads me to think that as part of the types migration we need to add something else there for the Subscribable and Addressable for v1, otherwise we might end up breaking in some form backward compatibility (but again, I know little of how these things evolve in practice, so I might be missing something) |
@nlopezgi I think the "unknown field: subscribers" problem is now solved. The subscribable duck type support annotation was somehow set to v1 even for v1alpha1 type and that was causing the reconciler to assume the api shape is different. I don't know what's failing now. I am now trying to understand. It is hard to debug when tracing comes into play. |
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
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.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -name '*.pb.go' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v .pb.go | grep -v wire_gen.go)
@@ -18,11 +18,24 @@ package v1alpha1 | |||
|
|||
import ( | |||
"context" |
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.
Format Go code:
"context" | |
"context" | |
/retest |
/lgtm |
zap.Any("destination", c.sub.SubscriberURI), | ||
zap.Any("reply", c.sub.ReplyURI), | ||
zap.Any("delivery", c.sub.Delivery), | ||
zap.String("subscription", c.sub.String()), |
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.
oh, was that the reason of the issues ?
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, but it was causing other issues in logging. The reason of issues was the previous subscription
type used by the dispatcher
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
/approve
/retest |
1 similar comment
/retest |
/retest I compared it with the previous failure and the same tests fail for different API versions. |
it seems to be on |
/retest |
@slinkydeveloper I am on PTO and leaving to driving to beaches :) thanks for taking care of this! |
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
The following is the coverage report on the affected files.
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, matzew, pierDipi 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 |
Fixes #1397
Proposed Changes
Release Note
Docs