@@ -195,7 +195,9 @@ func (r *AtomicRelease) Reconcile(ctx context.Context, req *Request) error {
195195 }
196196
197197 // Determine the next action to run based on the current state.
198- log .V (logger .DebugLevel ).Info ("determining next Helm action based on current state" )
198+ log .V (logger .DebugLevel ).Info (
199+ fmt .Sprintf ("determining next Helm action based on state: '%s' reason '%s'" , state .Status , state .Reason ),
200+ )
199201 if next , err = r .actionForState (ctx , req , state ); err != nil {
200202 if errors .Is (err , ErrExceededMaxRetries ) {
201203 conditions .MarkStalled (req .Object , "RetriesExceeded" , "Failed to %s after %d attempt(s)" ,
@@ -211,6 +213,7 @@ func (r *AtomicRelease) Reconcile(ctx context.Context, req *Request) error {
211213
212214 // If there is no next action, we are done.
213215 if next == nil {
216+ log .V (logger .DebugLevel ).Info ("no further action to take, atomic release completed" )
214217 conditions .Delete (req .Object , meta .ReconcilingCondition )
215218
216219 // Always summarize; this ensures we restore transient errors
@@ -241,9 +244,7 @@ func (r *AtomicRelease) Reconcile(ctx context.Context, req *Request) error {
241244 )
242245
243246 if retry := req .Object .GetActiveRetry (); retry != nil {
244- conditions .Delete (req .Object , meta .ReconcilingCondition )
245- conditions .MarkFalse (req .Object , meta .ReadyCondition , "RetryAfterInterval" ,
246- "Will retry after %s" , retry .GetRetryInterval ().String ())
247+ conditions .MarkReconciling (req .Object , meta .ProgressingWithRetryReason , "retrying after %s" , retry .GetRetryInterval ().String ())
247248 return ErrRetryAfterInterval
248249 }
249250
@@ -278,11 +279,13 @@ func (r *AtomicRelease) Reconcile(ctx context.Context, req *Request) error {
278279 // Run the action sub-reconciler.
279280 log .Info (fmt .Sprintf ("running '%s' action with timeout of %s" , next .Name (), timeoutForAction (next , req .Object ).String ()))
280281 if err = next .Reconcile (ctx , req ); err != nil {
282+ log .V (logger .DebugLevel ).Info (
283+ fmt .Sprintf ("action reconciler %s of type %s returned error: %s" , next .Name (), next .Type (), err ),
284+ )
285+
281286 if retry := req .Object .GetActiveRetry (); retry != nil {
282287 log .Error (err , fmt .Sprintf ("failed to run '%s' action" , next .Name ()))
283- conditions .Delete (req .Object , meta .ReconcilingCondition )
284- conditions .MarkFalse (req .Object , meta .ReadyCondition , "RetryAfterInterval" ,
285- "Will retry after %s" , retry .GetRetryInterval ().String ())
288+ conditions .MarkReconciling (req .Object , meta .ProgressingWithRetryReason , "retrying after %s" , retry .GetRetryInterval ().String ())
286289 return ErrRetryAfterInterval
287290 }
288291
@@ -299,9 +302,7 @@ func (r *AtomicRelease) Reconcile(ctx context.Context, req *Request) error {
299302 )
300303
301304 if retry := req .Object .GetActiveRetry (); retry != nil {
302- conditions .Delete (req .Object , meta .ReconcilingCondition )
303- conditions .MarkFalse (req .Object , meta .ReadyCondition , "RetryAfterInterval" ,
304- "Will retry after %s" , retry .GetRetryInterval ().String ())
305+ conditions .MarkReconciling (req .Object , meta .ProgressingWithRetryReason , "retrying after %s" , retry .GetRetryInterval ().String ())
305306 return ErrRetryAfterInterval
306307 }
307308
0 commit comments