Skip to content

Commit

Permalink
Update kf_is_ready_test.py to work with GCP blueprints
Browse files Browse the repository at this point in the history
* kf_is_ready_test.py currently assumes we have access to the KFDef and
  can use that to determine the platform and trigger platform specific tests.

* With blueprints and when running against auto deployed clusters we won't
  have the KFDef; so in this case just set platform = "" and don't trigger
  platform specific logic.

* Related to GoogleCloudPlatform/kubeflow-distribution#52
  • Loading branch information
Jeremy Lewi committed Jun 17, 2020
1 parent 1726b74 commit 7f8734d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions py/kubeflow/kfctl/testing/pytests/kf_is_ready_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ def set_logging():
)
logging.getLogger().setLevel(logging.INFO)

# TODO(jlewi): We should probably deprecate this and find a better way
# to separate platform specific logic. With GCP and blueprints we won't
# have a KFDef. And when running periodically against auto-deployments
# we also won't have access to the kfapp.
def get_platform_app_name(app_path):
if not app_path:
logging.info("--app_path not set; won't use KFDef to set platform")
return "", ""

with open(os.path.join(app_path, "tmp.yaml")) as f:
kfdef = yaml.safe_load(f)
app_name = kfdef["metadata"]["name"]
Expand Down Expand Up @@ -270,4 +278,6 @@ def test_gcp_access(record_xml_attribute, namespace, app_path, project):
datefmt='%Y-%m-%dT%H:%M:%S',
)
logging.getLogger().setLevel(logging.INFO)
# DO NOT SUBMIT
#test_notebook_is_ready("jupyter", "kubeflow")
pytest.main()

0 comments on commit 7f8734d

Please sign in to comment.