Skip to content

Commit 4a02ae5

Browse files
committed
refactor(postgres): drop a Ready reset every later path overwrites
After a successful destination write each path of the CNPG driver sets or removes Ready later in the same pass, and writes the status after it, so clearing a stale WaitingForOtherBackup or ClusterPluginApplyRetrying reason there could never outlive the pass, and no test could pin it. Signed-off-by: Alexey Artamonov <[email protected]> Assisted-by: LLM
1 parent 62c5cc6 commit 4a02ae5

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎internal/backupcontroller/cnpgstrategy_controller.go‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,6 @@ func (r *BackupJobReconciler) reconcileCNPG(ctx context.Context, j *backupsv1alp
404404
}
405405
if writeDestination {
406406
apimeta.RemoveStatusCondition(&j.Status.Conditions, backupCondDestinationApplied)
407-
if ready := apimeta.FindStatusCondition(j.Status.Conditions, "Ready"); ready != nil &&
408-
(ready.Reason == "WaitingForOtherBackup" || ready.Reason == "ClusterPluginApplyRetrying") {
409-
apimeta.RemoveStatusCondition(&j.Status.Conditions, "Ready")
410-
}
411407
}
412408
if attachment.serverName != serverName {
413409
logger.Info("preserving the live Cluster's barman serverName over the strategy template's",

0 commit comments

Comments
 (0)