@@ -26,14 +26,15 @@ const (
2626 FeastPrefix = "feast-"
2727 FeatureStoreName = "simple-feast-setup"
2828 FeastResourceName = FeastPrefix + FeatureStoreName
29+ FeatureStoreResourceName = "featurestores.feast.dev"
2930)
3031
3132// dynamically checks if all conditions of custom resource featurestore are in "Ready" state.
3233func checkIfFeatureStoreCustomResourceConditionsInReady (featureStoreName , namespace string ) error {
3334 // Wait 10 seconds to lets the feature store status update
3435 time .Sleep (1 * time .Minute )
3536
36- cmd := exec .Command ("kubectl" , "get" , "featurestore" , featureStoreName , "-n" , namespace , "-o" , "json" )
37+ cmd := exec .Command ("kubectl" , "get" , FeatureStoreResourceName , featureStoreName , "-n" , namespace , "-o" , "json" )
3738
3839 var out bytes.Buffer
3940 var stderr bytes.Buffer
@@ -179,7 +180,16 @@ func isFeatureStoreHavingRemoteRegistry(namespace, featureStoreName string) (boo
179180 startTime := time .Now ()
180181
181182 for time .Since (startTime ) < timeout {
182- cmd := exec .Command ("kubectl" , "get" , "featurestore" , featureStoreName , "-n" , namespace ,
183+ // First check if the resource exists
184+ checkCmd := exec .Command ("kubectl" , "get" , FeatureStoreResourceName , featureStoreName , "-n" , namespace )
185+ if err := checkCmd .Run (); err != nil {
186+ // Resource doesn't exist yet, retry
187+ fmt .Printf ("FeatureStore %s/%s does not exist yet, waiting...\n " , namespace , featureStoreName )
188+ time .Sleep (interval )
189+ continue
190+ }
191+
192+ cmd := exec .Command ("kubectl" , "get" , FeatureStoreResourceName , featureStoreName , "-n" , namespace ,
183193 "-o=jsonpath='{.status.applied.services.registry}'" )
184194
185195 output , err := cmd .Output ()
0 commit comments