Skip to content

Commit 65a2493

Browse files
committed
Revert "fix(appset): generated app errors should use the default requeue (argoproj#21887) (argoproj#21936)"
This reverts commit 757c773.
1 parent 757c773 commit 65a2493

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

applicationset/controllers/applicationset_controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
155155
// desiredApplications is the main list of all expected Applications from all generators in this appset.
156156
desiredApplications, applicationSetReason, err := template.GenerateApplications(logCtx, applicationSetInfo, r.Generators, r.Renderer, r.Client)
157157
if err != nil {
158-
logCtx.Errorf("unable to generate applications: %v", err)
159158
_ = r.setApplicationSetStatusCondition(ctx,
160159
&applicationSetInfo,
161160
argov1alpha1.ApplicationSetCondition{
@@ -165,8 +164,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
165164
Status: argov1alpha1.ApplicationSetConditionStatusTrue,
166165
}, parametersGenerated,
167166
)
168-
// In order for the controller SDK to respect RequeueAfter, the error must be nil
169-
return ctrl.Result{RequeueAfter: ReconcileRequeueOnValidationError}, nil
167+
return ctrl.Result{RequeueAfter: ReconcileRequeueOnValidationError}, err
170168
}
171169

172170
parametersGenerated = true

applicationset/controllers/applicationset_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ func TestRequeueGeneratorFails(t *testing.T) {
18851885
}
18861886

18871887
res, err := r.Reconcile(context.Background(), req)
1888-
require.NoError(t, err)
1888+
require.Error(t, err)
18891889
assert.Equal(t, ReconcileRequeueOnValidationError, res.RequeueAfter)
18901890
}
18911891

0 commit comments

Comments
 (0)