pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
418 stars 309 forks source link

`make` fails with "Files go.sum and /tmp/go.sum.before differ" #1310

Closed kolbe closed 2 years ago

kolbe commented 3 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

make 🙂

  1. What did you expect to see?

A successful build!

  1. What did you see instead?
$ git reset --hard
HEAD is now at 3a1296b Fixed a variety of typos (#1306)
$ git clean -fdx
Removing bin/
Removing tools/bin/
$ git clean -fdX
$ git status --ignored
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ mkdir ~/gotmp
$ go version
go version go1.16.3 darwin/amd64

$ GOPATH=~/gotmp make
gofmt (simplify)
./pkg/cluster/template/scripts/tikv.go
goimports (if installed)
cd tools/check; \
        GO111MODULE=on CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ../bin/revive github.com/mgechev/revive
go: downloading github.com/mgechev/revive v1.0.2
go: downloading github.com/fatih/color v1.9.0
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/olekukonko/tablewriter v0.0.4
go: downloading golang.org/x/tools v0.0.0-20200225230052-807dcd883420
go: downloading github.com/fatih/structtag v1.2.0
go: downloading github.com/mattn/go-colorable v0.1.4
go: downloading github.com/mattn/go-isatty v0.0.11
go: downloading github.com/mattn/go-runewidth v0.0.7
linting
./tools/check/check-lint.sh
go mod tidy
./tools/check/check-tidy.sh
warning: ignoring symlink /Users/kolbe/Devel/go/src/github.com/pingcap/tiup/examples
go: downloading github.com/gizak/termui/v3 v3.1.0
go: downloading github.com/shirou/gopsutil v3.21.2+incompatible
go: downloading github.com/spf13/cobra v1.1.3
go: downloading github.com/xo/usql v0.7.8
go: downloading github.com/go-sql-driver/mysql v1.5.0
go: downloading github.com/magiconair/properties v1.8.4
go: downloading github.com/pingcap/go-tpc v1.0.5
go: downloading github.com/pingcap/go-ycsb v0.0.0-20210129115622-04d8656123e4
go: downloading github.com/fatih/color v1.10.0
go: downloading github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3
go: downloading github.com/spf13/pflag v1.0.5
go: downloading golang.org/x/mod v0.4.1
go: downloading github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712
go: downloading github.com/relex/aini v1.2.1
go: downloading github.com/stretchr/testify v1.7.0
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/joomcode/errorx v1.0.3
go: downloading go.uber.org/zap v1.16.0
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading github.com/creasty/defaults v1.5.1
go: downloading github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
go: downloading github.com/blevesearch/bleve v1.0.14
go: downloading github.com/AstroProfundis/tabby v1.1.1-color
go: downloading github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5
go: downloading golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
go: downloading golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
go: downloading go.uber.org/atomic v1.7.0
go: downloading golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/jeremywohl/flatten v1.0.1
go: downloading github.com/pingcap/kvproto v0.0.0-20210308063835-39b884695fb8
go: downloading go.etcd.io/etcd v0.5.0-alpha.5.0.20210226220824-aa7126864d82
go: downloading github.com/golang/protobuf v1.4.3
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.14.3
go: downloading google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f
go: downloading google.golang.org/grpc v1.26.0
go: downloading github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef
go: downloading github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce
go: downloading github.com/AstroProfundis/sysinfo v0.0.0-20210201035811-eb96b87c86b3
go: downloading github.com/pingcap/tidb-insight v0.3.2
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.15.0
go: downloading github.com/prometheus/prom2json v1.3.0
go: downloading github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a
go: downloading github.com/gibson042/canonicaljson-go v1.0.3
go: downloading github.com/cavaliercoder/grab v1.0.1-0.20201108051000-98a5bfe305ec
go: downloading github.com/gofrs/flock v0.8.0
go: downloading github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38
go: downloading github.com/gorilla/mux v1.8.0
go: downloading github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059
go: downloading github.com/otiai10/copy v1.5.0
go: downloading github.com/sergi/go-diff v1.1.0
go: downloading github.com/mattn/go-runewidth v0.0.10
go: downloading github.com/mitchellh/go-wordwrap v1.0.0
go: downloading github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/gohxs/readline v0.0.0-20171011095936-a780388e6e7c
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/xo/dburl v0.0.0-20191219122722-3cca8608d645
go: downloading github.com/xo/terminfo v0.0.0-20190125114736-1a4775eeeb62
go: downloading github.com/zaf/temp v0.0.0-20170209143821-94e385923345
go: downloading github.com/alecthomas/chroma v0.7.1
go: downloading github.com/xo/tblfmt v0.0.0-20191214134155-4c686ae34009
go: downloading github.com/prometheus/client_golang v1.7.1
go: downloading github.com/tikv/client-go v0.0.0-20190421092910-44b82dcc9f4a
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8
go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading go.uber.org/multierr v1.6.0
go: downloading golang.org/x/lint v0.0.0-20200302205851-738671d3881b
go: downloading honnef.co/go/tools v0.0.1-2020.1.5
go: downloading github.com/july2993/yaml v0.0.0-20200423062752-adcfa5abe2ed
go: downloading github.com/dchest/bcrypt_pbkdf v0.0.0-20150205184540-83f37f9c154a
go: downloading github.com/syndtr/goleveldb v1.0.1-0.20190625010220-02440ea7a285
go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974
go: downloading google.golang.org/protobuf v1.23.0
go: downloading github.com/google/go-cmp v0.5.2
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
go: downloading github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
go: downloading github.com/tklauser/go-sysconf v0.3.4
go: downloading github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721
go: downloading github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1
go: downloading github.com/otiai10/mint v1.3.2
go: downloading github.com/rivo/uniseg v0.1.0
go: downloading github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1
go: downloading github.com/dlclark/regexp2 v1.2.0
go: downloading github.com/jedib0t/go-pretty v4.3.0+incompatible
go: downloading github.com/HdrHistogram/hdrhistogram-go v1.0.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/prometheus/procfs v0.1.3
go: downloading github.com/pingcap/pd v2.1.5+incompatible
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989
go: downloading github.com/sirupsen/logrus v1.6.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/onsi/ginkgo v1.13.0
go: downloading github.com/onsi/gomega v1.10.1
go: downloading github.com/RoaringBitmap/roaring v0.4.23
go: downloading github.com/blevesearch/zap/v11 v11.0.14
go: downloading github.com/blevesearch/zap/v12 v12.0.14
go: downloading github.com/blevesearch/zap/v13 v13.0.6
go: downloading github.com/blevesearch/zap/v14 v14.0.5
go: downloading github.com/blevesearch/zap/v15 v15.0.3
go: downloading github.com/couchbase/vellum v1.0.2
go: downloading go.etcd.io/bbolt v1.3.5
go: downloading github.com/steveyen/gtreap v0.1.0
go: downloading github.com/blevesearch/blevex v1.0.0
go: downloading golang.org/x/tools v0.0.0-20210106214847-113979e3529a
go: downloading github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: downloading github.com/coreos/go-semver v0.3.0
go: downloading github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
go: downloading github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
go: downloading github.com/soheilhy/cmux v0.1.4
go: downloading github.com/lunixbochs/vtclean v1.0.0
go: downloading github.com/go-ole/go-ole v1.2.4
go: downloading github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
go: downloading github.com/tklauser/numcpus v0.2.1
go: downloading github.com/chzyer/logex v1.1.10
go: downloading github.com/google/btree v1.0.0
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
go: downloading github.com/opentracing/opentracing-go v1.1.0
go: downloading gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: downloading github.com/coreos/etcd v3.3.13+incompatible
go: downloading github.com/golang/snappy v0.0.1
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.3
go: downloading github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2
go: downloading github.com/mschoch/smat v0.2.0
go: downloading github.com/willf/bitset v1.1.10
go: downloading github.com/tinylib/msgp v1.1.0
go: downloading github.com/blevesearch/mmap-go v1.0.2
go: downloading github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d
go: downloading github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c
go: downloading github.com/blevesearch/segment v0.9.0
go: downloading github.com/blevesearch/snowballstem v0.9.0
go: downloading github.com/jmhodges/levigo v1.0.0
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/text v0.3.3
go: downloading github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
go: downloading github.com/json-iterator/go v1.1.10
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/jonboulle/clockwork v0.1.0
go: downloading github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: downloading golang.org/x/time v0.0.0-20191024005414-555d28b269f0
go: downloading github.com/kr/text v0.2.0
go: downloading github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
go: downloading github.com/go-openapi/strfmt v0.19.11
go: downloading github.com/montanaflynn/stats v0.5.0
go: downloading github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
go: downloading github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d
go: downloading github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31
go: downloading github.com/nxadm/tail v1.4.4
go: downloading github.com/blevesearch/go-porterstemmer v1.0.3
go: downloading github.com/philhofer/fwd v1.0.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7
go: downloading github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef
go: downloading github.com/go-openapi/errors v0.19.8
go: downloading github.com/mitchellh/mapstructure v1.3.3
go: downloading go.mongodb.org/mongo-driver v1.4.3
go: downloading github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
go: downloading github.com/unrolled/render v1.0.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0
go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: downloading github.com/jtolds/gls v4.20.0+incompatible
go: downloading github.com/coreos/bbolt v1.3.2
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99
go: downloading github.com/tidwall/pretty v1.0.2
go: downloading github.com/go-stack/stack v1.8.0
Files go.sum and /tmp/go.sum.before differ
make: *** [tidy] Error 1
  1. What version of TiUP are you using (tiup --version)?
lucklove commented 3 years ago

I meet another one:

make
gofmt (simplify)
goimports (if installed)
linting
./tools/check/check-lint.sh
./docker/control/tiup-cluster/cmd/clean.go:18: "io/ioutil" ./docker/control/tiup-cluster/cmd/uninstall.go:18: "io/ioutil" ./docker/control/tiup-cluster/cmd/status.go:17: "io/ioutil" ./docker/control/tiup-cluster/tools/migrate/main.go:19: "io/ioutil" ./docker/control/tiup-cluster/tools/pkger/main.go:20: "io/ioutil" ./docker/control/tiup-cluster/server/package/package.go:22: "io/ioutil" ./docker/control/tiup-cluster/components/cluster/command/scale_out.go:18: "io/ioutil" ./docker/control/tiup-cluster/components/cluster/command/deploy.go:18: "io/ioutil" ./docker/control/tiup-cluster/components/errdoc/errdoc-gen/main.go:98: "io/ioutil" ./docker/control/tiup-cluster/components/playground/monitor.go:20: "io/ioutil" ./docker/control/tiup-cluster/components/playground/playground.go:21: "io/ioutil" ./docker/control/tiup-cluster/components/playground/grafana.go:19: "io/ioutil" ./docker/control/tiup-cluster/components/playground/grafana_test.go:17: "io/ioutil" ./docker/control/tiup-cluster/components/playground/main.go:20: "io/ioutil" ./docker/control/tiup-cluster/components/dm/spec/topology_dm_test.go:18: "io/ioutil" ./docker/control/tiup-cluster/components/dm/spec/alertmanager.go:19: "io/ioutil" ./docker/control/tiup-cluster/components/dm/spec/grafana_test.go:17: "io/ioutil" ./docker/control/tiup-cluster/components/dm/ansible/import.go:20: "io/ioutil" ./docker/control/tiup-cluster/components/dm/ansible/import_test.go:17: "io/ioutil" ./docker/control/tiup-cluster/components/dm/command/import.go:18: "io/ioutil" ./docker/control/tiup-cluster/components/client/main.go:21: "io/ioutil" ./docker/control/tiup-cluster/pkg/cliutil/ssh.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/crypto/ca.go:21: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/embed/embed_test.go:4: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/install/local_install.sh.go:16:import "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/grafana.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/alertmanager.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/blackbox.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/prometheus.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/dm/prometheus.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/dashboard.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/datasource.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/config/tispark.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/systemd/system.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/systemd/tispark.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/drainer.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/tidb.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/pump.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/cdc.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/dm_worker.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/grafana.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/blackbox_exporter.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/tikv.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/alertmanager.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/prometheus.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/dm_master.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/tispark.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/node_exporter.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/tiflash.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/template/scripts/pd.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/drainer.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/tidb.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/pump.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/parse_topology_test.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/spec_manager.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/instance.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/tikv.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/spec_manager_test.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/grafana_test.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/parse_topology.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/tispark.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/tiflash.go:21: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/spec/pd.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/ansible/import_test.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/ansible/inventory.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/audit/audit.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/task/ssh_keygen.go:22: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/task/env_init.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/api/binlog.go:21: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/executor/local_test.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/cluster/manager.go:24: "io/ioutil" ./docker/control/tiup-cluster/pkg/repository/file_source.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/repository/mirror.go:22: "io/ioutil" ./docker/control/tiup-cluster/pkg/repository/v1manifest/repo.go:24: "io/ioutil" ./docker/control/tiup-cluster/pkg/repository/v1manifest/local_manifests.go:20: "io/ioutil" ./docker/control/tiup-cluster/pkg/repository/store/sync.go:18: "io/ioutil" ./docker/control/tiup-cluster/pkg/repository/store/txn.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/logger/debug.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/localdata/profile.go:22: "io/ioutil" ./docker/control/tiup-cluster/pkg/file/file_test.go:5: "io/ioutil" ./docker/control/tiup-cluster/pkg/file/file.go:4: "io/ioutil" ./docker/control/tiup-cluster/pkg/utils/http_client.go:20: "io/ioutil" ./docker/control/tiup-cluster/pkg/telemetry/telemetry_test.go:19: "io/ioutil" ./docker/control/tiup-cluster/pkg/telemetry/meta_test.go:4: "io/ioutil" ./docker/control/tiup-cluster/pkg/telemetry/scrub_test.go:17: "io/ioutil" ./docker/control/tiup-cluster/pkg/telemetry/meta.go:17: "io/ioutil"
use of "io/ioutil" is deprecated in Go 1.16, please update to use "io" and "os"
make: *** [lint] Error 1
AstroProfundis commented 3 years ago

Could you try in the root path of cloned tiup repo: rm -rf *, and then git checkout ., and try make again?

It might due to dirty files in paths excluded by .gitignore, so that you can't see them with git status. I think some test files might go into those dirs.

kolbe commented 3 years ago

I got this error after completely re-cloning from scratch. Also get it again after following your suggested steps.

On Apr 14, 2021, at 8:37 PM, Allen Zhong @.***> wrote:

Could you try in the root path of cloned tiup repo: rm -rf *, and then git checkout ., and try make again?

It might due to dirty files in paths excluded by .gitignore, so that you can't see them with git status. I think some test files might go into those dirs.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pingcap/tiup/issues/1310#issuecomment-820033009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJKEWTLVX4GLUAY2O3JPUTTIZNQTANCNFSM426SCUDA.

AstroProfundis commented 3 years ago

Wierd. Then could you show us the git diff after it complaints about go.sum difference? And retry make could bypass this check, or using make build directly without linting stuff could also do the trick.

kolbe commented 3 years ago

Yes, make build worked fine.

Here's the status after the failure:

Files go.sum and /tmp/go.sum.before differ
make: *** [tidy] Error 1
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   components/dm/ansible/import.go
        modified:   components/dm/command/import.go
        modified:   components/dm/spec/topology_dm_test.go
        modified:   components/errdoc/spec/spec.go
        modified:   go.mod
        modified:   go.sum
        modified:   pkg/cliutil/progress/multi_bar.go
        modified:   pkg/cliutil/progress/single_bar.go
        modified:   pkg/cluster/ansible/import_test.go
        modified:   pkg/cluster/ansible/inventory.go
        modified:   pkg/cluster/api/typeutil/size.go
        modified:   pkg/cluster/executor/ssh.go
        modified:   pkg/cluster/manager/edit_config.go
        modified:   pkg/cluster/manager/manager_test.go
        modified:   pkg/cluster/spec/parse_topology.go
        modified:   pkg/cluster/spec/server_config.go
        modified:   pkg/cluster/spec/server_config_test.go
        modified:   pkg/cluster/spec/spec_manager.go
        modified:   pkg/cluster/spec/spec_test.go
        modified:   pkg/cluster/spec/tiflash.go
        modified:   pkg/cluster/spec/validate_test.go
        modified:   pkg/crypto/rsa.go
        modified:   pkg/repository/progress.go
        modified:   pkg/telemetry/meta.go
        modified:   pkg/telemetry/scrub.go
        modified:   pkg/utils/diff.go
        modified:   pkg/utils/diff_test.go

no changes added to commit (use "git add" and/or "git commit -a")

[git.diff.txt](https://github.com/pingcap/tiup/files/6315221/git.diff.txt)