The current reconciler.New takes both reconciler.Operations and reconciler.BatchOperations. The BatchOperations can be nil in which cases objects are reconciled one at a time.
This API seems to lead to many users assuming that both Operations and BatchOperations need to be implemented. Make the API easier to use correctly by removing the BatchOperations parameter from reconciler.New and introducing a reconciler.NewBatchReconciler constructor. Extend BatchOperations with Prune method and refactor the reconciler to work without single object reconciliation (e.g. the retry handling which should be able to retry a batch).
The current
reconciler.Newtakes bothreconciler.Operationsandreconciler.BatchOperations. TheBatchOperationscan be nil in which cases objects are reconciled one at a time.This API seems to lead to many users assuming that both
OperationsandBatchOperationsneed to be implemented. Make the API easier to use correctly by removing theBatchOperationsparameter fromreconciler.Newand introducing areconciler.NewBatchReconcilerconstructor. ExtendBatchOperationswithPrunemethod and refactor the reconciler to work without single object reconciliation (e.g. the retry handling which should be able to retry a batch).