Skip to content

Commit 4355f0b

Browse files
gabrielwenk8s-ci-robot
authored andcommittedNov 8, 2019
Fix KFCTL e2e test build path (kubeflow#4493)
* update testing folders in e2e * add parameter to kfctl repo * build from kfctl_repo_path
1 parent 8251cb3 commit 4355f0b

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed
 

‎py/kubeflow/kubeflow/ci/kfctl_e2e_workflow.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,15 @@ def __init__(self, name=None, namespace=None,
124124

125125
# source directory where all repos should be checked out
126126
self.src_root_dir = self.test_dir + "/src"
127-
# The directory containing the kubeflow/kubeflow repo
128-
self.src_dir = self.src_root_dir + "/kubeflow/kubeflow"
127+
# The directory containing the kubeflow/kfctl repo
128+
self.src_dir = self.src_root_dir + "/kubeflow/kfctl"
129+
self.kubeflow_dir = self.src_root_dir + "/kubeflow/kubeflow"
129130

130-
# Directory in kubeflow/kubeflow containing the pytest files for kfctl
131-
self.kfctl_pytest_dir = os.path.join(self.src_dir, "testing/kfctl")
131+
# Directory in kubeflow/kfctl containing the pytest files.
132+
self.kfctl_pytest_dir = os.path.join(self.src_dir, "testing/e2e")
132133

133134
# Top level directories for python code
134-
self.kubeflow_py = self.src_dir
135+
self.kubeflow_py = self.kubeflow_dir
135136

136137
# The directory within the kubeflow_testing submodule containing
137138
# py scripts to use.
@@ -196,7 +197,7 @@ def __init__(self, name=None, namespace=None,
196197
self.steps_namespace = "kubeflow"
197198
self.test_endpoint = test_endpoint
198199

199-
self.kfctl_path = os.path.join(self.src_dir, "bootstrap/bin/kfctl")
200+
self.kfctl_path = os.path.join(self.src_dir, "bin/kfctl")
200201

201202
# Fetch the main repo from Prow environment.
202203
self.main_repo = argo_build_util.get_repo_from_prow_env()
@@ -399,7 +400,7 @@ def _build_tests_dag(self):
399400
command, dependences)
400401

401402
notebook_test["container"]["workingDir"] = os.path.join(
402-
self.src_dir, "kubeflow/jupyter/tests")
403+
self.kubeflow_dir, "kubeflow/jupyter/tests")
403404

404405
#***************************************************************************
405406
# Profiles test
@@ -420,7 +421,7 @@ def _build_tests_dag(self):
420421
command, dependences)
421422

422423
profiles_test["container"]["workingDir"] = os.path.join(
423-
self.src_dir, "kubeflow/profiles/tests")
424+
self.kubeflow_dir, "kubeflow/profiles/tests")
424425

425426
def _build_exit_dag(self):
426427
"""Build the exit handler dag"""
@@ -534,6 +535,7 @@ def build(self):
534535
#
535536
"-o", "junit_suite_name=test_kfctl_go_deploy_" + self.config_name,
536537
"--app_path=" + self.app_dir,
538+
"--kfctl_repo_path=" + self.src_dir,
537539
]
538540

539541
dependences = [checkout["name"]]

‎py/kubeflow/kubeflow/ci/kfctl_go_test_utils.py

+4-21
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,20 @@
1818
def run_with_retries(*args, **kwargs):
1919
util.run(*args, **kwargs)
2020

21-
def get_kfctl_go_build_dir_binary_path():
22-
"""return the build directory and path to kfctl go binary.
23-
24-
Args:
25-
None
26-
27-
Return:
28-
build_dir (str): Path to start build will be Kubeflow/kubeflow/bootstrap/
29-
kfctl_path (str): Path where kfctl go binary has been built.
30-
will be Kubeflow/kubeflow/bootstrap/bin/kfctl
31-
"""
32-
this_dir = os.path.dirname(__file__)
33-
root = os.path.abspath(os.path.join(this_dir, "..", "..", "..", ".."))
34-
build_dir = os.path.join(root, "bootstrap")
35-
kfctl_path = os.path.join(build_dir, "bin", "kfctl")
36-
return build_dir, kfctl_path
37-
38-
def build_kfctl_go():
21+
def build_kfctl_go(kfctl_repo_path):
3922
"""build the kfctl go binary and return the path for the same.
4023
4124
Args:
42-
None
25+
kfctl_repo_path (str): Path to kfctl repo.
4326
4427
Return:
4528
kfctl_path (str): Path where kfctl go binary has been built.
4629
will be Kubeflow/kubeflow/bootstrap/bin/kfctl
4730
"""
48-
build_dir, kfctl_path = get_kfctl_go_build_dir_binary_path()
31+
kfctl_path = os.path.join(kfctl_repo_path, "bin", "kfctl")
4932
# We need to use retry builds because when building in the test cluster
5033
# we see intermittent failures pulling dependencies
51-
run_with_retries(["make", "build-kfctl"], cwd=build_dir)
34+
run_with_retries(["make", "build-kfctl"], cwd=kfctl_repo_path)
5235
return kfctl_path
5336

5437
def get_or_create_app_path_and_parent_dir(app_path):

0 commit comments

Comments
 (0)
Please sign in to comment.