-
Notifications
You must be signed in to change notification settings - Fork 109
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
Remove egresses copy when comparing resources for change detection #1393
Remove egresses copy when comparing resources for change detection #1393
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1393 +/- ##
============================================
+ Coverage 76.56% 76.57% +0.01%
Complexity 584 584
============================================
Files 99 99
Lines 3597 3599 +2
Branches 165 165
============================================
+ Hits 2754 2756 +2
Misses 633 633
Partials 210 210
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
792e2b4
to
ad896a5
Compare
The assumption that contract.resources[*].egreeses don't change when we update a resource in the contract is not true anymore (and it is not really needed), so removing the copy. Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com>
ad896a5
to
b3ca318
Compare
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
@@ -46,14 +46,19 @@ const ( | |||
ResourceUnchanged | |||
) | |||
|
|||
func SetResourceEgressesFromContract(contract *contract.Contract, resource *contract.Resource, index int) { | |||
if index != NoResource { |
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.
can we get a comment here on a follow up PR?
@@ -171,6 +171,7 @@ func (r *Reconciler) reconcileKind(ctx context.Context, broker *eventing.Broker) | |||
|
|||
brokerIndex := coreconfig.FindResource(ct, broker.UID) | |||
// Update contract data with the new contract configuration |
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.
should we expand this comment, based on the reasoning for the newly added line?
/test pull-knative-sandbox-eventing-kafka-broker-integration-tests |
The assumption that
contract.resources[*].egreeses
don't changewhen we update a resource in the contract is not true anymore
(and it is not really needed for most of our resources,
only Broker needs that),
so removing the copy.
Part of #312
Proposed Changes
Release Note
Docs