Skip to content

Fix dm patch and upgrade can't detect correct version#884

Merged
ti-srebot merged 2 commits intopingcap:masterfrom
lucklove:fix-patch
Nov 4, 2020
Merged

Fix dm patch and upgrade can't detect correct version#884
ti-srebot merged 2 commits intopingcap:masterfrom
lucklove:fix-patch

Conversation

@lucklove
Copy link
Copy Markdown
Member

@lucklove lucklove commented Nov 4, 2020

What problem does this PR solve?

Fix #883

What is changed and how it works?

Use metadata from specManager instead of hardcoded cluster metadata

Check List

Tests

  • Manual test (add detailed scripts or steps below)
JoshuadeMacBook-Pro:dm joshua$ tiup dm patch test ~/.tiup/storage/dm/packages/dm-worker-v2.0.0-linux-amd64.tar.gz -R dm-worker
Starting component `dm`: /Users/joshua/.tiup/components/dm/v1.2.0/tiup-dm patch test /Users/joshua/.tiup/storage/dm/packages/dm-worker-v2.0.0-linux-amd64.tar.gz -R dm-worker
+ [ Serial ] - SSHKeySet: privateKey=/Users/joshua/.tiup/storage/dm/clusters/test/ssh/id_rsa, publicKey=/Users/joshua/.tiup/storage/dm/clusters/test/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.139
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.139
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.140
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.140
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.134
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.139
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.139
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.134
+ [ Serial ] - BackupComponent: component=dm-worker, currentVersion=v2.0.0, remote=172.16.5.134:/home/tidb/deploy/dm-worker-8262
+ [ Serial ] - BackupComponent: component=dm-worker, currentVersion=v2.0.0, remote=172.16.5.140:/home/tidb/deploy/dm-worker-8262
+ [ Serial ] - BackupComponent: component=dm-worker, currentVersion=v2.0.0, remote=172.16.5.139:/home/tidb/deploy/dm-worker-8262
+ [ Serial ] - InstallPackage: srcPath=/Users/joshua/.tiup/storage/dm/packages/dm-worker-v2.0.0-linux-amd64.tar.gz, remote=172.16.5.139:/home/tidb/deploy/dm-worker-8262
+ [ Serial ] - InstallPackage: srcPath=/Users/joshua/.tiup/storage/dm/packages/dm-worker-v2.0.0-linux-amd64.tar.gz, remote=172.16.5.134:/home/tidb/deploy/dm-worker-8262
+ [ Serial ] - InstallPackage: srcPath=/Users/joshua/.tiup/storage/dm/packages/dm-worker-v2.0.0-linux-amd64.tar.gz, remote=172.16.5.140:/home/tidb/deploy/dm-worker-8262
+ [ Serial ] - UpgradeCluster
Restarting component dm-worker
        Restarting instance 172.16.5.140
        Restart 172.16.5.140 success
        Restarting instance 172.16.5.139
        Restart 172.16.5.139 success
        Restarting instance 172.16.5.134
        Restart 172.16.5.134 success

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 4, 2020

Codecov Report

Merging #884 into master will decrease coverage by 11.71%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #884       +/-   ##
===========================================
- Coverage   53.49%   41.77%   -11.72%     
===========================================
  Files         263      249       -14     
  Lines       19067    18598      -469     
===========================================
- Hits        10199     7770     -2429     
- Misses       7293     9605     +2312     
+ Partials     1575     1223      -352     
Flag Coverage Δ
cluster 39.33% <0.00%> (-6.16%) ⬇️
dm ?
integrate 39.77% <0.00%> (-8.56%) ⬇️
playground ?
tiup 10.85% <ø> (ø)
unittest 21.11% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cluster/manager.go 57.32% <0.00%> (-10.53%) ⬇️
components/dm/main.go 0.00% <0.00%> (-100.00%) ⬇️
components/dm/spec/bindversion.go 0.00% <0.00%> (-100.00%) ⬇️
components/dm/spec/cluster.go 0.00% <0.00%> (-87.50%) ⬇️
components/playground/monitor.go 0.00% <0.00%> (-84.42%) ⬇️
components/dm/spec/logic.go 0.60% <0.00%> (-78.66%) ⬇️
components/playground/command.go 0.00% <0.00%> (-78.44%) ⬇️
components/cluster/command/check.go 6.37% <0.00%> (-72.82%) ⬇️
pkg/cluster/template/scripts/dm_worker.go 0.00% <0.00%> (-71.43%) ⬇️
pkg/cluster/task/limits.go 0.00% <0.00%> (-68.75%) ⬇️
... and 91 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1bb3dc...8b6b511. Read the comment docs.

Copy link
Copy Markdown
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 4, 2020
@lonng
Copy link
Copy Markdown
Contributor

lonng commented Nov 4, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 4, 2020
@ti-srebot
Copy link
Copy Markdown
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 1d7cc25 into pingcap:master Nov 4, 2020
@lucklove lucklove changed the title Fix tiup dm patch can't detect correct version Fix patch and upgrade can't detect correct version Nov 11, 2020
@lucklove lucklove changed the title Fix patch and upgrade can't detect correct version Fix dm patch and upgrade can't detect correct version Nov 11, 2020
@lucklove lucklove added this to the v1.2.4 milestone Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tiup-dm patch not work

4 participants