-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tests to the subgraph we created to run the tests. (#1342)
* Add more tests to the subgraph we created to run the tests. * Update wait_for_deployment.py to use KUBECONFIG so its not limited to GKE. * I don't think we actually need wait_for_deployment; all it does is wait for the CRD to be created and that's not very useful. It would be better to wait for the actual controller deployments to start. * Create a script wait_for_kubeflow based on deploy_kubeflow.py that waits for Kubeflow to be deployed and performs basic checks like ensuring everything started correctly. * Fix a typo in wait_for_kubeflow * Add steps to copy artifacts to prow bucket. * Create a workflow for unittests." * Don't run workflows.jsonnet on presubmit; we use kfctl_test now. * Add an option to kfctl_test to not delete the cluster; useful for leaving it up to debug tests. * latest. * Autoformat.
- Loading branch information
1 parent
f15fdd3
commit 67489b5
Showing
9 changed files
with
470 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"""Wait for Kubeflow to be deployed.""" | ||
import argparse | ||
import logging | ||
|
||
from testing import deploy_utils | ||
from kubeflow.testing import test_helper | ||
from kubeflow.testing import util # pylint: disable=no-name-in-module | ||
|
||
def parse_args(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"--namespace", default=None, type=str, help=("The namespace to use.")) | ||
|
||
args, _ = parser.parse_known_args() | ||
return args | ||
|
||
def deploy_kubeflow(_): | ||
"""Deploy Kubeflow.""" | ||
args = parse_args() | ||
namespace = args.namespace | ||
api_client = deploy_utils.create_k8s_client() | ||
|
||
util.load_kube_config() | ||
# Verify that the TfJob operator is actually deployed. | ||
tf_job_deployment_name = "tf-job-operator-v1alpha2" | ||
logging.info("Verifying TfJob controller started.") | ||
util.wait_for_deployment(api_client, namespace, tf_job_deployment_name) | ||
|
||
# Verify that JupyterHub is actually deployed. | ||
jupyterhub_name = "tf-hub" | ||
logging.info("Verifying TfHub started.") | ||
util.wait_for_statefulset(api_client, namespace, jupyterhub_name) | ||
|
||
# Verify that PyTorch Operator actually deployed | ||
pytorch_operator_deployment_name = "pytorch-operator" | ||
logging.info("Verifying PyTorchJob controller started.") | ||
util.wait_for_deployment(api_client, namespace, pytorch_operator_deployment_name) | ||
|
||
def main(): | ||
test_case = test_helper.TestCase( | ||
name='deploy_kubeflow', test_func=deploy_kubeflow) | ||
test_suite = test_helper.init( | ||
name='deploy_kubeflow', test_cases=[test_case]) | ||
test_suite.run() | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.