diff --git a/pkg/kfupgrade/kfupgrade.go b/pkg/kfupgrade/kfupgrade.go index afa35418..59d4c494 100644 --- a/pkg/kfupgrade/kfupgrade.go +++ b/pkg/kfupgrade/kfupgrade.go @@ -297,8 +297,7 @@ func (upgrader *KfUpgrader) Apply() error { func (upgrader *KfUpgrader) DeleteObsoleteResources(ns string) error { applicationsv1beta1.AddToScheme(scheme.Scheme) - ver := upgrader.OldKfCfg.Spec.Version - log.Infof("Deleting resources in in namespace %v version %v", ns, ver) + log.Infof("Deleting resources in in namespace %v", ns) objs := []runtime.Object{ &applicationsv1beta1.Application{}, @@ -309,7 +308,7 @@ func (upgrader *KfUpgrader) DeleteObsoleteResources(ns string) error { } for _, obj := range objs { - err := upgrader.DeleteResources(ns, ver, obj) + err := upgrader.DeleteResources(ns, obj) if err != nil { return err } @@ -318,18 +317,17 @@ func (upgrader *KfUpgrader) DeleteObsoleteResources(ns string) error { return nil } -func (upgrader *KfUpgrader) DeleteResources(ns string, ver string, obj runtime.Object) error { +func (upgrader *KfUpgrader) DeleteResources(ns string, obj runtime.Object) error { config := kftypesv3.GetConfig() kubeClient, err := client.New(config, client.Options{}) objKind := reflect.TypeOf(obj) - log.Infof("Deleting resources type %v in in namespace %v version %v", objKind, ns, ver) + log.Infof("Deleting resources type %v in in namespace %v", objKind, ns) err = kubeClient.DeleteAllOf(context.Background(), obj, client.InNamespace(ns), client.MatchingLabels{ "app.kubernetes.io/part-of": "kubeflow", - kftypesv3.DefaultAppVersion: ver, }, client.PropagationPolicy(metav1.DeletePropagationBackground)) diff --git a/prow_config.yaml b/prow_config.yaml index 4bdcf612..7f7957e8 100644 --- a/prow_config.yaml +++ b/prow_config.yaml @@ -76,8 +76,8 @@ workflows: # test_endpoint flag is actually deprecated; we use pytest annotations to skip on # presubmit. test_endpoint: true - config_path: https://raw.githubusercontent.com/kubeflow/manifests/v0.7-branch/kfdef/kfctl_gcp_iap.0.7.1.yaml - upgrade_spec_path: https://raw.githubusercontent.com/kubeflow/manifests/master/kfdef/kfctl_upgrade_gcp_iap_1.0.0.yaml + config_path: https://raw.githubusercontent.com/kubeflow/manifests/v1.0-branch/kfdef/kfctl_gcp_iap.v1.0.0.yaml + upgrade_spec_path: https://raw.githubusercontent.com/kubeflow/manifests/master/kfdef/kfctl_upgrade_gcp_iap_1.0.2.yaml # E2E tests for kfctl_istio_dex # - app_dir: kubeflow/kubeflow/testing/workflows # component: kfctl_go_test diff --git a/py/kubeflow/kfctl/testing/ci/kfctl_upgrade_e2e_workflow.py b/py/kubeflow/kfctl/testing/ci/kfctl_upgrade_e2e_workflow.py index 0a438405..3df7f56d 100644 --- a/py/kubeflow/kfctl/testing/ci/kfctl_upgrade_e2e_workflow.py +++ b/py/kubeflow/kfctl/testing/ci/kfctl_upgrade_e2e_workflow.py @@ -40,6 +40,8 @@ UPGRADE_DAG_NAME = "upgrade-dag" +READY_AFTER_UPGRADE = "ready-after-upgrade" + TEMPLATE_LABEL = "kfctl_upgrade_e2e" class Builder(kfctl_e2e_workflow.Builder): @@ -107,6 +109,25 @@ def build(self): argo_build_util.add_task_only_to_dag(self.workflow, kfctl_e2e_workflow.E2E_DAG_NAME, step_name, template_name, dependencies) + # Wait for Kubeflow to be ready after upgrading + step_name = READY_AFTER_UPGRADE + template_name = "kubeflow-is-ready" + command = [ + "pytest", + "kf_is_ready_test.py", + "-s", + "--log-cli-level=info", + "--junitxml=" + os.path.join(self.artifacts_dir, + "junit_ready-after-upgrade-test-" + + self.config_name + ".xml"), + "-o", "junit_suite_name=test_ready_after_upgrade_" + self.config_name, + "--app_path=" + self.app_dir, + ] + + dependencies = [UPGRADE_DAG_NAME] + argo_build_util.add_task_only_to_dag(self.workflow, kfctl_e2e_workflow.E2E_DAG_NAME, step_name, + template_name, dependencies) + #**************************************************************************** # Add tests DAG #**************************************************************************** @@ -114,7 +135,7 @@ def build(self): step_name = "test-after-upgrade" template_name = kfctl_e2e_workflow.TESTS_DAG_NAME - dependencies = [UPGRADE_DAG_NAME] + dependencies = [READY_AFTER_UPGRADE] argo_build_util.add_task_only_to_dag(self.workflow, kfctl_e2e_workflow.E2E_DAG_NAME, step_name, template_name, dependencies)