Fix missing gcFailureBSLUnavailable label during garbage collection (#10154)
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Failing after 6s
Run the E2E test on kind / get-go-version (push) Failing after 7s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 5s
Main CI / get-go-version (push) Failing after 6s
Main CI / Build (push) Skipped

* Fix gcFailureBSLUnavailable label not applied (Issue #10153)

Signed-off-by: aftab <aftab123215@gmail.com>

* Fix linter error: use require.NoError before checking label

Signed-off-by: aftab <aftab123215@gmail.com>

---------

Signed-off-by: aftab <aftab123215@gmail.com>
This commit is contained in:
AftAb-25
2026-08-04 13:06:45 -04:00
committed by GitHub
parent cf6202be46
commit ca72c2e7e2
2 changed files with 22 additions and 9 deletions
+4
View File
@@ -156,6 +156,10 @@ func (c *gcReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Re
if !veleroutil.BSLIsAvailable(*loc) {
log.Infof("BSL %s is unavailable, cannot gc backup", loc.Name)
backup.Labels[garbageCollectionFailure] = gcFailureBSLUnavailable
if err := c.Update(ctx, backup); err != nil {
log.WithError(err).Error("error updating backup labels")
}
return ctrl.Result{}, fmt.Errorf("bsl %s is unavailable, cannot gc backup", loc.Name)
}