Skip to content
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

Generate protobuf code for Go and Python services #1794

Merged

Conversation

CharlieTLe
Copy link
Contributor

@CharlieTLe CharlieTLe commented Nov 25, 2024

Changes

Part of #1787 to generate profobuf files for all services.

This should help unblock
#1754 to allow dependabot to manage dependecy upgrades for the Go services.

There are new Makefile recipes for managing the protobuf files.

  1. docker-generate-protobuf - to generate the protobuf files with docker so that the only dependency on the machine needed is docker.
  2. clean - to remove the protobuf files generated
  3. check-clean-work-tree - to check that the working tree is clean and to help with verifying that the protobuf files are updated for all of the services when there are changes to the protobuf definition.

There's a new check in the GitHub Actions workflow to verify that the protobuf code is generated. It is only verifying that the protobuf code is generated for Go and Python, but other services can apply the same workflow by updating the docker-gen-proto.sh script to uncomment the function call for the service.

The dockerfiles for the Go and Python services have been updated to not generate the protobuf files during the build process. Instead, this function has been refactored into the genproto directory of each service.

Merge Requirements

For new features contributions, please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs
  • Appropriate Helm chart updates in the helm-charts

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

@CharlieTLe CharlieTLe requested a review from a team as a code owner November 25, 2024 23:21
@CharlieTLe CharlieTLe force-pushed the check-genproto-go-python branch 3 times, most recently from 2e60903 to 58b988e Compare November 26, 2024 00:01
Copy link
Contributor

@rogercoll rogercoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding, overall lgtm.

.github/workflows/gen-check.yaml Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I've added a minor nit, but all good!
I'd probably rename to only generate-protobuf but we can also do that in a follow-up PR to unblock the #1754.

docker-gen-proto.sh Outdated Show resolved Hide resolved
docker-gen-proto.sh Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
.github/workflows/gen-check.yaml Outdated Show resolved Hide resolved
@julianocosta89
Copy link
Member

also, @CharlieTLe could you add a changelog for that please?

@CharlieTLe CharlieTLe force-pushed the check-genproto-go-python branch 2 times, most recently from b29e100 to 8ccbcd8 Compare November 26, 2024 18:15
Part of open-telemetry#1787
to generate profobuf files for all services.

This should help unblock
open-telemetry#1754 to allow
dependabot to manage dependecy upgrades for the Go services.

There are new Makefile recipes for managing the protobuf files.

1. docker-generate-protobuf - to generate the protobuf files with docker
   so that the only dependency on the machine needed is docker.
2. clean - to remove the protobuf files generated
3. check-clean-work-tree - to check that the working tree is clean and
   to help with verifying that the protobuf files are updated for all of
   the services when there are changes to the protobuf definition.

There's a new check in the GitHub Actions workflow to verify that the
protobuf code is generated. It is only verifying that the protobuf code
is generated for Go and Python, but other services can apply the same
workflow by updating the docker-gen-proto.sh script to uncomment the
function call for the service.

The dockerfiles for the Go and Python services have been updated to not
generate the protobuf files during the build process. Instead, this
function has been refactored into the genproto directory of each
service.

Signed-off-by: Charlie Le <[email protected]>
@CharlieTLe CharlieTLe force-pushed the check-genproto-go-python branch from 8ccbcd8 to 422e581 Compare November 26, 2024 18:32
@julianocosta89 julianocosta89 merged commit 93b8f1a into open-telemetry:main Nov 27, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants