pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.23k stars 498 forks source link

CI: Drop retool and gometalinter #1152

Closed aylei closed 4 years ago

aylei commented 4 years ago

twitchtv/retool is out of maintenance and alecthomas/gometalinter has been deprecated.

Now that we have upgraded to go v1.13 in which go module is enabled by default, it is better to drop retool and manage these tools ~in go module~ in scripts instead.

The deprecated tool gometalinter should be dropped too.

yeya24 commented 4 years ago

Can I take this? What about using https://github.com/golangci/golangci-lint?

gregwebs commented 4 years ago

Yes, we should use golangci-lint. @yeya24 I opened a PR with what I think is a good setup for this: https://github.com/pingcap/tidb-operator/pull/1260

But it needs more work to be finalized: you are welcome to work on top of that.

cofyc commented 4 years ago

It's not a good idea to manage external tools via go.mod. This is because each tool is a project which has its own dependencies which may conflict with each other. The most reliable and reproducible way is to download binary releases or run released docker images if they have. If tools do not have binaries or docker images released, we can compile them as a standalone project in an isolated environment.

cofyc commented 4 years ago

I guess most tools like golangci-lint have binary or docker image releases. We can download and run them directly (check sums for safety if necessary).

Some simple binary utilities which are expected to compile with the latest pkgs (e.g. golang.org/x tools). I think it's fine to vendor (in the root or a dedicated sub go module).

aylei commented 4 years ago

Yes, the method you propose would be better

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

cofyc commented 4 years ago

@yeya24 do you have time to look at this?