Skip to content

Commit 6a1d917

Browse files
authored
[yaml] Fix yaml provider schema validation and merging (#31974)
Signed-off-by: Jeffrey Kinard <[email protected]>
1 parent dc1e134 commit 6a1d917

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sdks/python/apache_beam/yaml/pipeline.schema.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,10 @@ $defs:
168168

169169
providerOrProviderInclude:
170170
if:
171-
properties:
172-
include {}
171+
allOf: [
172+
{ properties: { include: { type: string }}},
173+
{ required: [ "include" ] }
174+
]
173175
then:
174176
$ref: '#/$defs/providerInclude'
175177
else:

sdks/python/apache_beam/yaml/yaml_transform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,5 +1064,5 @@ def expand_pipeline(
10641064
return YamlTransform(
10651065
pipeline_as_composite(pipeline_spec['pipeline']),
10661066
yaml_provider.merge_providers(
1067-
pipeline_spec.get('providers', []), providers or
1068-
{})).expand(beam.pvalue.PBegin(pipeline))
1067+
yaml_provider.parse_providers(pipeline_spec.get('providers', [])),
1068+
providers or {})).expand(beam.pvalue.PBegin(pipeline))

0 commit comments

Comments
 (0)