How to upgrade spec_version in manifest
Nobody has claimed this yet.
- 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
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 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