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

Fix the issue that tiup may choose yanked version if it's already installed #1191

Merged
merged 4 commits into from
Mar 5, 2021

Conversation

lucklove
Copy link
Member

@lucklove lucklove commented Mar 5, 2021

What problem does this PR solve?

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot ti-chi-bot requested a review from july2993 March 5, 2021 08:03
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 5, 2021
@AstroProfundis AstroProfundis changed the title Fix the issue that tiup may choose yanked version Fix the issue that tiup may choose yanked version if it's already installed Mar 5, 2021
pkg/environment/env.go Outdated Show resolved Hide resolved
if err != nil {
return "", err
}

errInstallFirst := errors.Annotatef(ErrInstallFirst, "use `tiup install %s` to install component `%s` first", component, component)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use ErrInstallFirst here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because this error will be displayed to the user

pkg/environment/env.go Outdated Show resolved Hide resolved
Co-authored-by: Allen Zhong <allen@moe.cat>
@AstroProfundis
Copy link
Contributor

/lgtm

/merge

@ti-chi-bot
Copy link
Member

@AstroProfundis: /merge in this pull request requires 1 /lgtm.

In response to this:

/lgtm

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 5, 2021
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: a6dfcb9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 5, 2021
@codecov-io
Copy link

codecov-io commented Mar 5, 2021

Codecov Report

Merging #1191 (da800f9) into master (a389747) will decrease coverage by 6.30%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1191      +/-   ##
==========================================
- Coverage   53.48%   47.17%   -6.31%     
==========================================
  Files         288      254      -34     
  Lines       20529    17648    -2881     
==========================================
- Hits        10979     8325    -2654     
- Misses       7841     7962     +121     
+ Partials     1709     1361     -348     
Flag Coverage Δ
cluster 45.11% <0.00%> (+0.02%) ⬆️
dm 25.35% <0.00%> (-0.26%) ⬇️
integrate 47.17% <0.00%> (-0.77%) ⬇️
playground ?
tiup ?
unittest ?

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

Impacted Files Coverage Δ
pkg/environment/env.go 16.07% <0.00%> (-36.62%) ⬇️
pkg/localdata/profile.go 6.81% <ø> (-39.85%) ⬇️
pkg/repository/store/store.go 0.00% <0.00%> (-100.00%) ⬇️
components/dm/ansible/worker.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-81.82%) ⬇️
pkg/meta/err.go 0.00% <0.00%> (-81.25%) ⬇️
pkg/telemetry/meta.go 0.00% <0.00%> (-80.00%) ⬇️
pkg/telemetry/scrub.go 6.66% <0.00%> (-80.00%) ⬇️
pkg/cluster/api/error.go 0.00% <0.00%> (-80.00%) ⬇️
pkg/repository/store/local.go 0.00% <0.00%> (-76.48%) ⬇️
... and 85 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 a389747...da800f9. Read the comment docs.

@AstroProfundis
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2021
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 5, 2021
@AstroProfundis
Copy link
Contributor

/unhold

/merge

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2021
@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: da800f9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 5, 2021
@ti-chi-bot ti-chi-bot merged commit c256bed into pingcap:master Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

4 participants