@@ -891,8 +891,6 @@ func (o *Operator) syncResolvingNamespace(obj interface{}) error {
891
891
// get the set of sources that should be used for resolution and best-effort get their connections working
892
892
logger .Debug ("resolving sources" )
893
893
894
- querier := NewNamespaceSourceQuerier (o .sources .AsClients (o .namespace , namespace ))
895
-
896
894
logger .Debug ("checking if subscriptions need update" )
897
895
898
896
subs , err := o .listSubscriptions (namespace )
@@ -925,7 +923,7 @@ func (o *Operator) syncResolvingNamespace(obj interface{}) error {
925
923
subscriptionUpdated = subscriptionUpdated || changedIP
926
924
927
925
// record the current state of the desired corresponding CSV in the status. no-op if we don't know the csv yet.
928
- sub , changedCSV , err := o .ensureSubscriptionCSVState (logger , sub , querier )
926
+ sub , changedCSV , err := o .ensureSubscriptionCSVState (logger , sub )
929
927
if err != nil {
930
928
logger .Debugf ("error recording current state of CSV in status: %v" , err )
931
929
return err
@@ -1092,7 +1090,7 @@ func (o *Operator) ensureSubscriptionInstallPlanState(logger *logrus.Entry, sub
1092
1090
return updated , true , nil
1093
1091
}
1094
1092
1095
- func (o * Operator ) ensureSubscriptionCSVState (logger * logrus.Entry , sub * v1alpha1.Subscription , querier SourceQuerier ) (* v1alpha1.Subscription , bool , error ) {
1093
+ func (o * Operator ) ensureSubscriptionCSVState (logger * logrus.Entry , sub * v1alpha1.Subscription ) (* v1alpha1.Subscription , bool , error ) {
1096
1094
if sub .Status .CurrentCSV == "" {
1097
1095
return sub , false , nil
1098
1096
}
@@ -1103,10 +1101,6 @@ func (o *Operator) ensureSubscriptionCSVState(logger *logrus.Entry, sub *v1alpha
1103
1101
logger .WithError (err ).WithField ("currentCSV" , sub .Status .CurrentCSV ).Debug ("error fetching csv listed in subscription status" )
1104
1102
out .Status .State = v1alpha1 .SubscriptionStateUpgradePending
1105
1103
} else {
1106
- // Check if an update is available for the current csv
1107
- if err := querier .Queryable (); err != nil {
1108
- return nil , false , err
1109
- }
1110
1104
out .Status .State = v1alpha1 .SubscriptionStateAtLatest
1111
1105
out .Status .InstalledCSV = sub .Status .CurrentCSV
1112
1106
}
0 commit comments