Skip to content
代码片段 群组 项目
未验证 提交 e44d8a72 编辑于 作者: Milan Patel's avatar Milan Patel 提交者: GitHub
浏览文件

BEAM-13939: Restructure Protos to fix namespace conflicts (#16961)

* Updates the Beam model protos to be housed in a namespaced directory structure. This is so that the proto files require usage of a org/apache/beam/model namespace in their imports and so that the generated files also include this namespace in their source file metadata.

* Updates session.proto to use the new namespaced import

* Adds a generic proto generated script that can be used to correctly generate all proto files for the go sdk. This new tool will add any necessary options to the proto compiler and generate the proto files relative to the go sdk root to ensure that the generated files have a namespaced file path in their metadata. If you want to generate a proto file in the go sdk, simply use this script in the go:generate directive, the rest will be taken care of by the script.

* Updates the go sdk to use the new genproto script to correctly generate proto bindings. Updates the README for how to generate the model proto bindings into the SDK

* Regenerates all go sdk proto bindings

* Updates to the python build system. gen_protos.py now supports the new namespaced structure of the Beam model. It does this by supporting arbitrary directory structures of proto files by calculating and replacing the generated imports with relative imports with the generated source. Additionally, it will generate bindings that allow for imports of the form `from apache_beam.portability.api import beam_runner_api_pb2` so that the SDK is not dependent on the potentially changing structure of the generated bindings within `api`. Imports of the form `from apache_beam.portability.api.org.apache.beam.model import beam_runner_api_pb2` are still supported. setup.py now attempts to generate the proto bindings on invocation since the package structure must exist before the wheel can be created.

* Updates to various build, ignore, and linting tooling for python in order to support the new python output structure

* Updates to the python SDK to use the new import structure created by gen_protos
上级 9e4c2886
No related branches found
No related tags found
加载中
显示
482 个添加480 个删除
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册