Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
52765295
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
52765295
编写于
4月 11, 2023
作者:
C
congqixia
提交者:
GitHub
4月 11, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make pkg code change trigger ci workflow (#23312)
Signed-off-by:
N
Congqi Xia
<
congqi.xia@zilliz.com
>
上级
03a4f60b
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
38 addition
and
8 deletion
+38
-8
.github/workflows/code-checker.yaml
.github/workflows/code-checker.yaml
+1
-0
.github/workflows/mac.yaml
.github/workflows/mac.yaml
+1
-0
.github/workflows/main.yaml
.github/workflows/main.yaml
+2
-0
Makefile
Makefile
+1
-0
pkg/metrics/metrics.go
pkg/metrics/metrics.go
+1
-0
pkg/mq/msgdispatcher/manager_test.go
pkg/mq/msgdispatcher/manager_test.go
+2
-2
pkg/mq/msgdispatcher/mock_test.go
pkg/mq/msgdispatcher/mock_test.go
+1
-1
pkg/util/paramtable/base_table.go
pkg/util/paramtable/base_table.go
+1
-1
scripts/run_go_codecov.sh
scripts/run_go_codecov.sh
+10
-1
scripts/run_go_unittest.sh
scripts/run_go_unittest.sh
+18
-3
未找到文件。
.github/workflows/code-checker.yaml
浏览文件 @
52765295
...
...
@@ -11,6 +11,7 @@ on:
paths
:
-
'
scripts/**'
-
'
internal/**'
-
'
pkg/**'
-
'
cmd/**'
-
'
build/**'
-
'
.github/workflows/code-checker.yaml'
...
...
.github/workflows/mac.yaml
浏览文件 @
52765295
...
...
@@ -10,6 +10,7 @@ on:
paths
:
-
'
scripts/**'
-
'
internal/**'
-
'
pkg/**'
-
'
cmd/**'
-
'
build/**'
-
'
.github/workflows/mac.yaml'
...
...
.github/workflows/main.yaml
浏览文件 @
52765295
...
...
@@ -7,6 +7,7 @@ on:
paths
:
-
'
scripts/**'
-
'
internal/**'
-
'
pkg/**'
-
'
cmd/**'
-
'
build/**'
-
'
.github/workflows/main.yaml'
...
...
@@ -21,6 +22,7 @@ on:
paths
:
-
'
scripts/**'
-
'
internal/**'
-
'
pkg/**'
-
'
cmd/**'
-
'
build/**'
-
'
.github/workflows/main.yaml'
...
...
Makefile
浏览文件 @
52765295
...
...
@@ -95,6 +95,7 @@ static-check: getdeps
@
source
$(PWD)
/scripts/setenv.sh
&&
GO111MODULE
=
on
$(INSTALL_PATH)
/golangci-lint run
--timeout
=
30m
--config
./.golangci.yml ./internal/...
@
source
$(PWD)
/scripts/setenv.sh
&&
GO111MODULE
=
on
$(INSTALL_PATH)
/golangci-lint run
--timeout
=
30m
--config
./.golangci.yml ./cmd/...
@
source
$(PWD)
/scripts/setenv.sh
&&
GO111MODULE
=
on
$(INSTALL_PATH)
/golangci-lint run
--timeout
=
30m
--config
./.golangci.yml ./tests/integration/...
@
source
$(PWD)
/scripts/setenv.sh
&&
cd
pkg
&&
GO111MODULE
=
on
$(INSTALL_PATH)
/golangci-lint run
--timeout
=
30m
--config
../.golangci.yml ./...
verifiers
:
build-cpp getdeps cppcheck fmt static-check
...
...
pkg/metrics/metrics.go
浏览文件 @
52765295
...
...
@@ -17,6 +17,7 @@
package
metrics
import
(
// #nosec
_
"net/http/pprof"
"github.com/prometheus/client_golang/prometheus"
...
...
pkg/mq/msgdispatcher/manager_test.go
浏览文件 @
52765295
...
...
@@ -61,7 +61,7 @@ func TestManager(t *testing.T) {
t
.
Run
(
"test merge and split"
,
func
(
t
*
testing
.
T
)
{
prefix
:=
fmt
.
Sprintf
(
"mock%d"
,
time
.
Now
()
.
UnixNano
())
c
:=
NewDispatcherManager
(
prefix
+
"_pchannel_0"
,
typeutil
.
ProxyRole
,
1
,
newMockFactory
())
c
:=
NewDispatcherManager
(
prefix
+
"_pchannel_0"
,
typeutil
.
ProxyRole
,
1
,
newMockFactory
())
assert
.
NotNil
(
t
,
c
)
_
,
err
:=
c
.
Add
(
"mock_vchannel_0"
,
nil
,
mqwrapper
.
SubscriptionPositionUnknown
)
assert
.
NoError
(
t
,
err
)
...
...
@@ -85,7 +85,7 @@ func TestManager(t *testing.T) {
t
.
Run
(
"test run and close"
,
func
(
t
*
testing
.
T
)
{
prefix
:=
fmt
.
Sprintf
(
"mock%d"
,
time
.
Now
()
.
UnixNano
())
c
:=
NewDispatcherManager
(
prefix
+
"_pchannel_0"
,
typeutil
.
ProxyRole
,
1
,
newMockFactory
())
c
:=
NewDispatcherManager
(
prefix
+
"_pchannel_0"
,
typeutil
.
ProxyRole
,
1
,
newMockFactory
())
assert
.
NotNil
(
t
,
c
)
_
,
err
:=
c
.
Add
(
"mock_vchannel_0"
,
nil
,
mqwrapper
.
SubscriptionPositionUnknown
)
assert
.
NoError
(
t
,
err
)
...
...
pkg/mq/msgdispatcher/mock_test.go
浏览文件 @
52765295
...
...
@@ -67,7 +67,7 @@ func getSeekPositions(factory msgstream.Factory, pchannel string, maxNum int) ([
defer
stream
.
Close
()
stream
.
AsConsumer
([]
string
{
pchannel
},
fmt
.
Sprintf
(
"%d"
,
rand
.
Int
()),
mqwrapper
.
SubscriptionPositionEarliest
)
positions
:=
make
([]
*
msgstream
.
MsgPosition
,
0
)
timeoutCtx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
timeoutCtx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
for
{
select
{
...
...
pkg/util/paramtable/base_table.go
浏览文件 @
52765295
...
...
@@ -19,8 +19,8 @@ import (
"sync"
"time"
"go.uber.org/zap"
"github.com/samber/lo"
"go.uber.org/zap"
config
"github.com/milvus-io/milvus/pkg/config"
"github.com/milvus-io/milvus/pkg/log"
...
...
scripts/run_go_codecov.sh
浏览文件 @
52765295
...
...
@@ -26,7 +26,7 @@ BASEDIR=$(dirname "$0")
source
$BASEDIR
/setenv.sh
# run unittest
echo
"Running unittest under ./internal"
echo
"Running unittest under ./internal
& ./pkg
"
# starting the timer
beginTime
=
`
date
+%s
`
...
...
@@ -40,6 +40,15 @@ for d in $(go list ./internal/... | grep -v -e vendor -e kafka -e planparserv2/g
rm
profile.out
fi
done
pushd
pkg
for
d
in
$(
go list ./... |
grep
-v
-e
vendor
-e
kafka
-e
planparserv2/generated
-e
mocks
)
;
do
go
test
-race
${
APPLE_SILICON_FLAG
}
-v
-coverpkg
=
./...
-coverprofile
=
profile.out
-covermode
=
atomic
"
$d
"
if
[
-f
profile.out
]
;
then
grep
-v
kafka profile.out |
grep
-v
planparserv2/generated |
grep
-v
mocks |
sed
'1d'
>>
${
FILE_COVERAGE_INFO
}
rm
profile.out
fi
done
popd
endTime
=
`
date
+%s
`
echo
"Total time for go unittest:"
$((
$endTime
-
$beginTime
))
"s"
...
...
scripts/run_go_unittest.sh
浏览文件 @
52765295
...
...
@@ -30,9 +30,10 @@ if [[ "$(uname -m)" == "arm64" ]]; then
APPLE_SILICON_FLAG
=
"-tags dynamic"
fi
# ignore MinIO,S3 unittes
# ignore MinIO,S3 unittes
ts
MILVUS_DIR
=
"
${
ROOT_DIR
}
/internal/"
echo
"Running go unittest under
$MILVUS_DIR
"
PKG_DIR
=
"
${
ROOT_DIR
}
/pkg/"
echo
"Running go unittest under
$MILVUS_DIR
&
$PKG_DIR
"
TEST_ALL
=
1
TEST_TAG
=
"ALL"
...
...
@@ -70,7 +71,7 @@ go test -race -cover ${APPLE_SILICON_FLAG} "${MILVUS_DIR}/distributed/proxy/..."
function
test_querynode
()
{
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
MILVUS_DIR
}
/querynode/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
MILVUS_DIR
}
/distributed/querynode/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
MILVUS_DIR
}
/distributed/querynode
v2
/..."
-failfast
-count
=
1
}
...
...
@@ -114,6 +115,16 @@ go test -race -cover ${APPLE_SILICON_FLAG} "${MILVUS_DIR}/util/typeutil/..." -fa
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
MILVUS_DIR
}
/util/importutil/..."
-failfast
-count
=
1
}
function
test_pkg
()
{
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
PKG_DIR
}
/common/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
PKG_DIR
}
/config/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
PKG_DIR
}
/log/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
PKG_DIR
}
/mq/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
PKG_DIR
}
/tracer/..."
-failfast
-count
=
1
go
test
-race
-cover
${
APPLE_SILICON_FLAG
}
"
${
PKG_DIR
}
/util/..."
-failfast
-count
=
1
}
function
test_datanode
{
...
...
@@ -172,6 +183,7 @@ test_allocator
test_tso
test_config
test_util
test_pkg
test_metastore
}
...
...
@@ -223,6 +235,9 @@ case "${TEST_TAG}" in
util
)
test_util
;;
pkg
)
test_pkg
;;
metastore
)
test_metastore
;;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录