openyurtio / openyurt

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)
https://openyurt.io
Apache License 2.0
1.68k stars 391 forks source link

return back watch.Deleted event to clients when watch object is removed in OjbectFilters #1995

Closed rambohe-ch closed 3 months ago

rambohe-ch commented 3 months ago

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line: /kind bug /kind documentation /kind enhancement /kind good-first-issue /kind feature /kind question /kind design /sig ai /sig iot /sig network /sig storage

/kind feature

What this PR does / why we need it:

ResponseFilter return watch.Deleted event back to clients when Standalone object is filtered to nil in ObjectFilters.

by the way, this feature will be helpful for all ObjectFilters, not only for nodeportisolation filter.

Which issue(s) this PR fixes:

Fixes #1994

Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 53.05%. Comparing base (43704c9) to head (0773528). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1995 +/- ## ========================================== + Coverage 53.03% 53.05% +0.02% ========================================== Files 176 176 Lines 20929 20944 +15 ========================================== + Hits 11099 11112 +13 - Misses 8882 8884 +2 Partials 948 948 ``` | [Flag](https://app.codecov.io/gh/openyurtio/openyurt/pull/1995/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openyurtio) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/openyurtio/openyurt/pull/1995/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openyurtio) | `53.05% <100.00%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openyurtio#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Congrool commented 3 months ago

lgtm, but I still have questions for some of the modifications. @rambohe-ch PTAL

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.1% Duplication on New Code

See analysis details on SonarCloud

rambohe-ch commented 3 months ago

@Congrool I have fixed you comments, PTAL

Congrool commented 3 months ago

/rerun

Congrool commented 3 months ago

/approve /lgtm