pingcap / pingcap/tiup

How to upgrade spec_version in manifest

Open
#960 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/question
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

General Question

We have define a spec_version field in manifest, and it should grow when the structure of manifest changed.

If tiup detected that the spec_version of a manifest file is not one it knows, it should report and error and ask the user to upgrade tiup.

However, in the current implementation, tiup will fetch remote manifest and check the spec_version again when it upgrade itself, and then report and error if the spec_version mismatch:

unknown manifest version: `%s`, you might need to update TiUp

The code: https://github.com/pingcap/tiup/blob/master/pkg/repository/v1manifest/manifest.go#L204

And in the other way, if we don't fetch remote manifest, how we know what's the newest version of TiUP it is?

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 with doc/design/manifest.md and pkg/repository/v1manifest/manifest.go around line 204. Trace how TiUP validates spec_version and how self-upgrade fetches the remote manifest. Define the upgrade and version-mismatch behavior before making changes; done requires an agreed approach and corresponding validation or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.