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

Pass eventtype owner to data plane #3284

Merged

Conversation

Cali0707
Copy link
Member

Part of #3181

We need the eventtype Reference/Owner information in the dataplane so that we can auto create event types in #3181.

Proposed Changes

  • Pass the event type ownership info through the data plane contract

…tocreate

Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/cc @Leo6Leo @matzew @creydr

@knative-prow knative-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/control-plane area/data-plane labels Aug 10, 2023
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #3284 (96f709f) into main (5b46ea2) will decrease coverage by 0.04%.
Report is 4 commits behind head on main.
The diff coverage is 64.70%.

❗ Current head 96f709f differs from pull request most recent head 02c3426. Consider uploading reports for the commit 02c3426 to get more accurate results

@@             Coverage Diff              @@
##               main    #3284      +/-   ##
============================================
- Coverage     61.54%   61.50%   -0.04%     
- Complexity      761      764       +3     
============================================
  Files           181      181              
  Lines         12316    12338      +22     
  Branches        265      267       +2     
============================================
+ Hits           7580     7589       +9     
- Misses         4140     4144       +4     
- Partials        596      605       +9     
Flag Coverage Δ
java-unittests 70.88% <50.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
control-plane/pkg/reconciler/broker/broker.go 72.65% <100.00%> (+0.10%) ⬆️
control-plane/pkg/reconciler/channel/channel.go 69.21% <100.00%> (+0.10%) ⬆️
...ntrol-plane/pkg/reconciler/channel/v2/channelv2.go 71.06% <100.00%> (+0.09%) ⬆️
control-plane/pkg/reconciler/sink/kafka_sink.go 75.38% <100.00%> (+0.15%) ⬆️
.../kafka/broker/core/eventtype/EventTypeBuilder.java 92.00% <100.00%> (+0.69%) ⬆️
.../core/reconciler/impl/ResourcesReconcilerImpl.java 85.44% <0.00%> (-1.10%) ⬇️
control-plane/pkg/contract/contract.pb.go 7.34% <0.00%> (-0.07%) ⬇️

... and 3 files with indirect coverage changes

@Cali0707
Copy link
Member Author

/retest-required

1 similar comment
@Cali0707
Copy link
Member Author

/retest-required

@creydr
Copy link
Contributor

creydr commented Aug 17, 2023

/test upgrade-tests

1 similar comment
@Leo6Leo
Copy link
Contributor

Leo6Leo commented Aug 17, 2023

/test upgrade-tests

@Cali0707
Copy link
Member Author

I think the upgrade test failures might be real failures, I will look into it

Comment on lines 625 to 631
EventTypeOwnerReference: &contract.Reference{
Uuid: string(broker.UID),
Name: broker.Name,
Namespace: broker.Namespace,
Kind: brokerKind,
Version: brokerAPIVersion,
},
Copy link
Member

@pierDipi pierDipi Aug 21, 2023

Choose a reason for hiding this comment

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

Why not including the missing fields in reference field?

Copy link
Member Author

Choose a reason for hiding this comment

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

@pierDipi is there a different reference field I could be including them on?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it's called Reference under Resource

// Resource reference.
//
// This reference is used to reference the associated resource for data plane
// activities such as:
// - setting the `source` attribute of a KafkaSource event (when it's not a CloudEvent)
// - tagging metrics
Reference reference = 11;

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah okay I was only looking at the ingress object, my bad! I'll update this PR

…ocreate

Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707 Cali0707 force-pushed the pass-eventtype-owner-to-data-plane branch from 280b408 to 09f2c23 Compare August 22, 2023 20:07
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 22, 2023
Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/cc @pierDipi @Leo6Leo

@knative-prow knative-prow bot requested a review from pierDipi August 22, 2023 20:10
Signed-off-by: Calum Murray <cmurray@redhat.com>
@Leo6Leo
Copy link
Contributor

Leo6Leo commented Aug 28, 2023

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2023
@Leo6Leo
Copy link
Contributor

Leo6Leo commented Aug 28, 2023

/retest-required

@Cali0707
Copy link
Member Author

@Leo6Leo I think the test failure is an actual issue, not a flaky failure here. Not sure what is causing the issue though...

@@ -259,6 +259,8 @@ func ChannelReference() *contract.Reference {
Uuid: ChannelUUID,
Namespace: ChannelNamespace,
Name: ChannelName,
Kind: "KafkaChannel",
Version: messagingv1beta1.SchemeGroupVersion.String(),
Copy link
Member

Choose a reason for hiding this comment

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

I think Version here is meant to be ResourceVersion as opposed to GroupVersion

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh okay, I need the group version so I will add a new field for that then. Thanks!

Signed-off-by: Calum Murray <cmurray@redhat.com>
@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 6, 2023
@Cali0707
Copy link
Member Author

Now that changes to the contract are backwards compatible, the tests are passing on this PR.

/cc @pierDipi @Leo6Leo

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 23, 2023
Signed-off-by: Calum Murray <cmurray@redhat.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 25, 2023
@Cali0707
Copy link
Member Author

/test upgrade-tests

@pierDipi
Copy link
Member

pierDipi commented Oct 2, 2023

/retest-required

1 similar comment
@Cali0707
Copy link
Member Author

Cali0707 commented Oct 4, 2023

/retest-required

@Cali0707
Copy link
Member Author

Cali0707 commented Oct 6, 2023

/test upgrade-tests

Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 11, 2023
Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/retest

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2023
Copy link

knative-prow bot commented Nov 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Cali0707
Copy link
Member Author

/test reconciler-tests

Copy link

knative-prow bot commented Nov 20, 2023

@Cali0707: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
reconciler-tests-keda_eventing-kafka-broker_main 3c85417 link false /test reconciler-tests-keda
reconciler-tests-loom_eventing-kafka-broker_main 3c85417 link false /test reconciler-tests-loom
reconciler-tests-namespaced-broker-loom_eventing-kafka-broker_main 3c85417 link false /test reconciler-tests-namespaced-broker-loom

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.

@knative-prow knative-prow bot merged commit ee8d67d into knative-extensions:main Nov 20, 2023
31 of 34 checks passed
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. area/control-plane area/data-plane lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants