This is an automated email from the ASF dual-hosted git repository.
shunping pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new b69f23f6818 Fix for issue 34772 to include user provided providers
(#35033)
b69f23f6818 is described below
commit b69f23f6818787cb2f0a9f02608228a07405c0c8
Author: Bhargavkonidena <[email protected]>
AuthorDate: Mon Jun 2 18:14:26 2025 +0530
Fix for issue 34772 to include user provided providers (#35033)
* Fix for issue 34772 to include user provided providers
* Fix CI checks
* Incorporate review comments
---
sdks/python/apache_beam/yaml/generate_yaml_docs.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/yaml/generate_yaml_docs.py
b/sdks/python/apache_beam/yaml/generate_yaml_docs.py
index 592177dc2bc..ae1a04661e6 100644
--- a/sdks/python/apache_beam/yaml/generate_yaml_docs.py
+++ b/sdks/python/apache_beam/yaml/generate_yaml_docs.py
@@ -32,6 +32,7 @@ from apache_beam.utils.python_callable import
PythonCallableWithSource
from apache_beam.version import __version__ as beam_version
from apache_beam.yaml import json_utils
from apache_beam.yaml import yaml_provider
+from apache_beam.yaml import yaml_utils
from apache_beam.yaml.yaml_errors import ErrorHandlingConfig
@@ -263,7 +264,12 @@ def create_index(include, exclude, options):
with subprocess_server.SubprocessServer.cache_subprocesses():
json_config_schemas = []
markdown_out = io.StringIO()
- providers = yaml_provider.standard_providers()
+ if options.provider_source_file:
+ providers = yaml_provider.merge_providers(
+ yaml_provider.load_providers(
+ yaml_utils.locate_data_file(options.provider_source_file)))
+ else:
+ providers = yaml_provider.standard_providers()
for transform_base, transforms in itertools.groupby(
sorted(providers.keys(), key=io_grouping_key),
key=lambda s: s.split('-')[0]):
@@ -557,6 +563,11 @@ def main():
parser.add_argument('--schema_file')
parser.add_argument('--include', default='.*')
parser.add_argument('--exclude', default='')
+ parser.add_argument(
+ "--provider_source_file",
+ help="Path to a YAML file containing custom providers. "
+ "If not provided, uses standard Beam providers.",
+ )
options = parser.parse_args()
include = re.compile(options.include).match
exclude = (