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

Clone with yanked version #602

Merged
merged 2 commits into from
Jul 15, 2020
Merged

Clone with yanked version #602

merged 2 commits into from
Jul 15, 2020

Conversation

lucklove
Copy link
Member

At this time, tiup mirror clone <dir> <version> will clone component manifest only contains .
If we deployed a cluster with an early version, some commands may fail since we can't find the entry in the manifest.

This PR will clone the component manifest with all versions, the versions besides the target version will be set as yanked

@lucklove lucklove added type/new-feature Categorizes pr as related to a new feature. status/WIP labels Jul 14, 2020
lucklove added 2 commits July 15, 2020 12:30
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Signed-off-by: lucklove <gnu.crazier@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #602 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #602      +/-   ##
==========================================
- Coverage   50.95%   50.94%   -0.02%     
==========================================
  Files         219      219              
  Lines       15951    15970      +19     
==========================================
+ Hits         8128     8136       +8     
- Misses       6684     6687       +3     
- Partials     1139     1147       +8     
Flag Coverage Δ
#coverage 50.94% <ø> (-0.02%) ⬇️
Impacted Files Coverage Δ
...c/github.com/pingcap/tiup/pkg/cluster/api/pdapi.go 57.76% <0.00%> (-4.35%) ⬇️
go/src/github.com/pingcap/tiup/cmd/list.go 40.55% <0.00%> (-0.70%) ⬇️
...hub.com/pingcap/tiup/components/playground/main.go 79.87% <0.00%> (-0.65%) ⬇️
...m/pingcap/tiup/components/playground/playground.go 30.57% <0.00%> (-0.17%) ⬇️
...ub.com/pingcap/tiup/pkg/repository/clone_mirror.go 0.00% <0.00%> (ø)
...om/pingcap/tiup/pkg/cluster/embed/autogen_pkger.go 100.00% <0.00%> (ø)
...b.com/pingcap/tiup/pkg/repository/v1_repository.go 66.32% <0.00%> (+0.41%) ⬆️
...pingcap/tiup/pkg/repository/v1manifest/manifest.go 54.14% <0.00%> (+2.82%) ⬆️
.../pingcap/tiup/components/playground/utils/utils.go 31.91% <0.00%> (+4.25%) ⬆️
...om/pingcap/tiup/pkg/repository/v1manifest/types.go 80.00% <0.00%> (+5.92%) ⬆️

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 c147d3e...73da666. Read the comment docs.

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 15, 2020
@lucklove lucklove merged commit 042b077 into pingcap:master Jul 15, 2020
}

// VersionList return all versions exclude yanked versions
func (manifest *Component) VersionList(platform string) map[string]VersionItem {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think public methods should well-tested.

@lonng lonng deleted the clone branch July 15, 2020 13:24
@lonng
Copy link
Contributor

lonng commented Jul 15, 2020

This PR lack of testing.

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. type/new-feature Categorizes pr as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants