Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Work around k8s client issue to avoid blocking CI tests #422

Closed
wants to merge 1 commit into from

Conversation

jinchihe
Copy link
Member

@jinchihe jinchihe commented Nov 21, 2019

What this PR does / why we need it:
Work around k8s client issue to avoid blocking CI tests

/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/kubernetes-11.0.0b1-py3.7.egg/kubernetes/__init__.py:19: in <module>
    import kubernetes.client
/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/kubernetes-11.0.0b1-py3.7.egg/kubernetes/client/__init__.py:20: in <module>
    from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi
E   ModuleNotFoundError: No module named 'kubernetes.client.api'

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #421

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:



This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign jinchihe
You can assign the PR to them by writing /assign @jinchihe in a comment when ready.

The full list of commands accepted by this bot can be found 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

@pugangxa
Copy link
Contributor

/lgtm

@jinchihe
Copy link
Member Author

/retest

@consideRatio
Copy link
Contributor

consideRatio commented Nov 21, 2019

The current change to not install a pre-release version of the kubernetes python client is a robust fix, but also hard coding the fix for this version and for that PyPI package specifically.

Note that pip won't install pre-releases, but setup.py install will, so the <11 part in the requirements.txt file is only needed for when python setup.py install is used to install the requirements. If pip install -r requirements.txt instead is used directly, pip will not use the pre-release 11.0.0b1 unless we also add the --pre flag to the pip install command.

I created the following alternative PR: #423

@jinchihe
Copy link
Member Author

@consideRatio Great thanks for the comments, totally agree with you, we install Kubeflow fairing using setup.py in CI tests. This is a work around solution, and seems work fine. Once the problem in k8s Python client, we will remove the <11.0.0. But for now, we need to work around to avoid blocking CI test and PR merging. Thanks.

/test kubeflow-fairing-presubmit

@jinchihe
Copy link
Member Author

Seems the CI tests caused by env problem?

tep #2: [gw0] [ 77%] PASSED tests/integration/common/test_full_notebook.py::test_full_notebook_job
Step #2: tests/integration/common/test_kubeflow_training.py::test_cluster_builder
Step #2: [gw0] [ 78%] PASSED tests/integration/common/test_kubeflow_training.py::test_cluster_builder
Step #2: tests/integration/gcp/test_gcs_access.py::test_job_submission_without_gcs_access
ERROR: (gcloud.builds.submit) [Errno 104] Connection reset by peer

@abhi-g
Copy link
Member

abhi-g commented Nov 21, 2019

/test kubeflow-fairing-presubmit

@abhi-g
Copy link
Member

abhi-g commented Nov 21, 2019

/retest

@k8s-ci-robot
Copy link
Contributor

@jinchihe: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
kubeflow-fairing-presubmit 268f43b link /test kubeflow-fairing-presubmit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No module named 'kubernetes.client.api' in CI tests
5 participants