Skip to content

Commit

Permalink
Fix the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi committed Jul 24, 2018
1 parent 36e5d41 commit 30cdaaa
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 34 deletions.
52 changes: 26 additions & 26 deletions test/workflows/components/params.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@
// Component-level parameters, defined initially from 'ks prototype use ...'
// Each object below should correspond to a component in the components/ directory
workflows: {
bucket: 'kubeflow-ci_temp',
name: 'some-very-very-very-very-very-long-name-jlewi-tf-k8s-presubmit-test-374-6e32',
namespace: 'kubeflow-test-infra',
prow_env: 'JOB_NAME=tf-k8s-presubmit-test,JOB_TYPE=presubmit,PULL_NUMBER=374,REPO_NAME=k8s,REPO_OWNER=tensorflow,BUILD_NUMBER=6e32',
versionTag: '',
tfJobVersion: 'v1alpha1',
bucket: "kubeflow-ci_temp",
name: "some-very-very-very-very-very-long-name-jlewi-tf-k8s-presubmit-test-374-6e32",
namespace: "kubeflow-test-infra",
prow_env: "JOB_NAME=tf-k8s-presubmit-test,JOB_TYPE=presubmit,PULL_NUMBER=374,REPO_NAME=k8s,REPO_OWNER=tensorflow,BUILD_NUMBER=6e32",
versionTag: "",
tfJobVersion: "v1alpha1",
},
master_is_chief_v1alpha1: {
name: 'master-is-chief-v1alpha1',
name: "master-is-chief-v1alpha1",
},
master_is_chief_v1alpha2: {
image: 'gcr.io/kubeflow-images-staging/tf-operator-test-server:latest',
name: 'master-is-chief-v1alpha2',
image: "gcr.io/kubeflow-images-staging/tf-operator-test-server:latest",
name: "master-is-chief-v1alpha2",
},
worker0_is_chief_v1alpha1: {
image: 'gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180613-e06fc0bb-dirty-5ef291',
name: 'worker0-is-chief-v1alpha1',
image: "gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180613-e06fc0bb-dirty-5ef291",
name: "worker0-is-chief-v1alpha1",
},
worker0_is_chief_v1alpha2: {
image: 'gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180613-e06fc0bb-dirty-5ef291',
name: 'worker0-is-chief-v1alpha2',
image: "gcr.io/kubeflow-images-staging/tf-operator-test-server:v20180613-e06fc0bb-dirty-5ef291",
name: "worker0-is-chief-v1alpha2",
},
simple_tfjob_v1alpha1: {
name: 'simple-001',
namespace: 'kubeflow-test-infra',
image: '',
name: "simple-001",
namespace: "kubeflow-test-infra",
image: "",
},
simple_tfjob_v1alpha2: {
name: 'simple-001',
namespace: 'kubeflow-test-infra',
image: '',
name: "simple-001",
namespace: "kubeflow-test-infra",
image: "",
},
gpu_tfjob_v1alpha1: {
name: 'gpu-simple-001',
namespace: 'kubeflow-test-infra',
image: '',
name: "gpu-simple-001",
namespace: "kubeflow-test-infra",
image: "",
},
gpu_tfjob_v1alpha2: {
name: 'gpu-simple-001',
namespace: 'kubeflow-test-infra',
image: '',
name: "gpu-simple-001",
namespace: "kubeflow-test-infra",
image: "",
},
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local job = {
// When no chief is provided TFJob will use worker 0 as the chief.
tfReplicaSpecs: {
Ps: {
replicas: 2,
replicas: 2,
restartPolicy: "Never",
template: podTemplate,
},
Expand Down
3 changes: 2 additions & 1 deletion test/workflows/components/workflows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@
"--component=worker0_is_chief_v1alpha1",
if params.tfJobVersion == "v1alpha2" then
// TODO(jlewi): Looks like there is a regression in v1alpha2 and require all workers to exit.
"--shutdown_policy=all_workers",
// see https://github.com/kubeflow/tf-operator/issues/751
"--shutdown_policy=all_workers"
else
"--shutdown_policy=worker",
"--tfjob_version=" + params.tfJobVersion,
Expand Down
4 changes: 2 additions & 2 deletions test/workflows/environments/jlewi-test/globals.libsonnet
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
namespace: 'e2etests',
}
namespace: "e2etests",
}
2 changes: 1 addition & 1 deletion test/workflows/environments/jlewi-test/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local base = import "base.libsonnet";
// uncomment if you reference ksonnet-lib
// local k = import "k.libsonnet";

base + {
base {
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n")
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"})
}
7 changes: 4 additions & 3 deletions test/workflows/environments/jlewi-test/params.libsonnet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local params = std.extVar("__ksonnet/params");
local globals = import "globals.libsonnet";
local envParams = params + {
components +: {
local envParams = params {
components+: {
// Insert component parameter overrides here. Ex:
// guestbook +: {
// name: "guestbook-dev",
Expand All @@ -12,6 +12,7 @@ local envParams = params + {

{
components: {
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
[x]: envParams.components[x] + globals
for x in std.objectFields(envParams.components)
},
}

0 comments on commit 30cdaaa

Please sign in to comment.