diff --git a/bootstrap/pkg/kfapp/ksonnet/ksonnet.go b/bootstrap/pkg/kfapp/ksonnet/ksonnet.go index 26b88784cfa..a63b8cbfc18 100644 --- a/bootstrap/pkg/kfapp/ksonnet/ksonnet.go +++ b/bootstrap/pkg/kfapp/ksonnet/ksonnet.go @@ -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 } diff --git a/testing/kfctl/kfctl_go_test.py b/testing/kfctl/kfctl_go_test.py index 872c96b0e60..2e8c72245e6 100644 --- a/testing/kfctl/kfctl_go_test.py +++ b/testing/kfctl/kfctl_go_test.py @@ -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)