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): fixes module not found error for containerized python components. Fixes #8385 #9157

Merged
merged 3 commits into from
Apr 17, 2023

Conversation

Mithil467
Copy link
Contributor

Description of your changes:
Prepends the module_directory to sys.path. module_directory is WindowsPath object on windows, hence casting to string as sys.path doesn't support pathlib objects.

Checklist:

@google-cla
Copy link

google-cla bot commented Apr 14, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@google-oss-prow
Copy link

Hi @Mithil467. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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.

Thanks, @Mithil467. This is great.

Could you sign the CLA?

Could you also add at least one representative test case for this specific bug to this test file? https://github.com/kubeflow/pipelines/blob/master/sdk/python/kfp/cli/component_test.py

@connor-mccarthy
Copy link
Member

Fixes #8385

@Mithil467
Copy link
Contributor Author

@connor-mccarthy I have signed the CLA.
I have also added a new unit test, let me know if this is good enough.

@connor-mccarthy
Copy link
Member

/ok-to-test

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.

Thanks, @Mithil467. This looks and works great.

You can ignore the kubeflow-pipelines-sdk-execution-tests failures. They are unrelated to your changes.

One request before we merge: could you add a release note about this fix to the "Current Version: Bug fixes and other changes" of sdk/RELEASE.md?

@Mithil467
Copy link
Contributor Author

Sounds good, thanks @connor-mccarthy

@google-oss-prow
Copy link

@Mithil467: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipelines-sdk-execution-tests 27a9ce9 link true /test kubeflow-pipelines-sdk-execution-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@connor-mccarthy
Copy link
Member

/lgtm
/approve

Thank you for this, @Mithil467! The community will benefit greatly from this fix.

@google-oss-prow google-oss-prow bot added the lgtm label Apr 17, 2023
@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

@connor-mccarthy connor-mccarthy merged commit 3164dfb into kubeflow:master Apr 17, 2023
rd-pong pushed a commit to rd-pong/pipelines that referenced this pull request Apr 26, 2023
…nents. Fixes kubeflow#8385 (kubeflow#9157)

* Add module directory to sys.path

* Add nested module imports unit test

* Add release note to release.md
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.

2 participants