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: support cache response for partial object metedata watch request #2209

Conversation

rambohe-ch
Copy link
Member

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:

improve saveWatchObject function in cache manager for supporting paritialobjectmetadata watch requests.

Which issue(s) this PR fixes:

Fixes #2199

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 73.52941% with 9 lines in your changes missing coverage. Please review.

Project coverage is 45.16%. Comparing base (7763e7c) to head (a4c84bc).
Report is 49 commits behind head on master.

Files with missing lines Patch % Lines
pkg/yurthub/proxy/util/util.go 50.00% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2209       +/-   ##
===========================================
- Coverage   58.93%   45.16%   -13.78%     
===========================================
  Files         210      402      +192     
  Lines       18968    27781     +8813     
===========================================
+ Hits        11179    12546     +1367     
- Misses       6707    14003     +7296     
- Partials     1082     1232      +150     
Flag Coverage Δ
unittests 45.16% <73.52%> (-13.78%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vie-serendipity
Copy link
Member

/LGTM

@vie-serendipity
Copy link
Member

func (cm *cacheManager) saveWatchObject(ctx context.Context, info *apirequest.RequestInfo, r io.ReadCloser, stopCh <-chan struct{}) error {

BTW, I noticed that stopCh parameter is not used in saveWatchObject function. I think this could be optimzed.

@zyjhtangtang
Copy link
Contributor

/LGTM

@zyjhtangtang zyjhtangtang merged commit 1ff3533 into openyurtio:master Dec 10, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request]support partialobjectmetadata watch request
3 participants