-
Notifications
You must be signed in to change notification settings - Fork 910
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 paging list in karmada search proxy #3402
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3402 +/- ##
==========================================
+ Coverage 51.63% 51.95% +0.31%
==========================================
Files 210 210
Lines 18926 19077 +151
==========================================
+ Hits 9772 9911 +139
+ Misses 8622 8617 -5
- Partials 532 549 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Test client: factory := informers.NewSharedInformerFactoryWithOptions(c, 0, informers.WithTweakListOptions(func(options *metav1.ListOptions) {
options.Limit = 5
}))
factory.Core().V1().Pods().Informer()
factory.Start(stopCh)
factory.WaitForCacheSync(stopCh) Logs in search:
|
/assign @XiShanYongYe-Chang |
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.
add some comment .
Echo test log here before retesting:
|
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.
Thanks~
if rv == "" { | ||
return | ||
} |
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.
Just a question: when the rv is empty, will an error occur when the whole rv is displayed at the end because the rv of a cluster is empty?
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.
No, the missing cluster is not nested in the multi cluster rv
@@ -125,6 +136,7 @@ func marshalRvs(rvs map[string]string) []byte { | |||
} | |||
|
|||
type multiClusterContinue struct { | |||
RV string `json:"rv"` |
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.
Is this change a user-facing change?
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.
User will receive a encoded string. In principle users shall only regard it as a string, and don't care what the playload in it.
Signed-off-by: yingjinhui <yingjinhui@didiglobal.com>
Thanks a lot Ask again review from @liblikewhen |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang 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 |
/lgtm I think we need to rebase it to the previous branch, @ikaven1024 can you help do it? |
Do you mean |
Yes, it is. |
…02-upstream-release-1.5 Automated cherry pick of #3402: fill cluster rv in proxying list
…02-upstream-release-1.4 Automated cherry pick of #3402: fill cluster rv in proxying list
…02-upstream-release-1.3 Automated cherry pick of #3402: fill cluster rv in proxying list
What type of PR is this?
/kind bug
What this PR does / why we need it:
When paging query via karmada search proxy, if member cluster resources number is larger than page size (
limit
), the returnresourceVersion
andcontinue
is not incorrect.For example, there are two member clusters:
And client request with:
Incomplete
resourceVersion
got:
{"cluster1":"123"}
(decoded), while want{"cluster1":"123","cluster2":"456"}
Unreasonable
continue
There's no resource version in
continue
, and next page query will got a wrong rv.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: