pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.2k stars 490 forks source link

fix: avoid tidb operator panic becuase of empty backup.Status.BackoffRetryStatus (#5597) #5598

Closed ti-chi-bot closed 3 months ago

ti-chi-bot commented 3 months ago

This is an automated cherry-pick of #5597

What problem does this PR solve?

What is changed and how does it work?

ref https://github.com/pingcap/tidb-operator/issues/5584

Fix tidb operator panic becuase of empty backup.Status.BackoffRetryStatus in multiple operators' case.

Code changes

Tests

Side effects

Related changes

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

ti-chi-bot[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign ehco1996 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/pingcap/tidb-operator/blob/release-1.5/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
sre-bot commented 3 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

codecov-commenter commented 3 months ago

Codecov Report

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

Project coverage is 61.54%. Comparing base (f3da06b) to head (693e59b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-1.5 #5598 +/- ## =============================================== - Coverage 61.56% 61.54% -0.02% =============================================== Files 229 229 Lines 29330 29330 =============================================== - Hits 18056 18051 -5 - Misses 9495 9498 +3 - Partials 1779 1781 +2 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5598/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5598/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.54% <0.00%> (-0.02%)` | :arrow_down: |