@@ -101,6 +101,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, pa *autoscalingv1alpha1.
101101 // Before we can reconcile decider and get real number of activators
102102 // we start with default of 2.
103103 if _ , err = c .ReconcileSKS (ctx , pa , nv1alpha1 .SKSOperationModeProxy , minActivators ); err != nil {
104+ pa .Status .MetricsPaused = false
104105 return fmt .Errorf ("error reconciling SKS: %w" , err )
105106 }
106107 pa .Status .MarkSKSNotReady (noPrivateServiceName ) // In both cases this is true.
@@ -118,13 +119,15 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, pa *autoscalingv1alpha1.
118119 }
119120
120121 if err := c .ReconcileMetric (ctx , pa , resolveScrapeTarget (ctx , pa )); err != nil {
122+ pa .Status .MetricsPaused = false
121123 return fmt .Errorf ("error reconciling Metric: %w" , err )
122124 }
123125
124126 // Get the appropriate current scale from the metric, and right size
125127 // the scaleTargetRef based on it.
126128 want , err := c .scaler .scale (ctx , pa , sks , decider .Status .DesiredScale )
127129 if err != nil {
130+ pa .Status .MetricsPaused = false
128131 return fmt .Errorf ("error scaling target: %w" , err )
129132 }
130133
@@ -148,6 +151,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, pa *autoscalingv1alpha1.
148151 podCounter := resourceutil .NewPodAccessor (c .podsLister , pa .Namespace , pa .Labels [serving .RevisionLabelKey ])
149152 ready , notReady , pending , terminating , err := podCounter .PodCountsByState ()
150153 if err != nil {
154+ pa .Status .MetricsPaused = false
151155 return fmt .Errorf ("error getting pod counts: %w" , err )
152156 }
153157
@@ -160,6 +164,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, pa *autoscalingv1alpha1.
160164
161165 sks , err = c .ReconcileSKS (ctx , pa , mode , numActivators )
162166 if err != nil {
167+ pa .Status .MetricsPaused = false
163168 return fmt .Errorf ("error reconciling SKS: %w" , err )
164169 }
165170 // Propagate service name.
0 commit comments