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

Set consumer and consumergroups finalizers when creating them #3355

Merged
merged 2 commits into from Sep 27, 2023

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Sep 20, 2023

This is a mitigation for knative/pkg#2828

Before this patch, it was possible that a deleted consumer or
consumergroup might be reconciled and never finalized when
they are deleted before the finalizer is set.

This happens because the Knative generated reconciler uses
patch (as opposed to using update) for setting the finalizer
and patch doesn't have any optimistic concurrency controls.

Signed-off-by: Pierangelo Di Pilato pierdipi@redhat.com

Proposed Changes

  • Set consumer and consumergroups finalizers when creating them

Release Note

Before this patch, it was possible that a deleted consumer or 
consumergroup might be reconciled and never finalized when
they are deleted before the finalizer is set.

This happens because the Knative generated reconciler uses
patch (as opposed to using update) for setting the finalizer
and patch doesn't have any optimistic concurrency controls.

…e-extensions#823)

It is possible that a delete consumer or consumergroup might
be reconciled and never finalized when it is deleted before
the finalizer is set.
This happens because the Knative generated reconciler uses
patch (as opposed to using update) for setting the finalizer
and patch doesn't have any optimistic concurrency controls.

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 20, 2023
@knative-prow knative-prow bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. area/control-plane labels Sep 20, 2023
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #3355 (5e5e8a6) into main (e7f53ae) will decrease coverage by 3.09%.
Report is 8 commits behind head on main.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##               main    #3355      +/-   ##
============================================
- Coverage     61.61%   58.53%   -3.09%     
============================================
  Files           182       91      -91     
  Lines         12331     9237    -3094     
  Branches        268        0     -268     
============================================
- Hits           7598     5407    -2191     
+ Misses         4136     3402     -734     
+ Partials        597      428     -169     
Flag Coverage Δ
java-unittests ?

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

Files Coverage Δ
control-plane/pkg/reconciler/source/source.go 88.38% <100.00%> (+0.22%) ⬆️
...ls/kafka/eventing/v1alpha1/consumer_group_types.go 26.78% <0.00%> (-0.49%) ⬇️

... and 92 files with indirect coverage changes

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 20, 2023
@Cali0707
Copy link
Member

@pierDipi is this related to knative/pkg#2828?

@pierDipi
Copy link
Member Author

pierDipi commented Sep 20, 2023

yes, it's a mitigation of it

/retest

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@pierDipi
Copy link
Member Author

/cc @matzew

@knative-prow knative-prow bot requested a review from matzew September 21, 2023 08:20
@Cali0707
Copy link
Member

/retest

@pierDipi
Copy link
Member Author

/retest-required

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

/lgtm

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

knative-prow bot commented Sep 26, 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

Cali0707 commented Sep 26, 2023

/hold for other reviewers (if needed @pierDipi )

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2023
@pierDipi
Copy link
Member Author

/unhold

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2023
@matzew
Copy link
Contributor

matzew commented Sep 26, 2023

/test channel-integration-tests-ssl

@creydr
Copy link
Contributor

creydr commented Sep 26, 2023

/retest-required

@matzew
Copy link
Contributor

matzew commented Sep 27, 2023

/retest

@knative-prow
Copy link

knative-prow bot commented Sep 27, 2023

@pierDipi: 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 5e5e8a6 link false /test reconciler-tests-keda
reconciler-tests-loom_eventing-kafka-broker_main 5e5e8a6 link false /test reconciler-tests-loom
reconciler-tests-namespaced-broker-loom_eventing-kafka-broker_main 5e5e8a6 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.

@pierDipi
Copy link
Member Author

/retest-required

@knative-prow knative-prow bot merged commit d4caf75 into knative-extensions:main Sep 27, 2023
32 of 39 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 lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants