Skip to content

Commit

Permalink
fixes 'kfctl apply fails to create k8s resources; tries to deploy to …
Browse files Browse the repository at this point in the history
…127.0.0.1' (#2813)

* fixes 'kfctl apply fails to create k8s resources; tries to deploy to 127.0.0.1'

* remove run_with_retries for kfctl_go_test kfctl apply use case
  • Loading branch information
kkasravi authored and k8s-ci-robot committed Mar 27, 2019
1 parent cb00ecf commit 55ad7b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions bootstrap/pkg/kfapp/ksonnet/ksonnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,16 @@ func (ksApp *ksApp) envSet(envName string, host string) error {
actions.OptionAppRoot: ksApp.ksRoot(),
actions.OptionEnvName: ksApp.KsEnvName,
actions.OptionServer: host,
actions.OptionOverride: true,
})
if err != nil {
return fmt.Errorf("There was a problem setting ksonnet env: %v", err)
}
loadApp, loadErr := app.Load(afero.NewOsFs(), ksApp.KApp.HTTPClient(), ksApp.ksRoot())
if loadErr != nil {
return fmt.Errorf("could not reload the ksonnet env: %v", err)
}
ksApp.KApp = loadApp
return nil
}

Expand Down
6 changes: 2 additions & 4 deletions testing/kfctl/kfctl_go_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ def test_build_kfctl_go(app_path, project):
# We need to use retries because if we don't we see random failures
# where kfctl just appears to die.
#
# TODO(https://github.com/kubeflow/kubeflow/issues/2791): Running with
# retries will mask failures like kubeflow/kubeflow#2791 that will succeed
# on retry. We should fix the test so that we don't mask those errors.
run_with_retries([kfctl_path, "apply", "-V", "all"], cwd=app_path)
# Do not run with retries since it masks errors
util.run([kfctl_path, "apply", "-V", "all"], cwd=app_path)

verify_kubeconfig(project, zone, app_path)

Expand Down

0 comments on commit 55ad7b1

Please sign in to comment.