Skip to content

Commit

Permalink
enable e2e on sse machine (zilliztech#844)
Browse files Browse the repository at this point in the history
* enable e2e on sse machine

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>

* add check for e2e-sse

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
  • Loading branch information
yellow-shine authored Sep 18, 2024
1 parent f55cd58 commit b7da001
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ pull_request_rules:
- 'status-success=analyzer'
- 'status-success=python3 wheel'
- "status-success=e2e"
- "status-success=e2e-sse"
- "status-success=e2e-gpu"
- "status-success=ut-gpu"
actions:
Expand All @@ -186,6 +187,7 @@ pull_request_rules:
- 'status-success=analyzer'
- 'status-success=python3 wheel'
- "status-success=e2e"
- "status-success=e2e-sse"
actions:
label:
add:
Expand All @@ -200,6 +202,7 @@ pull_request_rules:
- 'status-success=pre-commit'
- 'status-success=analyzer'
- "status-success=e2e"
- "status-success=e2e-sse"
actions:
label:
add:
Expand Down Expand Up @@ -228,6 +231,17 @@ pull_request_rules:
message: |
@{{author}} e2e jenkins job failed, comment `/run-e2e` can trigger the job again.
- name: Add comment when e2e-sse job failed
conditions:
- or:
- base=master
- base~=^2(\.\d+){1,2}$
- 'check-failure=e2e-sse'
actions:
comment:
message: |
@{{author}} e2e jenkins job failed, comment `/run-e2e-sse` can trigger the job again.
- name: Remove ci-passed label when ut failed for main
conditions:
- or:
Expand All @@ -239,6 +253,7 @@ pull_request_rules:
- "status-success!=analyzer"
- "status-success!=python3 wheel"
- "status-success!=e2e"
- "status-success!=e2e-sse"
- files~=^(?=.*((\.(h|cpp)|CMakeLists.txt))).*$
actions:
label:
Expand All @@ -256,6 +271,7 @@ pull_request_rules:
- "status-success!=analyzer"
- "status-success!=python3 wheel"
- "status-success!=e2e"
- "status-success!=e2e-sse"
- "status-success!=e2e-gpu"
- "status-success!=ut-gpu"
- files~=^(?=src/index/ivf_raft/)
Expand Down
91 changes: 91 additions & 0 deletions ci/E2E2-SSE.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// int total_timeout_minutes = 120
def knowhere_wheel=''
pipeline {
agent {
kubernetes {
cloud "new_ci_idc"
inheritFrom 'default'
yamlFile 'ci/pod/e2e-cpu.yaml'
defaultContainer 'main'
}
}

options {
// timeout(time: total_timeout_minutes, unit: 'MINUTES')
buildDiscarder logRotator(artifactDaysToKeepStr: '30')
parallelsAlwaysFailFast()
disableConcurrentBuilds(abortPrevious: true)
preserveStashes(buildCount: 10)
}
stages {
stage("Build"){
steps {
container("main"){
script{
def date = sh(returnStdout: true, script: 'date +%Y%m%d').trim()
def gitShortCommit = sh(returnStdout: true, script: "echo ${env.GIT_COMMIT} | cut -b 1-7 ").trim()
version="${env.CHANGE_ID}.${date}.${gitShortCommit}"
sh "apt-get update || true"
sh "apt-get install -y libaio-dev libopenblas-dev libcurl4-openssl-dev libdouble-conversion-dev libevent-dev libgflags-dev"
sh "pip3 install conan==1.61.0"
// sh "conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local"
sh "cmake --version"
sh "mkdir build"
sh "cd build/ && conan install .. --build=missing -o with_diskann=True -s compiler.libcxx=libstdc++11 && conan build .."
sh "cd python && VERSION=${version} python3 setup.py bdist_wheel"
dir('python/dist'){
knowhere_wheel=sh(returnStdout: true, script: 'ls | grep .whl').trim()
archiveArtifacts artifacts: "${knowhere_wheel}", followSymlinks: false
}
// stash knowhere info for rebuild E2E Test only
sh "echo ${knowhere_wheel} > knowhere.txt"
stash includes: 'knowhere.txt', name: 'knowhereWheel'
}
}
}
}
stage("Test"){
agent {
kubernetes {
cloud "new_ci_idc"
inheritFrom 'default'
yamlFile 'ci/pod/e2e-sse.yaml'
defaultContainer 'main'
}
}
steps {
script{
if ("${knowhere_wheel}"==''){
dir ("knowhereWheel"){
try{
unstash 'knowhereWheel'
knowhere_wheel=sh(returnStdout: true, script: 'cat knowhere.txt | tr -d \'\n\r\'')
}catch(e){
error "No knowhereWheel info remained ,please rerun build to build new package."
}
}
}
checkout([$class: 'GitSCM', branches: [[name: '*/main']], extensions: [],
userRemoteConfigs: [[credentialsId: 'milvus-ci', url: 'https://github.com/milvus-io/knowhere-test.git']]])
dir('tests'){
unarchive mapping: ["${knowhere_wheel}": "${knowhere_wheel}"]
sh "apt-get update || true"
sh "apt-get install -y libopenblas-dev libaio-dev libdouble-conversion-dev libevent-dev"
sh "pip3 install ${knowhere_wheel}"
sh "cat requirements.txt | xargs -n 1 pip3 install"
sh "cp -r /home/data/milvus/ann_fbin/ ."
sh "pytest -v -m 'L0'"
}
}
}
post{
always {
script{
sh 'cat tests/pytest.log'
archiveArtifacts artifacts: 'tests/pytest.log', followSymlinks: false
}
}
}
}
}
}
44 changes: 44 additions & 0 deletions ci/pod/e2e-sse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: v1
kind: Pod
metadata:
labels:
app: knowhere-e2e
namespace: knowhere-ci
spec:
enableServiceLinks: false
nodeSelector:
node.kubernetes.io/cpu-feature.sse: true
tolerations:
- key: cpu-feature
operator: Equal
value: "sse"
effect: NoSchedule
# affinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - knowhere-e2e
# topologyKey: "kubernetes.io/hostname"
containers:
- name: main
image: milvusdb/knowhere-cpu-build:amd64-ubuntu22.04-20240528-ccc71670
tty: true
args: ["cat"]
# resources:
# requests:
# memory: "16Gi"
# cpu: "4"
# limits:
# memory: "16Gi"
# cpu: "4"
volumeMounts:
- mountPath: /home/data
name: db-data
volumes:
- name: db-data
persistentVolumeClaim:
claimName: db-data

0 comments on commit b7da001

Please sign in to comment.