Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support yank a single version on client side #605

Merged
merged 5 commits into from
Jul 21, 2020

Conversation

lucklove
Copy link
Member

At this time tiup only supports yank a whole component (include all versions).
In some scenes, we should yank a single version (for example, we push a wrong version).
This PR makes it possible to yank a single version.

@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2020

Codecov Report

Merging #605 into master will increase coverage by 0.49%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #605      +/-   ##
==========================================
+ Coverage   50.73%   51.22%   +0.49%     
==========================================
  Files         220      225       +5     
  Lines       16102    16573     +471     
==========================================
+ Hits         8169     8490     +321     
- Misses       6787     6899     +112     
- Partials     1146     1184      +38     
Flag Coverage Δ
#coverage 51.22% <ø> (+0.49%) ⬆️

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

Impacted Files Coverage Δ
.../pingcap/tiup/components/playground/utils/utils.go 0.00% <0.00%> (-31.92%) ⬇️
.../pingcap/tiup/components/cluster/command/reload.go 60.86% <0.00%> (-5.80%) ⬇️
...ingcap/tiup/components/cluster/command/scale_in.go 58.58% <0.00%> (-5.16%) ⬇️
...thub.com/pingcap/tiup/pkg/cluster/spec/instance.go 75.36% <0.00%> (-2.60%) ⬇️
...pingcap/tiup/components/cluster/command/upgrade.go 68.50% <0.00%> (-1.77%) ⬇️
...m/pingcap/tiup/components/playground/playground.go 29.58% <0.00%> (-1.00%) ⬇️
.../pingcap/tiup/components/cluster/command/deploy.go 77.13% <0.00%> (-0.38%) ⬇️
...ngcap/tiup/components/cluster/command/scale_out.go 64.50% <0.00%> (-0.26%) ⬇️
go/src/github.com/pingcap/tiup/cmd/mirror.go 39.85% <0.00%> (-0.10%) ⬇️
...c/github.com/pingcap/tiup/pkg/cluster/spec/util.go 69.23% <0.00%> (ø)
... and 25 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 8a10556...53a76d6. Read the comment docs.

@lucklove
Copy link
Member Author

The yanked version handle has been complete in #602

cmd/mirror.go Outdated
@@ -253,15 +254,22 @@ func newMirrorModifyCmd() *cobra.Command {
return err
}

m, err := env.V1Repository().FetchComponentManifest(args[0])
spec := strings.Split(args[0], ":")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use ParseComponentVersion function.

Copy link
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.

Rest LGTM

Please add some tests, include #602

lucklove added 5 commits July 18, 2020 14:53
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Signed-off-by: lucklove <gnu.crazier@gmail.com>
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 20, 2020
@lonng lonng merged commit 622cebf into pingcap:master Jul 21, 2020
@lonng lonng deleted the yank-version branch July 21, 2020 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants