pingcap / pingcap/tiup

Should not treat version as float to compare

Open
#2,654 0 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

https://github.com/pingcap/tiup/blob/e525ada49ad0223167b9fd7e5902f568e5eca3c4/pkg/cluster/operation/check.go#L167-L250

This function treats OS versions as float. However, version 8.10 is larger than version 8.4, while float 8.10 is not.

  1. What version of TiUP are you using (tiup --version)?

latest

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

Review pkg/cluster/operation/check.go, especially lines 167-250, to understand how OS versions are currently compared. Verify the comparison with versions such as 8.10 and 8.4; done means version ordering no longer treats those values as floats.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.