mirror: Downloading tiup every time, while already exists
Open
Nobody has claimed this yet.
type/bug
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
Bug Report
- What did you do?
tiup mirror clone /tmp/c --tidb v5.3.0
tiup mirror clone /tmp/c --tidb v5.3.0
- What did you expect to see?
Only downloading files the first time. (except for metadata)
- What did you see instead?
Downloading files like tiup-linux-arm64.tar.gz every time.
- What version of TiUP are you using (
tiup --version)?
1.8.1 tiup
Go Version: go1.17.5
Git Ref: v1.8.1
GitHash: 559b99d0acb7d07acddbb8cda0304b0f27c6ec1e
If a mirror is refreshed every day or every hour this is wasting time, bandwidth, etc.
One of the problems is that there is no version in the filename for tiup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two tiup mirror clone /tmp/c --tidb v5.3.0 commands and trace the mirror clone download path. The fix is complete when the second run skips existing component archives such as tiup-linux-arm64.tar.gz while still downloading metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100