Skip to content

Commit

Permalink
[yaml] Fix yaml provider schema validation and merging (#31974)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
  • Loading branch information
Polber authored Jul 25, 2024
1 parent dc1e134 commit 6a1d917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions sdks/python/apache_beam/yaml/pipeline.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ $defs:

providerOrProviderInclude:
if:
properties:
include {}
allOf: [
{ properties: { include: { type: string }}},
{ required: [ "include" ] }
]
then:
$ref: '#/$defs/providerInclude'
else:
Expand Down
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/yaml/yaml_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,5 +1064,5 @@ def expand_pipeline(
return YamlTransform(
pipeline_as_composite(pipeline_spec['pipeline']),
yaml_provider.merge_providers(
pipeline_spec.get('providers', []), providers or
{})).expand(beam.pvalue.PBegin(pipeline))
yaml_provider.parse_providers(pipeline_spec.get('providers', [])),
providers or {})).expand(beam.pvalue.PBegin(pipeline))

0 comments on commit 6a1d917

Please sign in to comment.