-
Notifications
You must be signed in to change notification settings - Fork 118
protobuf upgrade #952
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
base: main
Are you sure you want to change the base?
protobuf upgrade #952
Conversation
arnavk23
commented
Nov 5, 2025
- I regenerated from the BESS proto sources (the authoritative proto inputs) to ensure the generated Go code matches upstream definitions.
- I used the same generator versions as your Dockerfile (protoc-gen-go v1.36.10, protoc-gen-go-grpc v1.5.1) so runtime and generated code align.
- Recommendation : Merging pfcpiface: add parse-error diagnostics, safe handling, raw dump and test #950 before this pr.
…ploy_debug script Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
…(keeps letters, digits, '.', '-', '' and replaces everything else with ''). Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Co-authored-by: Gabriel Arrobo <gabriel.arrobo@intel.com> Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
…nRegenerated .pb.go files from latest BESS protobufs using protoc + protoc-gen-go/protoc-gen-go-grpc.\n\nSigned-off-by: Arnav Kapoor <kapoorarnav43@gmail.com> Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
|
Thanks for opening this PR. Have you tested the changes? Do not we need to make changes also in the |
Yes, this is clear :-) |
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.
Pull Request Overview
This PR upgrades the protobuf-generated code to use newer generator versions (protoc-gen-go v1.36.10 and protoc-gen-go-grpc v1.5.1) and introduces several enhancements:
- Regenerated Go code from BESS proto sources using updated protoc generator versions
- Added robust error handling and debugging capabilities for PFCP message parsing failures
- Introduced a canonical
UnknownStringconstant to eliminate repeated string literals - Added comprehensive test coverage for PFCP message handling edge cases
Reviewed Changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| pfcpiface/utils.go | Defines UnknownString constant for consistent "unknown" value representation |
| pfcpiface/messages_parse_test.go | New test file verifying PFCP message handler gracefully handles truncated messages |
| pfcpiface/messages.go | Enhanced error logging with address context, added PFCP dump functionality via environment variables, implemented pruning logic for dump directories |
| pfcpiface/datapath.go | Updated to use new UnknownString constant |
| pfcpiface/bess_pb/util_msg.pb.go | Regenerated with protoc-gen-go v1.36.10 - updated field ordering, unsafe package usage, and modern protobuf patterns |
| pfcpiface/bess_pb/service_grpc.pb.go | New gRPC service definitions generated with protoc-gen-go-grpc v1.5.1 |
| pfcpiface/bess_pb/ports/port_msg.pb.go | Regenerated with updated protoc versions and Intel copyright added |
| pfcpiface/bess_pb/error.pb.go | Regenerated with protoc-gen-go v1.36.10 |
| pfcpiface/bess.go | Updated to use new UnknownString constant |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| func RegisterBESSControlServer(s grpc.ServiceRegistrar, srv BESSControlServer) { | ||
| // If the following call pancis, it indicates UnimplementedBESSControlServer was |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'pancis' to 'panics'.
| // If the following call pancis, it indicates UnimplementedBESSControlServer was | |
| // If the following call panics, it indicates UnimplementedBESSControlServer was |
| GetModuleInfo(ctx context.Context, in *GetModuleInfoRequest, opts ...grpc.CallOption) (*GetModuleInfoResponse, error) | ||
| // / Connect two modules. | ||
| // / | ||
| // / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'ackets' to 'packets'.
| // / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate | |
| // / Connect between m1's ogate and n2's igate (i.e., packets sent to m1's ogate |
| // / Connect two modules. | ||
| // / | ||
| // / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate | ||
| // / will be fed to m2's igate). The oate can be connected to only one igate, |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'oate' to 'ogate'.
| // / will be fed to m2's igate). The oate can be connected to only one igate, | |
| // / will be fed to m2's igate). The ogate can be connected to only one igate, |
| DumpMempool(ctx context.Context, in *DumpMempoolRequest, opts ...grpc.CallOption) (*DumpMempoolResponse, error) | ||
| // / Send a command to the specified module instance. | ||
| // / | ||
| // / Each module type defines a list of modyle-specific commands, which |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'modyle-specific' to 'module-specific'.
| // / Each module type defines a list of modyle-specific commands, which | |
| // / Each module type defines a list of module-specific commands, which |
| // / | ||
| // / NOTE: There should be no running worker to run this command. | ||
| CreateModule(ctx context.Context, in *CreateModuleRequest, opts ...grpc.CallOption) (*CreateModuleResponse, error) | ||
| // / Destroy an exsting module |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'exsting' to 'existing'.
| // / Destroy an exsting module | |
| // / Destroy an existing module |
| GetModuleInfo(context.Context, *GetModuleInfoRequest) (*GetModuleInfoResponse, error) | ||
| // / Connect two modules. | ||
| // / | ||
| // / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'ackets' to 'packets'.
| // / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate | |
| // / Connect between m1's ogate and n2's igate (i.e., packets sent to m1's ogate |
| // / Connect two modules. | ||
| // / | ||
| // / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate | ||
| // / will be fed to m2's igate). The oate can be connected to only one igate, |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'oate' to 'ogate'.
| // / will be fed to m2's igate). The oate can be connected to only one igate, | |
| // / will be fed to m2's igate). The ogate can be connected to only one igate, |
| DumpMempool(context.Context, *DumpMempoolRequest) (*DumpMempoolResponse, error) | ||
| // / Send a command to the specified module instance. | ||
| // / | ||
| // / Each module type defines a list of modyle-specific commands, which |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'modyle-specific' to 'module-specific'.
| // / Each module type defines a list of modyle-specific commands, which | |
| // / Each module type defines a list of module-specific commands, which |
| // / | ||
| // / NOTE: There should be no running worker to run this command. | ||
| CreateModule(context.Context, *CreateModuleRequest) (*CreateModuleResponse, error) | ||
| // / Destroy an exsting module |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'exsting' to 'existing'.
| // / Destroy an exsting module | |
| // / Destroy an existing module |
| // / Destroy an exsting module | ||
| // / | ||
| // / If the module is connected to other modules' input/output gate, they are | ||
| // / disconnected first. All tasks created by the module will also be destoyed. |
Copilot
AI
Nov 5, 2025
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.
Corrected spelling of 'destoyed' to 'destroyed'.
| // / disconnected first. All tasks created by the module will also be destoyed. | |
| // / disconnected first. All tasks created by the module will also be destroyed. |
|
Fixes #953 |