Skip to content

Conversation

@finnegancarroll
Copy link
Contributor

@finnegancarroll finnegancarroll commented Jul 11, 2025

Description

Adds the Bazel libraries for the compilation of protobuf schema and service definitions into python libraries. These changes do not include any packaging or publishing for the python libraries.

A few major changes are included in this PR to facilitate python support:

  • Version bumped to Bazel 7.0.0.
    Bazel 7 includes changes to the Bazel language which resolves syntax errors in code invoked by rules_python which is necessary here. Higher versions of Bazel have migrated to Bazel Modules, to keep the existing WORKSPACE model bazelmod is disabled by default in .bazelrc.
  • Migrate to rule_proto_grpc.
    https://github.com/rules-proto-grpc/rules_proto_grpc
    This actively maintained apache 2 licensed project provides support for multiple protobuf language rules. Java and python rules have been migrated to this project to avoid conflicting dependencies between each newly added language rule. Additionally dependencies have been removed from maven_install where possible so Bazel http archives are the single source of truth for dependencies.
  • Dockerfile for platform independant building/testing.

Testing

Bazel commands

bazel build //:java_protos_all
bazel build //:python_protos_all

Docker stages for build/package/test

docker build --target build-bazel-java .
docker build --target package-bazel-java .
docker build --target test-bazel-java .

Note: The implementations in core are out of sync with this repo at the moment while this change is in flight.
If the OpenSearch version specified in the Dockerfile is updated to match this feature branch this test-bazel-java stage passes.

docker build --target build-bazel-python .

Note: Only a build stage for python is included in this version. Packaging and testing to be handled in follow up PRs.

Issues Resolved

#8

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@finnegancarroll finnegancarroll force-pushed the rules-proto-grpc-min-4.5 branch from c14056a to 304f5bb Compare July 14, 2025 19:35
@finnegancarroll finnegancarroll marked this pull request as ready for review July 14, 2025 23:28
@finnegancarroll finnegancarroll changed the title Add compilation of python schema and gRPC libraries Add compilation of python schema and service libraries Jul 14, 2025
@finnegancarroll
Copy link
Contributor Author

@karenyrx , @lucy66hw can you take a look at these changes when convenient?

Copy link
Collaborator

@karenyrx karenyrx 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 this!

@finnegancarroll finnegancarroll force-pushed the rules-proto-grpc-min-4.5 branch from 1fc7b53 to fb7c323 Compare July 21, 2025 18:11
@finnegancarroll
Copy link
Contributor Author

Hi @karenyrx, any additional feedback for these changes?

@finnegancarroll finnegancarroll force-pushed the rules-proto-grpc-min-4.5 branch from 4ed7222 to ab28055 Compare July 23, 2025 04:31
Signed-off-by: Finn Carroll <[email protected]>
…mple - Java commented out.

Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
Signed-off-by: Finn Carroll <[email protected]>
@finnegancarroll finnegancarroll force-pushed the rules-proto-grpc-min-4.5 branch from ab28055 to a0c3674 Compare July 23, 2025 22:43
Signed-off-by: Finn Carroll <[email protected]>
@finnegancarroll
Copy link
Contributor Author

Hi @karenyrx, removed both patch files with some re-ordering and updated dependencies.
Let me know if you have any additional feedback on these changes. Thanks!

@karenyrx karenyrx merged commit 54978de into opensearch-project:main Jul 26, 2025
5 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.

2 participants