-
Notifications
You must be signed in to change notification settings - Fork 312
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_mirror: refuse to clone from self #1464
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1464 +/- ##
==========================================
- Coverage 24.85% 15.26% -9.59%
==========================================
Files 267 150 -117
Lines 21265 13075 -8190
==========================================
- Hits 5285 1996 -3289
+ Misses 15173 10570 -4603
+ Partials 807 509 -298
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
When running something like this: ``` tiup mirror clone /tmp/tidb_mirror -a amd64 --prefix v5.1.0 --os linux tiup mirror set /tmp/tidb_mirror tiup mirror clone /tmp/tidb_mirror -a amd64 --prefix v5.1.0 --os linux ``` This results in metadata being changed/corrupted. Then the next `tiup mirror clone ...` results in: ``` Error: read manifest from mirror(/tmp/tidb_mirror) failed: not enough signatures (0) for threshold 1 in timestamp.json ``` This can easily be fixed with `tiup mirror set ...`, but it is best to avoid this. And also cloning from self is probably not what the user wanted in the first place. So adding the source to the output to make this easier to spot. Related: https://tidbcommunity.slack.com/archives/C019S7HLP61/p1625059913130200
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 5ecfe38
|
What problem does this PR solve?
When running something like this:
This results in metadata being changed/corrupted.
Then the next
tiup mirror clone ...
results in:This can easily be fixed with
tiup mirror set ...
, but it is best toavoid this. And also cloning from self is probably not what the user
wanted in the first place. So adding the source to the output to make
this easier to spot.
Related: https://tidbcommunity.slack.com/archives/C019S7HLP61/p1625059913130200
Check List
Tests
Release notes: