-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
refactor: modularize grpc server #18284
Conversation
Important Auto Review SkippedAuto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the TipsChat with CodeRabbit Bot (
|
package gogoreflection | ||
|
||
import ( | ||
"reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import Note
"fmt" | ||
"io" | ||
"log" | ||
"reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import Note
for id, desc := range gogoproto.RegisteredExtensions(m) { | ||
if id == extID { | ||
return desc | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for id, desc := range proto.RegisteredExtensions(m) { //nolint:staticcheck // keep for backward compatibility | ||
if id == extID { | ||
return &gogoproto.ExtensionDesc{ | ||
ExtendedType: desc.ExtendedType, //nolint:staticcheck // keep for backward compatibility | ||
ExtensionType: desc.ExtensionType, //nolint:staticcheck // keep for backward compatibility | ||
Field: desc.Field, //nolint:staticcheck // keep for backward compatibility | ||
Name: desc.Name, //nolint:staticcheck // keep for backward compatibility | ||
Tag: desc.Tag, //nolint:staticcheck // keep for backward compatibility | ||
Filename: desc.Filename, //nolint:staticcheck // keep for backward compatibility | ||
} | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for id := range gogoProtoExts { | ||
out = append(out, id) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for id := range protoExts { | ||
out = append(out, id) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for name, info := range svcInfo { | ||
methods := make([]*QueryMethodDescriptor, len(info.Methods)) | ||
for i, svcMethod := range info.Methods { | ||
methods[i] = &QueryMethodDescriptor{ | ||
Name: svcMethod.Name, | ||
FullQueryPath: fmt.Sprintf("/%s/%s", name, svcMethod.Name), | ||
} | ||
} | ||
queryServices = append(queryServices, &QueryServiceDescriptor{ | ||
Fullname: name, | ||
Methods: methods, | ||
}) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for i, m := range signingModes { | ||
signModesDesc = append(signModesDesc, &SigningModeDescriptor{ | ||
Name: i, | ||
Number: m, | ||
// NOTE(fdymylja): this cannot be filled as of now, auth and the sdk itself don't support as of now | ||
// a service which allows to get authentication metadata for the provided sign mode. | ||
AuthnInfoProviderMethodFullname: "", | ||
}) | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
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 serverv2
a temporary package until we can completely gut out the existing server
?
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.
Yes just meant for the feature branch. Sorry for not stating this
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.
Mainly looked at serverv2/grpc/server.go
.
Description
ref #18282
create a copy of the server grpc package into serverv2
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change