pingcap / pingcap/tiup

mirror: Downloading tiup every time, while already exists

Open
#1,704 2 comments 0 reactions 0 assignees View on GitHub

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

  1. What did you do?
tiup mirror clone /tmp/c --tidb v5.3.0
tiup mirror clone /tmp/c --tidb v5.3.0
  1. What did you expect to see?

Only downloading files the first time. (except for metadata)

  1. What did you see instead?

Downloading files like tiup-linux-arm64.tar.gz every time.

  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.