From ef6b4d6503f266a5ba7b03b6b0d458f88054c552 Mon Sep 17 00:00:00 2001 From: Vedant Mahabaleshwarkar Date: Wed, 8 Jan 2025 15:23:12 +0530 Subject: [PATCH] [RHOAIENG-16851] Remove component url temporarily Signed-off-by: Vedant Mahabaleshwarkar --- .../v1beta1/inference_service_status.go | 9 ++-- .../rawkube_controller_test.go | 48 +++++++++---------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/pkg/apis/serving/v1beta1/inference_service_status.go b/pkg/apis/serving/v1beta1/inference_service_status.go index 0373c0e3d2f..469a8a42d34 100644 --- a/pkg/apis/serving/v1beta1/inference_service_status.go +++ b/pkg/apis/serving/v1beta1/inference_service_status.go @@ -336,9 +336,12 @@ func (ss *InferenceServiceStatus) PropagateRawStatus( } condition := getDeploymentCondition(deploymentList, appsv1.DeploymentAvailable) - if condition != nil && condition.Status == v1.ConditionTrue { - statusSpec.URL = url - } + // currently the component url is disabled as this url generated based on ingressConfig. This is incompatible with + // rawdeployment changes as the url depends on the route creation, if a route is requested. + // TODO: add back component url deterministicly + // if condition != nil && condition.Status == v1.ConditionTrue { + // statusSpec.URL = url + //} readyCondition := readyConditionsMap[component] ss.SetCondition(readyCondition, condition) ss.Components[component] = statusSpec diff --git a/pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go b/pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go index 0cb768a7bec..23303fc5a04 100644 --- a/pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go +++ b/pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go @@ -425,10 +425,10 @@ var _ = Describe("v1beta1 inference service controller", func() { Components: map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec{ v1beta1.PredictorComponent: { LatestCreatedRevision: "", - URL: &apis.URL{ - Scheme: "http", - Host: "raw-foo-predictor-default.example.com", - }, + //URL: &apis.URL{ + // Scheme: "http", + // Host: "raw-foo-predictor-default.example.com", + //}, }, }, ModelStatus: v1beta1.ModelStatus{ @@ -840,10 +840,10 @@ var _ = Describe("v1beta1 inference service controller", func() { Components: map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec{ v1beta1.PredictorComponent: { LatestCreatedRevision: "", - URL: &apis.URL{ - Scheme: "http", - Host: "raw-foo-customized-predictor-default.example.com", - }, + //URL: &apis.URL{ + // Scheme: "http", + // Host: "raw-foo-customized-predictor-default.example.com", + //}, }, }, ModelStatus: v1beta1.ModelStatus{ @@ -1246,10 +1246,10 @@ var _ = Describe("v1beta1 inference service controller", func() { Components: map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec{ v1beta1.PredictorComponent: { LatestCreatedRevision: "", - URL: &apis.URL{ - Scheme: "http", - Host: "raw-foo-2-predictor-default.example.com", - }, + //URL: &apis.URL{ + // Scheme: "http", + // Host: "raw-foo-2-predictor-default.example.com", + //}, }, }, ModelStatus: v1beta1.ModelStatus{ @@ -1723,10 +1723,10 @@ var _ = Describe("v1beta1 inference service controller", func() { Components: map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec{ v1beta1.PredictorComponent: { LatestCreatedRevision: "", - URL: &apis.URL{ - Scheme: "http", - Host: fmt.Sprintf("%s-predictor-default.example.com", serviceName), - }, + //URL: &apis.URL{ + // Scheme: "http", + // Host: fmt.Sprintf("%s-predictor-default.example.com", serviceName), + //}, }, }, ModelStatus: v1beta1.ModelStatus{ @@ -2156,10 +2156,10 @@ var _ = Describe("v1beta1 inference service controller", func() { Components: map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec{ v1beta1.PredictorComponent: { LatestCreatedRevision: "", - URL: &apis.URL{ - Scheme: "http", - Host: fmt.Sprintf("%s-predictor.%s.%s", serviceName, serviceKey.Namespace, domain), - }, + //URL: &apis.URL{ + // Scheme: "http", + // Host: fmt.Sprintf("%s-predictor.%s.%s", serviceName, serviceKey.Namespace, domain), + //}, }, }, ModelStatus: v1beta1.ModelStatus{ @@ -2659,10 +2659,10 @@ var _ = Describe("v1beta1 inference service controller", func() { Components: map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec{ v1beta1.PredictorComponent: { LatestCreatedRevision: "", - URL: &apis.URL{ - Scheme: "http", - Host: "raw-auth-predictor-default.example.com", - }, + //URL: &apis.URL{ + // Scheme: "http", + // Host: "raw-auth-predictor-default.example.com", + //}, }, }, ModelStatus: v1beta1.ModelStatus{