Skip to content

Commit

Permalink
SDK - Components - Only yaml component files can be used as source (#…
Browse files Browse the repository at this point in the history
…1966)

Previously, if the file was a .zip archive, some functions like exception printing would fail as it's not a text file.
Ark-kun authored and k8s-ci-robot committed Aug 27, 2019

Verified

This commit was signed with the committer’s verified signature.
morozov Sergei Morozov
1 parent f63c301 commit 4cbfdd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/kfp/components/_components.py
Original file line number Diff line number Diff line change
@@ -270,5 +270,5 @@ def component_default_to_func_default(component_default: str, is_optional: bool)
factory_function_parameters,
documentation='\n'.join(func_docstring_lines),
func_name=name,
func_filename=component_filename
func_filename=component_filename if (component_filename and (component_filename.endswith('.yaml') or component_filename.endswith('.yml'))) else None,
)

0 comments on commit 4cbfdd8

Please sign in to comment.