pingcap / pingcap/tiup

Enhancement: TIUP_MIRRORS should be temporary runtime effected

Open
#651 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status/discuss type/feature-request
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

Feature Request

Is your feature request related to a problem? Please describe:

We can set mirror via the tiup mirror set and environment variable TIUP_MIRRORS. But the environment variable TIUP_MIRRORS also will be a permanent impact on tiup. This is not a typical way to use environment variables. When I use an environment variable, I'd assume that this is a temporary runtime setup.

We must use tiup mirror set to restore the location after we use TIUP_MIRRORS. And if I forgot to restore the mirror location, I cannot update the manifest following the official mirror anymore. This could be a little bit tricky for users. And it might cost us some OnCall work as well.

Describe the feature you'd like:

I'd like to use the TIUP_MIRRORS with runtime effected. While TIUP_MIRRORS is empty, tiup should use the default location. For different mirror locations, it should be isolated from each other. With this feature, tiup will be much easier to use and test. And there will be no such confusion like above any more.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

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 tracing how tiup reads TIUP_MIRRORS and how the tiup mirror set command persists its location. Check existing tests around mirror selection and configuration, then verify that an empty environment variable uses the default mirror and that different runtime mirror values remain isolated without changing persistent state.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.