tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

fix: avoid silent rejection to invalid `podManagementPolicy`

Open hoyhbx opened this issue 3 years ago • 5 comments

What problem does this PR solve?

This PR solves the problem mentioned in https://github.com/pingcap/tidb-operator/issues/4649. Basically, we believe an invalid podManagementPolicy should not be silently replaced by some default values without explicitly telling the user that the input is invalid.

What is changed and how does it work?

We added a warning to explicitly tell the user that podManagement is invalid and the operator will use Parallel instead.

Code changes

  • [x] Has Go code change
  • [ ] Has CI related scripts change

Tests

  • [x] Unit test
  • [ ] E2E test
  • [ ] Manual test
  • [ ] No code

Side effects

  • [ ] Breaking backward compatibility
  • [ ] Other side effects:

Related changes

  • [ ] Need to cherry-pick to the release branch
  • [ ] Need to update the documentation

Release Notes

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

NONE

hoyhbx avatar Jul 27 '22 22:07 hoyhbx

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.

ti-chi-bot avatar Jul 27 '22 22:07 ti-chi-bot

@hoyhbx Please rebase this PR, thanks!

DanielZhangQD avatar Aug 03 '22 10:08 DanielZhangQD

Codecov Report

Merging #4650 (0fce0aa) into master (5c7e1a4) will increase coverage by 0.00%. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4650   +/-   ##
=======================================
  Coverage   62.64%   62.65%           
=======================================
  Files         186      186           
  Lines       20853    20853           
=======================================
+ Hits        13064    13066    +2     
+ Misses       6592     6591    -1     
+ Partials     1197     1196    -1     
Flag Coverage Δ
unittest 62.65% <ø> (+<0.01%) :arrow_up:

codecov-commenter avatar Aug 03 '22 19:08 codecov-commenter

@hoyhbx Please rebase this PR, thanks!

@DanielZhangQD It's done now.

hoyhbx avatar Aug 03 '22 19:08 hoyhbx

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ti-chi-bot[bot] avatar Jul 18 '23 01:07 ti-chi-bot[bot]