vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.41k stars 1.37k forks source link

Surface errors when waiting for backupRepository #7762

Closed kaovilai closed 1 month ago

kaovilai commented 2 months ago

Make errors such as those found in https://github.com/vmware-tanzu/velero/issues/6928#issuecomment-1759369183

Makes errors easier to understand than "timed out waiting for the condition"

Signed-off-by: Tiger Kaovilai tkaovila@redhat.com

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

reasonerjt commented 2 months ago

Wouldn't Pollxxxx return the error returned by checkFunc ? cc @Lyndon-Li

kaovilai commented 2 months ago

Removed the conditional check on err to always return err. See unit tests changes for updated error values.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.66%. Comparing base (4d48273) to head (2c6853b). Report is 13 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7762 +/- ## ========================================== + Coverage 58.64% 58.66% +0.02% ========================================== Files 344 344 Lines 28720 28735 +15 ========================================== + Hits 16843 16858 +15 - Misses 10447 10448 +1 + Partials 1430 1429 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.