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.22k stars 497 forks source link

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

Closed MarsBighead closed 6 months ago

MarsBighead commented 6 months ago

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.

sre-bot commented 6 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.

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

Welcome @MarsBighead! It looks like this is your first PR to pingcap/tidb-operator 🎉

codecov-commenter commented 6 months ago

Codecov Report

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

Project coverage is 61.53%. Comparing base (44eeb5f) to head (e2a87aa).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5597 +/- ## ========================================== + Coverage 61.48% 61.53% +0.05% ========================================== Files 235 246 +11 Lines 30336 34229 +3893 ========================================== + Hits 18651 21064 +2413 - Misses 9815 11190 +1375 - Partials 1870 1975 +105 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5597/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5597/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `21.18% <100.00%> (?)` | | | [unittest](https://app.codecov.io/gh/pingcap/tidb-operator/pull/5597/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `61.49% <0.00%> (+<0.01%)` | :arrow_up: |
csuzhangxc commented 6 months ago

/run-pull-e2e-kind-br

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: WangLe1321

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tidb-operator/blob/master/OWNERS)~~ [WangLe1321] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 6 months ago

[LGTM Timeline notifier]

Timeline:

csuzhangxc commented 6 months ago

/cherry-pick release-1.5

ti-chi-bot commented 6 months ago

@csuzhangxc: once the present PR merges, I will cherry-pick it on top of release-1.5 in the new PR and assign it to you.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5597#issuecomment-2026968200): >/cherry-pick release-1.5 Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
ti-chi-bot commented 6 months ago

@csuzhangxc: new pull request created to branch release-1.5: #5598.

In response to [this](https://github.com/pingcap/tidb-operator/pull/5597#issuecomment-2026968200): >/cherry-pick release-1.5 Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.