f13ab967ea8c284a67fa2d5c8a3f0e585910c258,testing/kfctl/kfctl_go_test.py,,test_build_kfctl_go,#Any#Any#Any#Any#Any#,164
Before Change
util.run([
kfctl_path, "init", app_path, "-V",
"--config=" + os.path.join(parent_dir, "tmp.yaml")], cwd=parent_dir)
util.run(["cat", "app.yaml"], cwd=app_path)
// We need to use retries because if we don"t we see random failures
// where kfctl just appears to die.
run_with_retries([
After Change
logging.info("Using app path %s", app_path)
zone = "us-central1-a"
os.environ["ZONE"] = zone
if not zone:
raise ValueError("Could not get zone being used")
// We need to specify a valid email because
// 1. We need to create appropriate RBAC rules to allow the current user
// to create the required K8s resources.
// 2. Setting the IAM policy will fail if the email is invalid.
email = util.run(["gcloud", "config", "get-value", "account"])
os.environ["EMAIL"] = email
if not email:
raise ValueError("Could not determine GCP account being used.")
os.environ["PROJECT"] = project
if not project:
raise ValueError("Could not get project being used")
// username and password are passed as env vars and won"t appear in the logs
//
config_spec = get_config_spec(config_path, project, email)
// Set KfDef name to be unique
regex = re.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?")
kfdef_name = regex.findall(app_path)[-1]
config_spec["metadata"]["name"] = kfdef_name
if not os.path.exists(parent_dir):
os.makedirs(parent_dir)
if not os.path.exists(app_path):
os.makedirs(app_path)
with open(os.path.join(parent_dir, "tmp.yaml"), "w") as f:
yaml.dump(config_spec, f)
// TODO(jlewi): When we switch to KfDef v1beta1 this logic will need to change because
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: kubeflow/kubeflow
Commit Name: f13ab967ea8c284a67fa2d5c8a3f0e585910c258
Time: 2019-10-03
Author: adhita94@gmail.com
File Name: testing/kfctl/kfctl_go_test.py
Class Name:
Method Name: test_build_kfctl_go
Project Name: lanpa/tensorboardX
Commit Name: ad2ff3124948b32978b41d5b3e66630f05d0f6fe
Time: 2018-06-07
Author: huang.dexter@gmail.com
File Name: beholder_demo.py
Class Name:
Method Name:
Project Name: geometalab/OSMDeepOD
Commit Name: 82d2e9ea62f1d776331e843266a31fe076d249b1
Time: 2016-08-02
Author: samuel.kurath@gmail.com
File Name: src/data/generation/generate_crosswalk_images.py
Class Name:
Method Name: run