Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sdk): Fix "No KFP components found in file" error. Fixes #8353 #8359

Merged
merged 3 commits into from
Oct 13, 2022

Conversation

chensun
Copy link
Member

@chensun chensun commented Oct 13, 2022

Description of your changes:
Utility files may not have KFP component definition, which is completely normal and should be allowed.
Fixes #8353

Checklist:

Copy link
Member

@connor-mccarthy connor-mccarthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks for this fix, @chensun.

@@ -172,9 +172,9 @@ def _load_components(self):

python_file = str(python_file)
if not component_modules:
logging.error(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit/question: I'm curious what this logging adds without the check.

I think the logging on line 175 is now redundant with the logging on line 179, since the execution will not sys.exit anymore. WDYT about either [simpler approach] removing the entire if not component_modules block or [more involved approach] changing the logging to something like the following:

comp_dir/file.py
comp_dir/other_file.py
comp_dir/component.py [component]

I'm not sure [component] is the best way of visually displaying this information, but just thinking out loud with this mock up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I'll opt for removing this if block.

@google-oss-prow google-oss-prow bot added the lgtm label Oct 13, 2022
@google-oss-prow google-oss-prow bot removed the lgtm label Oct 13, 2022
Copy link
Member

@connor-mccarthy connor-mccarthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Thank you!

@google-oss-prow google-oss-prow bot added the lgtm label Oct 13, 2022
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: connor-mccarthy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 83e0f16 into master Oct 13, 2022
@google-oss-prow google-oss-prow bot deleted the chensun-patch-4 branch October 13, 2022 21:04
jlyaoyuli pushed a commit to jlyaoyuli/pipelines that referenced this pull request Jan 5, 2023
…#8353 (kubeflow#8359)

* Update component.py

* Update component.py

* Update component.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Containerized Python Components
2 participants