vmware-tanzu / velero

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

Fix backup log to show error string, not index #7805

Closed piny940 closed 1 month ago

piny940 commented 1 month ago

Thank you for contributing to Velero!

Please add a summary of your change

There was a mistake in golang range. Since errs's type is []string in this case, the code should be:

for _, err := range errs {
...
}

Does your change fix a particular issue?

No issue, but this is related to discussion #7800

Please indicate you've done the following:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 58.67%. Comparing base (f654188) to head (059effc).

Files Patch % Lines
pkg/controller/backup_controller.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7805 +/- ## ======================================= Coverage 58.67% 58.67% ======================================= Files 345 345 Lines 28743 28743 ======================================= Hits 16866 16866 Misses 10448 10448 Partials 1429 1429 ```

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