-
Notifications
You must be signed in to change notification settings - Fork 43
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
Move messages only used to generate Go structs out of minder.proto #3830
Conversation
Hold this - @dmjb had a good point that we should try getting rid of the structs first and foremost. |
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.
Minor comment.
I think we can actually review and merge this PR. @dmjb mentioned he wanted to get rid of the structs which is a good idea, but we'll need the internal proto file to include the selector messages anyway (the CEL evaluator works much easier with protobuf messages). It doesn't really matter whether we remove the messages that this PR moves to the internal proto file from the original proto file or the internal one and having the internal proto file created would enable us to move the selector messages there. |
Adds a new proto file under the internal/ directory tree and modifies the `buf.work.yaml` file so that the new internal/proto directory is a module. Resolves: mindersec#3829
Uses the newly added Go structs that are generated out of the internal.proto file.
…file This commit just removes the now no longer used messages from the public minder.v1 module.
…3830) * Move protobuf messages only used internal to an internal proto file Adds a new proto file under the internal/ directory tree and modifies the `buf.work.yaml` file so that the new internal/proto directory is a module. Resolves: #3829 * Flip Minder code to use the Go structs from the internal proto file Uses the newly added Go structs that are generated out of the internal.proto file. * Remove the structs we moved to internal proto file from the v1 proto file This commit just removes the now no longer used messages from the public minder.v1 module. * Only check proto files in the proto subdir for backwards compatibility * Exclude internal/proto from code coverage
Summary
This was brought up in PR #3797. We already have several messages that only
exist to generate Go structures out of them and use them with reflection. When
we add the profile selector messages, we'll have even more and our proto file
is going to become messy.
Instead, let's split out a new proto file and use it to store all the messages
that are really just a way to express Go structs.
Fixes: #3829
Change Type
Testing
make test
Review Checklist: