-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: [restful v2] count(*) & hook #34369
Conversation
73ba689
to
6187249
Compare
@PowderLi E2e jenkins job failed, comment |
internal/proxy/hook_interceptor.go
Outdated
} | ||
} | ||
|
||
func RestfulHookInterceptor() restfulHandler { |
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.
Better to rename as ServerHookInterceptor
internal/proxy/hook_interceptor.go
Outdated
@@ -17,38 +17,47 @@ import ( | |||
|
|||
var hoo hook.Hook | |||
|
|||
type restfulHandler func(ctx context.Context, req any, userName, fullMethod string, handler grpc.UnaryHandler) (interface{}, error) |
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.
rename ,do not include restful
This thing is being utilized not only for "restful" purposes.
6187249
to
7625c66
Compare
@PowderLi E2e jenkins job failed, comment |
internal/proxy/hook_interceptor.go
Outdated
return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { | ||
return HookInterceptor()(ctx, req, getCurrentUser(ctx), info.FullMethod, handler) |
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.
Perhaps it would be better to use the HookInterceptor return value as a method directly, because it can reduce one layer of function calls, like HookIntercept(xxx, xxx, xxx)
7625c66
to
4007033
Compare
@PowderLi E2e jenkins job failed, comment |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #34369 +/- ##
==========================================
+ Coverage 80.92% 84.33% +3.40%
==========================================
Files 1113 825 -288
Lines 138345 113669 -24676
==========================================
- Hits 111960 95859 -16101
+ Misses 22145 13590 -8555
+ Partials 4240 4220 -20
|
/run-cpu-e2e |
1. param filter is not requried 2. param limit is useless while outputFields = [count(*)] Signed-off-by: PowderLi <[email protected]>
Signed-off-by: PowderLi <[email protected]>
4007033
to
3cdbb04
Compare
/approve |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: czs007, PowderLi 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 |
issue: #31224 #34374
for query api:
add hook about grpc call