Skip to content

Commit

Permalink
Don't return pip install with no packages
Browse files Browse the repository at this point in the history
If an empty list is provided no command should be returned to avoid a
broken command eg. `pip install      `
  • Loading branch information
judahrand committed Sep 14, 2021
1 parent 6252b09 commit 519751d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## Deprecations

## Bug Fixes and Other Changes
* Fix component decorator could result in invalid component if `install_kfp_package=False`. [\#6527](https://github.com/kubeflow/pipelines/pull/6527))

## Documentation Updates

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/kfp/v2/components/component_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _python_function_name_to_component_name(name):
def _get_packages_to_install_command(
package_list: Optional[List[str]] = None) -> List[str]:
result = []
if package_list is not None:
if package_list:
install_pip_command = 'python3 -m ensurepip'
install_packages_command = (
'PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet \
Expand Down

0 comments on commit 519751d

Please sign in to comment.