mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
Replace sdk source and merge tests and tests20 (#7182)
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>
This commit is contained in:
parent
7233b62dad
commit
eff75c7701
20
.github/mergify.yml
vendored
20
.github/mergify.yml
vendored
@ -14,22 +14,22 @@ pull_request_rules:
|
||||
- name: Test passed for tests changed
|
||||
conditions:
|
||||
- base=master
|
||||
- -files~=^(?!tests\/python_test).+
|
||||
- -files~=^(?!tests\/python_client).+
|
||||
- "status-success=continuous-integration/jenkins/pr-merge"
|
||||
actions:
|
||||
label:
|
||||
add:
|
||||
- ci-passed
|
||||
|
||||
- name: Test passed for tests20 changed
|
||||
conditions:
|
||||
- base=master
|
||||
- -files~=^(?!tests20\/python_client).+
|
||||
- "status-success=continuous-integration/jenkins/pr-merge"
|
||||
actions:
|
||||
label:
|
||||
add:
|
||||
- ci-passed
|
||||
# - name: Test passed for tests20 changed
|
||||
# conditions:
|
||||
# - base=master
|
||||
# - -files~=^(?!tests20\/python_client).+
|
||||
# - "status-success=continuous-integration/jenkins/pr-merge"
|
||||
# actions:
|
||||
# label:
|
||||
# add:
|
||||
# - ci-passed
|
||||
|
||||
- name: Test passed for document changed
|
||||
conditions:
|
||||
|
4
.github/workflows/publish-test-images.yaml
vendored
4
.github/workflows/publish-test-images.yaml
vendored
@ -7,14 +7,14 @@ on:
|
||||
# file paths to consider in the event. Optional; defaults to all.
|
||||
paths:
|
||||
- 'tests/docker/Dockerfile'
|
||||
- 'tests/python_test/requirements.txt'
|
||||
- 'tests/python_client/requirements.txt'
|
||||
- '.github/workflows/publish-test-images.yaml'
|
||||
- '!**.md'
|
||||
pull_request:
|
||||
# file paths to consider in the event. Optional; defaults to all.
|
||||
paths:
|
||||
- 'tests/docker/Dockerfile'
|
||||
- 'tests/python_test/requirements.txt'
|
||||
- 'tests/python_client/requirements.txt'
|
||||
- '.github/workflows/publish-test-images.yaml'
|
||||
- '!**.md'
|
||||
|
||||
|
@ -165,7 +165,7 @@ cd ../../../
|
||||
To run E2E tests, use these command:
|
||||
|
||||
```shell
|
||||
cd tests20/python_client
|
||||
cd tests/python_client
|
||||
pip install -r requirements.txt
|
||||
pytest --tags=L0 -n auto
|
||||
```
|
||||
|
29
build/ci/jenkins/Jenkinsfile
vendored
29
build/ci/jenkins/Jenkinsfile
vendored
@ -22,7 +22,8 @@ pipeline {
|
||||
}
|
||||
axis {
|
||||
name 'MILVUS_CLIENT'
|
||||
values 'pymilvus', 'pymilvus-orm'
|
||||
values 'pymilvus'
|
||||
// 'pymilvus-orm'
|
||||
}
|
||||
}
|
||||
agent {
|
||||
@ -69,21 +70,21 @@ pipeline {
|
||||
--install-extra-arg "--set etcd.enabled=false --set externalEtcd.enabled=true --set externalEtcd.endpoints={\$KRTE_POD_IP:2379}" \
|
||||
--skip-export-logs \
|
||||
--skip-cleanup \
|
||||
--test-extra-arg "--tags=smoke" \
|
||||
--test-timeout ${e2e_timeout_seconds}
|
||||
"""
|
||||
} else if ("${MILVUS_CLIENT}" == "pymilvus-orm") {
|
||||
sh """
|
||||
MILVUS_CLUSTER_ENABLED=${clusterEnabled} \
|
||||
./e2e-k8s.sh \
|
||||
--node-image registry.zilliz.com/kindest/node:v1.20.2 \
|
||||
--skip-export-logs \
|
||||
--skip-cleanup \
|
||||
--kind-config "${env.WORKSPACE}/build/config/topology/trustworthy-jwt-ci.yaml" \
|
||||
--install-extra-arg "--set etcd.enabled=false --set externalEtcd.enabled=true --set externalEtcd.endpoints={\$KRTE_POD_IP:2379}" \
|
||||
--test-extra-arg "--tags L0 L1" \
|
||||
--test-extra-arg "-x --tags smoke L0 L1" \
|
||||
--test-timeout ${e2e_timeout_seconds}
|
||||
"""
|
||||
// } else if ("${MILVUS_CLIENT}" == "pymilvus-orm") {
|
||||
// sh """
|
||||
// MILVUS_CLUSTER_ENABLED=${clusterEnabled} \
|
||||
// ./e2e-k8s.sh \
|
||||
// --node-image registry.zilliz.com/kindest/node:v1.20.2 \
|
||||
// --skip-export-logs \
|
||||
// --skip-cleanup \
|
||||
// --kind-config "${env.WORKSPACE}/build/config/topology/trustworthy-jwt-ci.yaml" \
|
||||
// --install-extra-arg "--set etcd.enabled=false --set externalEtcd.enabled=true --set externalEtcd.endpoints={\$KRTE_POD_IP:2379}" \
|
||||
// --test-extra-arg "--tags L0 L1" \
|
||||
// --test-timeout ${e2e_timeout_seconds}
|
||||
// """
|
||||
} else {
|
||||
error "Error: Unsupported Milvus client: ${MILVUS_CLIENT}"
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
String cron_timezone = "TZ=Asia/Shanghai"
|
||||
String cron_string = BRANCH_NAME == "master" ? "50 22 * * * " : ""
|
||||
|
||||
int total_timeout_minutes = 120
|
||||
int e2e_timeout_seconds = 60 * 60
|
||||
int total_timeout_minutes = 240
|
||||
int e2e_timeout_seconds = 3 * 60 * 60
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
@ -30,7 +30,8 @@ pipeline {
|
||||
}
|
||||
axis {
|
||||
name 'MILVUS_CLIENT'
|
||||
values 'pymilvus', 'pymilvus-orm'
|
||||
values 'pymilvus'
|
||||
// 'pymilvus-orm'
|
||||
}
|
||||
}
|
||||
agent {
|
||||
@ -77,20 +78,21 @@ pipeline {
|
||||
--install-extra-arg "--set etcd.enabled=false --set externalEtcd.enabled=true --set externalEtcd.endpoints={\$KRTE_POD_IP:2379}" \
|
||||
--skip-export-logs \
|
||||
--skip-cleanup \
|
||||
--test-extra-arg "--tags smoke L0 L1 L2"
|
||||
--test-timeout ${e2e_timeout_seconds}
|
||||
"""
|
||||
} else if ("${MILVUS_CLIENT}" == "pymilvus-orm") {
|
||||
sh """
|
||||
MILVUS_CLUSTER_ENABLED=${clusterEnabled} \
|
||||
./e2e-k8s.sh \
|
||||
--kind-config "${env.WORKSPACE}/build/config/topology/trustworthy-jwt-ci.yaml" \
|
||||
--node-image registry.zilliz.com/kindest/node:v1.20.2 \
|
||||
--install-extra-arg "--set etcd.enabled=false --set externalEtcd.enabled=true --set externalEtcd.endpoints={\$KRTE_POD_IP:2379}" \
|
||||
--skip-export-logs \
|
||||
--skip-cleanup \
|
||||
--test-extra-arg "--tags L0 L1 L2" \
|
||||
--test-timeout ${e2e_timeout_seconds}
|
||||
"""
|
||||
// } else if ("${MILVUS_CLIENT}" == "pymilvus-orm") {
|
||||
// sh """
|
||||
// MILVUS_CLUSTER_ENABLED=${clusterEnabled} \
|
||||
// ./e2e-k8s.sh \
|
||||
// --kind-config "${env.WORKSPACE}/build/config/topology/trustworthy-jwt-ci.yaml" \
|
||||
// --node-image registry.zilliz.com/kindest/node:v1.20.2 \
|
||||
// --install-extra-arg "--set etcd.enabled=false --set externalEtcd.enabled=true --set externalEtcd.endpoints={\$KRTE_POD_IP:2379}" \
|
||||
// --skip-export-logs \
|
||||
// --skip-cleanup \
|
||||
// --test-extra-arg "--tags L0 L1 L2" \
|
||||
// --test-timeout ${e2e_timeout_seconds}
|
||||
// """
|
||||
} else {
|
||||
error "Error: Unsupported Milvus client: ${MILVUS_CLIENT}"
|
||||
}
|
||||
|
91
tests-deprecating/README.md
Normal file
91
tests-deprecating/README.md
Normal file
@ -0,0 +1,91 @@
|
||||
## Tests
|
||||
|
||||
### E2E Test
|
||||
|
||||
#### 配置清单
|
||||
|
||||
##### 操作系统
|
||||
|
||||
| 操作系统 | 版本 |
|
||||
| ------ | --------- |
|
||||
| CentOS | 7.5 或以上 |
|
||||
| Ubuntu | 16.04 或以上 |
|
||||
| Mac | 10.14 或以上 |
|
||||
|
||||
##### 硬件
|
||||
|
||||
| 硬件名称 | 建议配置 |
|
||||
| ---- | --------------------------------------------------------------------------------------------------- |
|
||||
| CPU | x86_64 平台<br> Intel CPU Sandy Bridge 或以上<br> CPU 指令集<br> _ SSE42<br> _ AVX<br> _ AVX2<br> _ AVX512 |
|
||||
| 内存 | 16 GB 或以上 |
|
||||
|
||||
##### 软件
|
||||
|
||||
| 软件名称 | 版本 |
|
||||
| -------------- | ---------- |
|
||||
| Docker | 19.05 或以上 |
|
||||
| Docker Compose | 1.25.5 或以上 |
|
||||
| jq | 1.3 或以上 |
|
||||
| kubectl | 1.14 或以上 |
|
||||
| helm | 3.0 或以上 |
|
||||
| kind | 0.10.0 或以上 |
|
||||
|
||||
#### 安装依赖
|
||||
|
||||
##### 检查 Docker 和 Docker Compose 状态
|
||||
|
||||
1. 确认 Docker Daemon 正在运行:
|
||||
|
||||
```shell
|
||||
$ docker info
|
||||
```
|
||||
|
||||
- 安装 Docker 步骤见 [Docker CE/EE 官方安装说明](https://docs.docker.com/get-docker/)进行安装
|
||||
|
||||
- 如果无法正常打印 Docker 相关信息,请启动 Docker Daemon。
|
||||
|
||||
- 要在没有 `root` 权限的情况下运行 Docker 命令,请创建 `docker` 组并添加用户,以运行:`sudo usermod -aG docker $USER`, 退出终端并重新登录,以使更改生效 ,详见 [使用非 root 用户管理 docker](https://docs.docker.com/install/linux/linux-postinstall/)。
|
||||
|
||||
2. 确认 Docker Compose 版本
|
||||
|
||||
```shell
|
||||
$ docker-compose version
|
||||
|
||||
docker-compose version 1.25.5, build 8a1c60f6
|
||||
docker-py version: 4.1.0
|
||||
CPython version: 3.7.5
|
||||
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
|
||||
```
|
||||
|
||||
- 安装 Docker Compose 步骤见 [Install Docker Compose](https://docs.docker.com/compose/install/)
|
||||
|
||||
##### 安装 jq
|
||||
|
||||
- 安装方式见 <https://stedolan.github.io/jq/download/>
|
||||
|
||||
##### 安装 kubectl
|
||||
|
||||
- 安装方式见 <https://kubernetes.io/docs/tasks/tools/>
|
||||
|
||||
##### 安装 helm
|
||||
|
||||
- 安装方式见 <https://helm.sh/docs/intro/install/>
|
||||
|
||||
##### 安装 kind
|
||||
|
||||
- 安装方式见 <https://kind.sigs.k8s.io/docs/user/quick-start/#installation>
|
||||
|
||||
#### 运行 E2E Test
|
||||
|
||||
```shell
|
||||
$ cd tests/scripts
|
||||
$ ./e2e-k8s.sh
|
||||
```
|
||||
|
||||
> Getting help
|
||||
>
|
||||
> 你可以执行以下命令获取帮助
|
||||
>
|
||||
> ```shell
|
||||
> $ ./e2e-k8s.sh --help
|
||||
> ```
|
7
tests-deprecating/docker/.env
Normal file
7
tests-deprecating/docker/.env
Normal file
@ -0,0 +1,7 @@
|
||||
MILVUS_SERVICE_IP=127.0.0.1
|
||||
MILVUS_SERVICE_PORT=19530
|
||||
MILVUS_PYTEST_WORKSPACE=/milvus/tests/python_test
|
||||
MILVUS_PYTEST_LOG_PATH=/milvus/_artifacts/tests/pytest_logs
|
||||
IMAGE_REPO=milvusdb
|
||||
IMAGE_TAG=20210802-87c5a49
|
||||
LATEST_IMAGE_TAG=20210802-87c5a49
|
18
tests-deprecating/docker/Dockerfile
Normal file
18
tests-deprecating/docker/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
FROM python:3.6.8-jessie
|
||||
|
||||
COPY ./tests/python_test/requirements.txt /requirements.txt
|
||||
|
||||
RUN python3 -m pip install --no-cache-dir -r /requirements.txt
|
||||
|
||||
CMD ["tail", "-f", "/dev/null"]
|
23
tests-deprecating/docker/docker-compose.yml
Normal file
23
tests-deprecating/docker/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
version: '3.5'
|
||||
|
||||
services:
|
||||
pytest:
|
||||
image: ${IMAGE_REPO}/pytest:${IMAGE_TAG}
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: tests/docker/Dockerfile
|
||||
cache_from:
|
||||
- ${IMAGE_REPO}/pytest:${LATEST_IMAGE_TAG}
|
||||
shm_size: 2G
|
||||
environment:
|
||||
MILVUS_SERVICE_IP: ${MILVUS_SERVICE_IP}
|
||||
MILVUS_SERVICE_PORT: ${MILVUS_SERVICE_PORT}
|
||||
CI_LOG_PATH: ${MILVUS_PYTEST_LOG_PATH}
|
||||
volumes:
|
||||
- ../../:/milvus:delegated
|
||||
working_dir: ${MILVUS_PYTEST_WORKSPACE}
|
||||
|
||||
networks:
|
||||
default:
|
||||
external: ${PRE_EXIST_NETWORK:-false}
|
||||
name: ${PYTEST_NETWORK:-milvus_dev}
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user