From dc550d4be0b6ddf93252f8e8db2cda14dc2dfced Mon Sep 17 00:00:00 2001 From: congqixia Date: Fri, 6 Sep 2024 17:40:57 +0800 Subject: [PATCH] fix: Upgrade golangci-lint workflow go version to v1.21 (#309) Use cockroachdb error lib, trying to fix lint issue --------- Signed-off-by: Congqi Xia --- .github/workflows/golangci-lint.yml | 2 +- states/etcd/repair/channel_watched.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 3c20d8f7..2c1fac3a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.21 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/states/etcd/repair/channel_watched.go b/states/etcd/repair/channel_watched.go index ffc2fa04..5e02d3c0 100644 --- a/states/etcd/repair/channel_watched.go +++ b/states/etcd/repair/channel_watched.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/pkg/errors" + "github.com/cockroachdb/errors" "github.com/milvus-io/birdwatcher/framework" "github.com/milvus-io/birdwatcher/models" @@ -27,7 +27,7 @@ func (c *ComponentRepair) RepairChannelWatchedCommand(ctx context.Context, p *Ch (p.ChannelName == "" || channel.Vchan.ChannelName == p.ChannelName) }) if err != nil { - return errors.Wrap(err, "failed to list channel watch info") + return errors.Errorf("failed to list channel watch info, %w", err) } var targets []*models.ChannelWatch