Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update clang-tidy and clang-format from 10 to 12 #33141

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

jiangyinzuo
Copy link
Contributor

@jiangyinzuo jiangyinzuo commented May 18, 2024

Default llvm toolchain version in Ubuntu 20.04 is 10, while Ubuntu 22.04 does not have clang-tidy-10 or clang-format-10 by default.

issue: #33142

@sre-ci-robot sre-ci-robot requested review from XuanYang-cn and yhmo May 18, 2024 12:21
@sre-ci-robot sre-ci-robot added the size/XS Denotes a PR that changes 0-9 lines. label May 18, 2024
@mergify mergify bot added the needs-dco DCO is missing in this pull request. label May 18, 2024
Copy link
Contributor

mergify bot commented May 18, 2024

@jiangyinzuo Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.

@mergify mergify bot added kind/bug Issues or changes related a bug do-not-merge/missing-related-issue labels May 18, 2024
Copy link
Contributor

mergify bot commented May 18, 2024

@jiangyinzuo Please associate the related issue to the body of your Pull Request. (eg. “issue: #”)

@mergify mergify bot added dco-passed DCO check passed. and removed needs-dco DCO is missing in this pull request. labels May 18, 2024
@sre-ci-robot sre-ci-robot added size/S Denotes a PR that changes 10-29 lines. and removed size/XS Denotes a PR that changes 0-9 lines. labels May 18, 2024
@@ -6,8 +6,15 @@ else
fi
CorePath=$1

# Check if clang-format-10 exists
if command -v clang-format-10 >/dev/null 2>&1; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether we can replace all the clang-format-10 with clang-format in the codebase. So I write a simple check here.

@mergify mergify bot added the ci-passed label May 18, 2024
Copy link

codecov bot commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.93%. Comparing base (8858fcb) to head (63089a7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #33141      +/-   ##
==========================================
- Coverage   81.94%   81.93%   -0.01%     
==========================================
  Files        1015     1015              
  Lines      130213   130213              
==========================================
- Hits       106701   106694       -7     
- Misses      19529    19535       +6     
- Partials     3983     3984       +1     

see 31 files with indirect coverage changes

@PwzXxm
Copy link
Contributor

PwzXxm commented May 20, 2024

Thanks for your contribution. Not specifying clang format version may lead to unpredictable results. Could you also modify the files as shown in #33173, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have edited not only files in #33173 but also gpu/ubuntu22.04/Dockerfile. @PwzXxm

@mergify mergify bot added the ci-passed label May 20, 2024
@jiangyinzuo
Copy link
Contributor Author

jiangyinzuo commented May 20, 2024

The integration test finds a DATA RACE, which appears to be unrelated to this PR.

2024-05-20T14:37:24.9449015Z DONE 2 tests in 31.155s
2024-05-20T14:37:24.9753093Z Start to run integration test under "github.com/milvus-io/milvus/tests/integration/watchcompatibility" pkg
2024-05-20T14:39:47.3601864Z ✖  tests/integration/watchcompatibility (2m13.108s) (coverage: 52.0% of statements in ./...)
2024-05-20T14:39:47.4362009Z
2024-05-20T14:39:47.4362432Z === Failed
2024-05-20T14:39:47.4363417Z === FAIL: tests/integration/watchcompatibility TestDataNodeCompatibility/TestCompatibility (131.96s)
2024-05-20T14:39:47.4364525Z     suite.go:88: Setup test...
2024-05-20T14:39:47.4365072Z     suite.go:97: Setup case timeout 15m0s
2024-05-20T14:39:48.1648989Z ==================
2024-05-20T14:39:48.1649082Z WARNING: DATA RACE
2024-05-20T14:39:48.1649201Z Read at 0x00c0049fe960 by goroutine 15612:
2024-05-20T14:39:48.1649507Z   github.com/milvus-io/milvus/internal/datacoord.(*Server).GetServerID()
2024-05-20T14:39:48.1649837Z       /go/src/github.com/milvus-io/milvus/internal/datacoord/server.go:469 +0x86
2024-05-20T14:39:48.1650234Z   github.com/milvus-io/milvus/internal/distributed/datacoord.(*Server).startGrpcLoop.func1()
2024-05-20T14:39:48.1650713Z       /go/src/github.com/milvus-io/milvus/internal/distributed/datacoord/service.go:183 +0xa4
2024-05-20T14:39:48.1651311Z   github.com/milvus-io/milvus/pkg/util/interceptor.ServerIDValidationUnaryServerInterceptor.func1()
2024-05-20T14:39:48.1651729Z       /go/src/github.com/milvus-io/milvus/pkg/util/interceptor/server_id_interceptor.go:50 +0x14e
2024-05-20T14:39:48.1652059Z   github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1()
2024-05-20T14:39:48.1652410Z       /go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x8e
2024-05-20T14:39:48.1652883Z   github.com/milvus-io/milvus/pkg/util/interceptor.ClusterValidationUnaryServerInterceptor.func1()
2024-05-20T14:39:48.1653273Z       /go/src/github.com/milvus-io/milvus/pkg/util/interceptor/cluster_interceptor.go:48 +0x255
2024-05-20T14:39:48.1653607Z   github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1()
2024-05-20T14:39:48.1653952Z       /go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x8e
2024-05-20T14:39:48.1654288Z   github.com/milvus-io/milvus/pkg/util/logutil.UnaryTraceLoggerInterceptor()
2024-05-20T14:39:48.1654636Z       /go/src/github.com/milvus-io/milvus/pkg/util/logutil/grpc_interceptor.go:23 +0xa2
2024-05-20T14:39:48.1654955Z   github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1()
2024-05-20T14:39:48.1655302Z       /go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x8e
2024-05-20T14:39:48.1655720Z   go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1()
2024-05-20T14:39:48.1656200Z       /go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/[email protected]/interceptor.go:342 +0x6fa
2024-05-20T14:39:48.1656519Z   github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1()
2024-05-20T14:39:48.1656864Z       /go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x8e
2024-05-20T14:39:48.1657166Z   github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1()
2024-05-20T14:39:48.1657516Z       /go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:34 +0x126
2024-05-20T14:39:48.1657912Z   github.com/milvus-io/milvus/internal/proto/datapb._DataCoord_ReportDataNodeTtMsgs_Handler()
2024-05-20T14:39:48.1658354Z       /go/src/github.com/milvus-io/milvus/internal/proto/datapb/data_coord.pb.go:8076 +0x26c
2024-05-20T14:39:48.1658526Z   google.golang.org/grpc.(*Server).processUnaryRPC()
2024-05-20T14:39:48.1658738Z       /go/pkg/mod/google.golang.org/[email protected]/server.go:1358 +0x185e
2024-05-20T14:39:48.1658890Z   google.golang.org/grpc.(*Server).handleStream()
2024-05-20T14:39:48.1659099Z       /go/pkg/mod/google.golang.org/[email protected]/server.go:1735 +0xff8
2024-05-20T14:39:48.1659285Z   google.golang.org/grpc.(*Server).serveStreams.func1.1()
2024-05-20T14:39:48.1659487Z       /go/pkg/mod/google.golang.org/[email protected]/server.go:970 +0x151
2024-05-20T14:39:48.1659500Z 
2024-05-20T14:39:48.1659650Z Previous write at 0x00c0049fe960 by goroutine 163:
2024-05-20T14:39:48.1659945Z   github.com/milvus-io/milvus/internal/datacoord.(*Server).initSession()
2024-05-20T14:39:48.1660258Z       /go/src/github.com/milvus-io/milvus/internal/datacoord/server.go:302 +0x2aa
2024-05-20T14:39:48.1660515Z   github.com/milvus-io/milvus/internal/datacoord.(*Server).Init()
2024-05-20T14:39:48.1660826Z       /go/src/github.com/milvus-io/milvus/internal/datacoord/server.go:315 +0xc4
2024-05-20T14:39:48.1661148Z   github.com/milvus-io/milvus/internal/distributed/datacoord.(*Server).init()
2024-05-20T14:39:48.1661539Z       /go/src/github.com/milvus-io/milvus/internal/distributed/datacoord/service.go:129 +0xd53
2024-05-20T14:39:48.1661852Z   github.com/milvus-io/milvus/internal/distributed/datacoord.(*Server).Run()
2024-05-20T14:39:48.1662239Z       /go/src/github.com/milvus-io/milvus/internal/distributed/datacoord/service.go:256 +0x75
2024-05-20T14:39:48.1662749Z   github.com/milvus-io/milvus/tests/integration/watchcompatibility.(*DataNodeCompatibility).restartDC()
2024-05-20T14:39:48.1663196Z       /go/src/github.com/milvus-io/milvus/tests/integration/watchcompatibility/watch_test.go:320 +0x15e
2024-05-20T14:39:48.1663696Z   github.com/milvus-io/milvus/tests/integration/watchcompatibility.(*DataNodeCompatibility).TestCompatibility()
2024-05-20T14:39:48.1664136Z       /go/src/github.com/milvus-io/milvus/tests/integration/watchcompatibility/watch_test.go:353 +0x7c8
2024-05-20T14:39:48.1664225Z   runtime.call16()
2024-05-20T14:39:48.1664375Z       /usr/local/go/src/runtime/asm_amd64.s:728 +0x48
2024-05-20T14:39:48.1664468Z   reflect.Value.Call()
2024-05-20T14:39:48.1664594Z       /usr/local/go/src/reflect/value.go:370 +0xc7
2024-05-20T14:39:48.1664737Z   github.com/stretchr/testify/suite.Run.func1()
2024-05-20T14:39:48.1664976Z       /go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:197 +0x70d
2024-05-20T14:39:48.1665067Z   testing.tRunner()
2024-05-20T14:39:48.1665214Z       /usr/local/go/src/testing/testing.go:1576 +0x216
2024-05-20T14:39:48.1665307Z   testing.(*T).Run.func1()
2024-05-20T14:39:48.1665453Z       /usr/local/go/src/testing/testing.go:1629 +0x47
2024-05-20T14:39:48.1665459Z 
2024-05-20T14:39:48.1665565Z Goroutine 15612 (running) created at:
2024-05-20T14:39:48.1665734Z   google.golang.org/grpc.(*Server).serveStreams.func1()
2024-05-20T14:39:48.1665973Z       /go/pkg/mod/google.golang.org/[email protected]/server.go:981 +0x254
2024-05-20T14:39:48.1666238Z   google.golang.org/grpc/internal/transport.(*http2Server).operateHeaders()
2024-05-20T14:39:48.1666552Z       /go/pkg/mod/google.golang.org/[email protected]/internal/transport/http2_server.go:626 +0x4ea9
2024-05-20T14:39:48.1666797Z   google.golang.org/grpc/internal/transport.(*http2Server).HandleStreams()
2024-05-20T14:39:48.1667111Z       /go/pkg/mod/google.golang.org/[email protected]/internal/transport/http2_server.go:668 +0x264
2024-05-20T14:39:48.1667252Z   google.golang.org/grpc.(*Server).serveStreams()
2024-05-20T14:39:48.1667463Z       /go/pkg/mod/google.golang.org/[email protected]/server.go:963 +0x371
2024-05-20T14:39:48.1667633Z   google.golang.org/grpc.(*Server).handleRawConn.func1()
2024-05-20T14:39:48.1667839Z       /go/pkg/mod/google.golang.org/[email protected]/server.go:905 +0x64
2024-05-20T14:39:48.1667844Z 
2024-05-20T14:39:48.1667946Z Goroutine 163 (running) created at:
2024-05-20T14:39:48.1668088Z   testing.(*T).Run()
2024-05-20T14:39:48.1668240Z       /usr/local/go/src/testing/testing.go:1629 +0x805
2024-05-20T14:39:48.1668376Z   github.com/stretchr/testify/suite.runTests()
2024-05-20T14:39:48.1668617Z       /go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:242 +0x19c
2024-05-20T14:39:48.1668731Z   github.com/stretchr/testify/suite.Run()
2024-05-20T14:39:48.1668978Z       /go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:215 +0x9b2
2024-05-20T14:39:48.1669449Z   github.com/milvus-io/milvus/tests/integration/watchcompatibility.TestDataNodeCompatibility()
2024-05-20T14:39:48.1669991Z       /go/src/github.com/milvus-io/milvus/tests/integration/watchcompatibility/watch_test.go:364 +0x44
2024-05-20T14:39:48.1670090Z   testing.tRunner()
2024-05-20T14:39:48.1670232Z       /usr/local/go/src/testing/testing.go:1576 +0x216
2024-05-20T14:39:48.1670331Z   testing.(*T).Run.func1()
2024-05-20T14:39:48.1670470Z       /usr/local/go/src/testing/testing.go:1629 +0x47
2024-05-20T14:39:48.1670556Z ==================
2024-05-20T14:39:48.4536871Z     testing.go:1446: race detected during execution of test
2024-05-20T14:39:48.4537358Z     --- FAIL: TestDataNodeCompatibility/TestCompatibility (131.96s)
2024-05-20T14:39:48.4537375Z
2024-05-20T14:39:48.4537889Z === FAIL: tests/integration/watchcompatibility TestDataNodeCompatibility (132.15s)
2024-05-20T14:39:48.4538783Z {"level":"warn","ts":"2024-05-20T14:37:34.652Z","caller":"auth/store.go:1233","msg":"simple token is not cryptographically signed"}
2024-05-20T14:39:48.4539093Z     testing.go:1446: race detected during execution of test
2024-05-20T14:39:48.4539105Z
2024-05-20T14:39:48.4539296Z DONE 2 tests, 2 failures in 142.472s
2024-05-20T14:39:48.9697519Z ##[error]Process completed with exit code 2.
2024-05-20T14:39:48.9818634Z Post job cleanup.
2024-05-20T14:39:48.9963202Z Cleaning up orphan processes

@PwzXxm
Copy link
Contributor

PwzXxm commented May 21, 2024

@czs007 Can you help rerun this?

@mergify mergify bot added needs-dco DCO is missing in this pull request. and removed dco-passed DCO check passed. labels Jun 4, 2024
Copy link
Contributor

mergify bot commented Jun 4, 2024

@jiangyinzuo Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.

@mergify mergify bot removed the ci-passed label Jun 4, 2024
@jiangyinzuo jiangyinzuo changed the title fix: remove -10 suffix for clang-tidy and clang-format in install_deps.sh fix: update clang-tidy and clang-format from 10 to 12 Jun 4, 2024
@jiangyinzuo jiangyinzuo force-pushed the patch-1 branch 2 times, most recently from 6ff36df to 63089a7 Compare June 4, 2024 16:24
Default llvm toolchain version in Ubuntu 20.04 is 10, while Ubuntu 22.04
does not have `clang-tidy-10` or `clang-format-10` by default.

Upgrade clang-format and clang-tidy from 10 to 12,
so that both Ubuntu 20.04 and 22.04 are able to run. See milvus-io#33173

issue: milvus-io#33142

Co-authored-by: Patrick Weizhi Xu <[email protected]>

Signed-off-by: Patrick Weizhi Xu <[email protected]>
Signed-off-by: Yinzuo Jiang <[email protected]>
@mergify mergify bot added the ci-passed label Jun 4, 2024
@jiangyinzuo
Copy link
Contributor Author

@PwzXxm @XuanYang-cn @yhmo CI has passed, can we proceed now?

@czs007
Copy link
Collaborator

czs007 commented Jun 13, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, jiangyinzuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot merged commit 7d74edd into milvus-io:master Jun 13, 2024
18 checks passed
@czs007 czs007 added the PR | need cherry-pick need cherry pick to other branches label Jun 26, 2024
yellow-shine pushed a commit to yellow-shine/milvus that referenced this pull request Jul 2, 2024
Default llvm toolchain version in Ubuntu 20.04 is 10, while Ubuntu 22.04
does not have `clang-tidy-10` or `clang-format-10` by default.

issue: milvus-io#33142

Signed-off-by: Patrick Weizhi Xu <[email protected]>
Signed-off-by: Yinzuo Jiang <[email protected]>
@czs007 czs007 removed the PR | need cherry-pick need cherry pick to other branches label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed kind/bug Issues or changes related a bug lgtm needs-dco DCO is missing in this pull request. size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants