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

fix #4986 remove finalizer for pingsource adapter #5002

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

zhaojizhuang
Copy link
Member

@zhaojizhuang zhaojizhuang commented Mar 2, 2021

Relation #4986 remove pingsource adapter's finalizers

Proposed Changes

  • Do not use finalizer for pingSource

Release Note

Do not set the finalizer for pingSource for pingSource controller, just deal with it in reconcilekind

Docs

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 2, 2021
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 2, 2021
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 2, 2021
@zhaojizhuang
Copy link
Member Author

/assign @lionelvillard

@zhaojizhuang zhaojizhuang changed the title fix #4986 remove pingsource adapter fix #4986 remove finalizer for pingsource adapter Mar 2, 2021
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #5002 (d319e5a) into master (abd6f98) will decrease coverage by 0.05%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5002      +/-   ##
==========================================
- Coverage   83.09%   83.04%   -0.06%     
==========================================
  Files         283      283              
  Lines        7933     7944      +11     
==========================================
+ Hits         6592     6597       +5     
- Misses        968      971       +3     
- Partials      373      376       +3     
Impacted Files Coverage Δ
pkg/adapter/mtping/adapter.go 68.88% <ø> (ø)
pkg/adapter/mtping/pingsource.go 38.46% <33.33%> (-28.21%) ⬇️
pkg/adapter/mtping/controller.go 70.58% <100.00%> (+9.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abd6f98...764edf1. Read the comment docs.

@vaikas
Copy link
Contributor

vaikas commented Mar 2, 2021

The one thing to make sure is, what's our plan for existing pingsources that do have the finalizer. So, after somebody upgrades from say .21 to .22, we need to make sure that the right things happen because there are existing finalizers in play.

@lionelvillard
Copy link
Member

/test pull-knative-eventing-integration-tests

@lionelvillard
Copy link
Member

we can reuse most of this code for cleanup the finalizers: #3836

if !ok || pingSource == nil {
return
}
r.mtadapter.Remove(context.Background(), pingSource)
Copy link
Member

Choose a reason for hiding this comment

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

While you are at it, can you change the signature of Remove to just pass pingSource (for consistency sake)?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lionelvillard Thanks for your remind, Done!

@lionelvillard
Copy link
Member

@zhaojizhuang this is awesome, thanks!

Do you feel like tackling the post-install job in this PR or a separate one?

@zhaojizhuang
Copy link
Member Author

zhaojizhuang commented Mar 3, 2021

@zhaojizhuang this is awesome, thanks!

Do you feel like tackling the post-install job in this PR or a separate one?

@lionelvillard I will create another PR to solve this #5008

@zhaojizhuang
Copy link
Member Author

/retest

@zhaojizhuang zhaojizhuang force-pushed the remove_finalizer branch 3 times, most recently from 712a3ea to 446a52b Compare March 8, 2021 15:36
@zhaojizhuang
Copy link
Member Author

UT updated,cc @lionelvillard

Base automatically changed from master to main March 8, 2021 17:40
@zhaojizhuang
Copy link
Member Author

/test pull-knative-eventing-reconciler-tests

@zhaojizhuang
Copy link
Member Author

/retest

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/adapter/mtping/pingsource.go 83.3% 69.2% -14.1

@lionelvillard
Copy link
Member

/test pull-knative-eventing-reconciler-tests

@lionelvillard
Copy link
Member

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lionelvillard

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2021
@knative-prow-robot knative-prow-robot merged commit 5b2912a into knative:main Mar 9, 2021
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. cla: yes Indicates the PR's author has signed the CLA. 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