-
Notifications
You must be signed in to change notification settings - Fork 6
Consume opamp-spec as a submodule and use protos from it #1
Comments
@jlegoff can you help with this? |
@tigrannajaryan yes, I can take it when the protos are moved to opamp-spec |
Sounds good, assigned to you. In the meantime if you want to start with #3 it would be great. |
Protos are in the spec now: open-telemetry/opamp-spec#126 If you need anything to be changed in proto files for Java (e.g. |
I have started to work on this issue here - I'm struggling with a few build issues but I'm getting help from @jack-berg |
Sounds good. Please move incrementally, keep the PRs small so that they are easy to review. |
I've made a first PR and kept is as small as I could, even though there's a lot of boiler plate code with the gradle scripts 😅 |
@tigrannajaryan why store the files in the repo?
Why use a makefile instead of standard java tooling with gradle? I think the
|
I find it helpful to look at diffs in generated file in PRs. For example if we change generation options diffs are very important to see the effect of the change. If the files are not stored in the repo there is no way to do it. Also if generated files are not stored in the repo ensuring reproducing build is more difficult - you have to ensure you generation process is also reproducible, which is doable but adds one more thing to worry about.
Ignore that. Use whatever tool makes sense for java. |
I don't disagree with that. However, it does break convention with I'm neutral overall, given that there will be no change in experience for someone consuming the artifact whether or not the generated classes are checked into source code. |
If you don't see the need to have the diffs of generated files in PRs then go with whatever you prefer. It should be long-term maintainers' decision and I am only a temporary maintainer here. It is also possible to change this decision later and start storing generated files in the repo, so no big deal, start with what you prefer now. |
This is a first attempt at setting up the build files and generating the protos. Since the generated protos are part of the repo, the generation itself is not part of the build pipeline and is set up as an standalone project in the `generateProtos` directory. Regenerating them can be done manually as explained in the README. While the issue mentions a makefile for proto generation, I took inspiration from [opentelemetry-proto-java](https://github.com/open-telemetry/opentelemetry-proto-java) and used a gradle script instead. I can change that if needed. Note also that the generated code is not published as a library. I suggest doing this in a separate PR. Resolves #1
Depends on open-telemetry/opamp-go#133
This is similar to what we do with OTLP protos in https://github.com/open-telemetry/opentelemetry-proto-go
We need a makefile to re-generate the files every time protos are updated. Generated files should be stored in this repo.
Ideally also a github action that verifies that protos match the generated file.
The text was updated successfully, but these errors were encountered: