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

Patch command corner case when using a wrong tar.gz file. #846

Closed
wshwsh12 opened this issue Oct 16, 2020 · 1 comment · Fixed by #1091
Closed

Patch command corner case when using a wrong tar.gz file. #846

wshwsh12 opened this issue Oct 16, 2020 · 1 comment · Fixed by #1091
Labels
category/usability Categorizes issue or PR as a usability enhancement. status/TODO Categorizes issue as we will do it. type/bug Categorizes issue as related to a bug.
Milestone

Comments

@wshwsh12
Copy link

wshwsh12 commented Oct 16, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Step 1: Patch a tar.gz file build by Jenkins.
1. tar tidb-server.tar.gz, it will remove tidb-server binary and create tidb-server directory (There is a directory named tidb-server in tidb repo).
2. tidb-server directory can't execute so that tidb will restart failed.

Step 2: Patch a tar.gz file right.
1. tar can't replace the directory to the right binary file.

  1. What did you expect to see?

In Step 1, the bin directory should be polluted if the tar.gz file is invalid.
In Step 2, the file/directory should be replaced successfully.

  1. What did you see instead?

Get some tar error. And it can't back to normal by tiup itself.

  1. What version of TiUP are you using (tiup --version)?
@wshwsh12 wshwsh12 added the type/bug Categorizes issue as related to a bug. label Oct 16, 2020
@lucklove lucklove added the status/TODO Categorizes issue as we will do it. label Oct 19, 2020
@lucklove
Copy link
Member

We should unzip the tar file to a temporary dir, and check if it has correct entry that satisfies TiUP, and then replace the current package with it.

@lucklove lucklove added this to the v1.2.3 milestone Oct 19, 2020
@AstroProfundis AstroProfundis added the category/usability Categorizes issue or PR as a usability enhancement. label Oct 22, 2020
@lonng lonng modified the milestones: v1.2.3, v1.3.1 Nov 4, 2020
@lucklove lucklove modified the milestones: v1.3.1, v1.3.2 Dec 29, 2020
ti-chi-bot added a commit that referenced this issue Jan 25, 2021
Fix #846

Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
lucklove added a commit that referenced this issue Jan 28, 2021
Fix #846

Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/usability Categorizes issue or PR as a usability enhancement. status/TODO Categorizes issue as we will do it. type/bug Categorizes issue as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants