pingcap / tiup

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

Upgrade TiCDC before TiKV and PD when cluster is equal or greater than v5.1.0 #2253

Closed KanShiori closed 1 year ago

KanShiori commented 1 year ago

What problem does this PR solve?

Close #2166

What is changed and how it works?

Upgrade TiCDC before TiKV and PD when cluster is equal or greater than v5.1.0

Check List

Tests

  1. Upgrade cluster from v5.0.0 to v.5.2.0

    $ ./tiup-cluster upgrade my-cluster v5.2.0
    This operation will upgrade tidb v5.0.0 cluster my-cluster to v5.2.0.
    ...
    Upgrading component pd
        Restarting instance 127.0.0.1:2379
        Restart instance 127.0.0.1:2379 success
    Upgrading component tikv
        Restarting instance 127.0.0.1:20160
        Restart instance 127.0.0.1:20160 success
    Upgrading component tidb
        Restarting instance 127.0.0.1:4000
        Restart instance 127.0.0.1:4000 success
    Upgrading component cdc
        Restarting instance 127.0.0.1:8300
        Restart instance 127.0.0.1:8300 success
    ...
  2. Upgrade cluster from v5.1.0 to v5.2.0

    $ ./tiup-cluster upgrade my-cluster v5.2.0
    This operation will upgrade tidb v5.1.0 cluster my-cluster to v5.2.0.
    ...
    Upgrading component cdc
        Restarting instance 127.0.0.1:8300
        Restart instance 127.0.0.1:8300 success
    Upgrading component pd
        Restarting instance 127.0.0.1:2379
        Restart instance 127.0.0.1:2379 success
    Upgrading component tikv
        Restarting instance 127.0.0.1:20160
        Restart instance 127.0.0.1:20160 success
    Upgrading component tidb
        Restarting instance 127.0.0.1:4000
        Restart instance 127.0.0.1:4000 success
    ...
  3. Upgrade cluster from v5.2.0 to v5.3.0

    $  ./tiup-cluster upgrade my-cluster v5.3.0
    This operation will upgrade tidb v5.2.0 cluster my-cluster to v5.3.0.
    ...
    Upgrading component cdc
        Restarting instance 127.0.0.1:8300
        Restart instance 127.0.0.1:8300 success
    Upgrading component pd
        Restarting instance 127.0.0.1:2379
        Restart instance 127.0.0.1:2379 success
    Upgrading component tikv
        Restarting instance 127.0.0.1:20160
        Restart instance 127.0.0.1:20160 success
    Upgrading component tidb
        Restarting instance 127.0.0.1:4000
    ...

Release notes:

Upgrade TiCDC before TiKV and PD when cluster is equal or greater than v5.1.0
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (2feb74b) 55.98% compared to head (0a44220) 55.98%.

:exclamation: Current head 0a44220 differs from pull request most recent head 9fb8404. Consider uploading reports for the commit 9fb8404 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2253 +/- ## ======================================= Coverage 55.98% 55.98% ======================================= Files 320 320 Lines 33881 33891 +10 ======================================= + Hits 18965 18971 +6 - Misses 12648 12651 +3 - Partials 2268 2269 +1 ``` | [Flag](https://app.codecov.io/gh/pingcap/tiup/pull/2253/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/2253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `44.82% <100.00%> (+0.02%)` | :arrow_up: | | [dm](https://app.codecov.io/gh/pingcap/tiup/pull/2253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `25.69% <17.65%> (-0.06%)` | :arrow_down: | | [playground](https://app.codecov.io/gh/pingcap/tiup/pull/2253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `15.70% <0.00%> (-0.01%)` | :arrow_down: | | [tiup](https://app.codecov.io/gh/pingcap/tiup/pull/2253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `15.86% <0.00%> (-0.01%)` | :arrow_down: | | [unittest](https://app.codecov.io/gh/pingcap/tiup/pull/2253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `22.64% <0.00%> (-0.01%)` | :arrow_down: | 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. | [Files Changed](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [components/dm/spec/logic.go](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-Y29tcG9uZW50cy9kbS9zcGVjL2xvZ2ljLmdv) | `70.00% <100.00%> (ø)` | | | [pkg/cluster/manager/check.go](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-cGtnL2NsdXN0ZXIvbWFuYWdlci9jaGVjay5nbw==) | `69.41% <100.00%> (ø)` | | | [pkg/cluster/manager/upgrade.go](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-cGtnL2NsdXN0ZXIvbWFuYWdlci91cGdyYWRlLmdv) | `57.29% <100.00%> (ø)` | | | [pkg/cluster/operation/upgrade.go](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-cGtnL2NsdXN0ZXIvb3BlcmF0aW9uL3VwZ3JhZGUuZ28=) | `47.14% <100.00%> (ø)` | | | [pkg/cluster/spec/spec.go](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-cGtnL2NsdXN0ZXIvc3BlYy9zcGVjLmdv) | `83.60% <100.00%> (+0.27%)` | :arrow_up: | | [pkg/tidbver/tidbver.go](https://app.codecov.io/gh/pingcap/tiup/pull/2253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#diff-cGtnL3RpZGJ2ZXIvdGlkYnZlci5nbw==) | `90.16% <100.00%> (+0.33%)` | :arrow_up: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/pingcap/tiup/pull/2253/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap)

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

ti-chi-bot[bot] commented 1 year ago

@hi-rustin: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/pingcap/tiup/pull/2253#pullrequestreview-1583910155): >LGTM Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Rustin170506 commented 1 year ago

/cc @sdojjy

/hold

ti-chi-bot[bot] commented 1 year ago

@hi-rustin: GitHub didn't allow me to request PR reviews from the following users: sdojjy.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to [this](https://github.com/pingcap/tiup/pull/2253#issuecomment-1683531707): >/cc @sdojjy > >/hold Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 1 year ago

@sdojjy: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/pingcap/tiup/pull/2253#pullrequestreview-1584899746): > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ti-chi-bot[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hi-rustin, kaaaaaaang, sdojjy

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/tiup/blob/master/OWNERS)~~ [kaaaaaaang] 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 1 year ago

[LGTM Timeline notifier]

Timeline:

kaaaaaaang commented 1 year ago

/merge