Files
velero/pkg
AftAb-25andGitHub 9a1d2e6eb0 Fix switch case ordering bug in filterBackupOwnerReferences (#10161)
* Fix switch case ordering in filterBackupOwnerReferences (Issue #10160)

When client.Get returns a transient (non-NotFound) error, the previous
case ordering caused the UID mismatch case to fire against a zero-value
struct, silently dropping the owner reference and logging a misleading
'mismatched UIDs' warning instead of the intended error log.

Fix: move the general error handler before the UID mismatch check so
it is evaluated while err is still relevant. The UID check now only
runs when err == nil (i.e. the Schedule was successfully fetched).

Also add a test case that injects a transient Get error via the fake
client interceptor to verify the owner reference is preserved.

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

* Add changelog for #10160

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

---------

Signed-off-by: aftab <aftab123215@gmail.com>
2026-08-12 15:12:58 +08:00
..
2026-08-03 13:25:18 +08:00
2023-04-16 12:49:55 -04:00
2025-12-31 15:42:14 +08:00
2026-08-06 09:36:28 +00:00
2026-08-03 13:28:31 +08:00