pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
425 stars 312 forks source link

cluster: fix that scaled nodes don't respect `component_versions` #2451

Closed djshow832 closed 3 months ago

djshow832 commented 3 months ago

What problem does this PR solve?

close #2450

When scale-out a component, the version of the scaled node doesn't respect the version specified in the component_versions of the original spec.

What is changed and how it works?

When creating the new topology, copy ComponentVersions to newPart, which is used when deploying new instances. Tests show that the component_versions would be merged correctly when parsing the scale-out topology.

Check List

Tests

Follow the steps in the issue and check the version of the scale node.

Code changes

Side effects

Related changes

Release notes:

- Fix that scaled nodes don't respect `component_versions`
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 xhebox 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/tiup/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov-commenter commented 3 months ago

Codecov Report

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

Project coverage is 48.11%. Comparing base (ac3a39e) to head (21f5bb4). Report is 2 commits behind head on master.

:exclamation: Current head 21f5bb4 differs from pull request most recent head cd90a92

Please upload reports for the commit cd90a92 to get more accurate results.

:exclamation: There is a different number of reports uploaded between BASE (ac3a39e) and HEAD (21f5bb4). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (ac3a39e) | HEAD (21f5bb4) | |------|------|------| |unittest|1|0|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2451 +/- ## ========================================== - Coverage 55.19% 48.11% -7.08% ========================================== Files 334 333 -1 Lines 35981 36049 +68 ========================================== - Hits 19859 17343 -2516 - Misses 13742 16381 +2639 + Partials 2380 2325 -55 ``` | [Flag](https://app.codecov.io/gh/pingcap/tiup/pull/2451/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [cluster](https://app.codecov.io/gh/pingcap/tiup/pull/2451/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `42.02% <100.00%> (-2.55%)` | :arrow_down: | | [dm](https://app.codecov.io/gh/pingcap/tiup/pull/2451/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `25.19% <0.00%> (+0.18%)` | :arrow_up: | | [playground](https://app.codecov.io/gh/pingcap/tiup/pull/2451/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `16.16% <0.00%> (+0.10%)` | :arrow_up: | | [unittest](https://app.codecov.io/gh/pingcap/tiup/pull/2451/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more.

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

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

[LGTM Timeline notifier]

Timeline: