Skip to content

Commit f045cda

Browse files
committed
2 parents 7a03b0e + 5732422 commit f045cda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+732
-417
lines changed

.evergreen/config.yml

Lines changed: 157 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -29,66 +29,80 @@ functions:
2929
directory: "src"
3030

3131
"fetch secrets":
32+
- command: ec2.assume_role
33+
params:
34+
role_arn: ${drivers_test_secrets_role}
3235
- command: subprocess.exec
3336
type: setup
3437
params:
3538
working_dir: "src"
3639
binary: bash
40+
include_expansions_in_env: [AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN]
3741
args: [.evergreen/fetch-secrets.sh]
3842

3943
"fetch repo":
40-
- command: shell.exec
41-
type: setup
44+
- command: subprocess.exec
45+
type: test
4246
params:
47+
include_expansions_in_env: [DIR, REPO_ORG, REPO_BRANCH]
4348
working_dir: "src"
44-
script: |
45-
if [ ! -d "${DIR}" ]; then
46-
echo '${REPO_NAME} could not be found' 1>&2
47-
exit 1
48-
fi
49-
# Apply patches to upstream repo if desired.
50-
cd ${DIR}
51-
git clone ${CLONE_URL}
52-
if [ -d "patches" ]; then
53-
cd ${REPO_NAME}
54-
echo "Applying patches."
55-
git apply ../patches/*
56-
fi
49+
binary: bash
50+
args: [.evergreen/fetch-repo.sh]
51+
52+
"assume role":
53+
- command: ec2.assume_role
54+
params:
55+
role_arn: ${drivers_test_secrets_role}
5756

5857
"execute tests":
5958
- command: subprocess.exec
6059
type: test
6160
params:
62-
add_expansions_to_env: true
63-
working_dir: "src/${DIR}/${REPO_NAME}"
61+
include_expansions_in_env: [DIR, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
62+
working_dir: "src"
6463
binary: bash
65-
args:
66-
- ../run.sh
64+
args: [.evergreen/execute-tests.sh]
6765

6866
"setup local atlas":
6967
- command: subprocess.exec
70-
type: setup
68+
type: test
7169
retry_on_failure: true
7270
params:
73-
add_expansions_to_env: true
71+
include_expansions_in_env: [DIR, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
7472
working_dir: "src"
7573
binary: bash
7674
args:
7775
- .evergreen/provision-atlas.sh
7876

7977
"setup remote atlas":
8078
- command: subprocess.exec
81-
type: setup
79+
type: test
8280
params:
83-
add_expansions_to_env: true
81+
include_expansions_in_env: [DIR, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
8482
working_dir: "src"
8583
binary: bash
8684
args: [.evergreen/setup-remote.sh]
8785

8886
pre_error_fails_task: true
87+
post_error_fails_task: true
8988
pre:
89+
- func: "assume role"
9090
- func: "fetch source"
9191
- func: "fetch secrets"
92+
post:
93+
- command: subprocess.exec
94+
type: setup
95+
params:
96+
working_dir: "src"
97+
binary: bash
98+
args: [drivers-evergreen-tools/.evergreen/teardown.sh]
99+
- command: subprocess.exec
100+
type: setup
101+
params:
102+
include_expansions_in_env: [DIR, REPO_ORG, REPO_BRANCH]
103+
working_dir: "src"
104+
binary: bash
105+
args: [.evergreen/teardown.sh]
92106

93107
tasks:
94108
- name: test-semantic-kernel-python-local
@@ -105,18 +119,10 @@ tasks:
105119
- func: "setup remote atlas"
106120
- func: "execute tests"
107121

108-
- name: test-semantic-kernel-csharp-local
122+
- name: test-semantic-kernel-csharp
109123
tags: [local]
110124
commands:
111125
- func: "fetch repo"
112-
- func: "setup local atlas"
113-
- func: "execute tests"
114-
115-
- name: test-semantic-kernel-csharp-remote
116-
tags: [remote]
117-
commands:
118-
- func: "fetch repo"
119-
- func: "setup remote atlas"
120126
- func: "execute tests"
121127

122128
- name: test-langchain-python-local
@@ -188,30 +194,78 @@ tasks:
188194
- func: "setup remote atlas"
189195
- func: "execute tests"
190196

191-
buildvariants:
192-
- name: test-llama-index-kvstore-rhel
193-
# TODO - Maintainer has pushed back on this.
194-
display_name: LlamaIndex RHEL KV Store
195-
expansions:
196-
DIR: llama-index-python-kvstore
197-
REPO_NAME: llama_index
198-
# TODO - Update CLONE_URL: [PYTHON-4522] [INTPYTHON-326]
199-
CLONE_URL: -b PYTHON-4522 --single-branch https://github.com/shruti-sridhar/llama_index.git
200-
DATABASE: llama_index_test_db
201-
run_on:
202-
- rhel87-small
203-
tasks:
204-
- name: test-llama-index-local
205-
- name: test-llama-index-remote
206-
batchtime: 10080 # 1 week
197+
- name: test-pymongo-voyageai-local
198+
tags: [local]
199+
commands:
200+
- func: "fetch repo"
201+
- func: "setup local atlas"
202+
- func: "execute tests"
203+
204+
- name: test-pymongo-voyageai-remote
205+
tags: [remote]
206+
commands:
207+
- func: "fetch repo"
208+
- func: "setup remote atlas"
209+
- func: "execute tests"
210+
211+
- name: test-haystack-embeddings-local
212+
tags: [local]
213+
commands:
214+
- func: "fetch repo"
215+
- func: "setup local atlas"
216+
- func: "execute tests"
217+
218+
- name: test-haystack-embeddings-remote
219+
tags: [remote]
220+
commands:
221+
- func: "fetch repo"
222+
- func: "setup remote atlas"
223+
- func: "execute tests"
207224

225+
- name: test-haystack-fulltext-local
226+
tags: [local]
227+
commands:
228+
- func: "fetch repo"
229+
- func: "setup local atlas"
230+
- func: "execute tests"
231+
232+
- name: test-haystack-fulltext-remote
233+
tags: [remote]
234+
commands:
235+
- func: "fetch repo"
236+
- func: "setup remote atlas"
237+
- func: "execute tests"
238+
239+
- name: test-langchaingo-local
240+
tags: [local]
241+
commands:
242+
- func: "fetch repo"
243+
- func: "execute tests"
244+
245+
- name: test-langchain-js-local
246+
tags: [local]
247+
commands:
248+
- func: "fetch repo"
249+
- func: "execute tests"
250+
- command: attach.xunit_results
251+
params:
252+
file: src/langchain-js/langchainjs/libs/langchain-mongodb/results.xml
253+
254+
- name: test-langchain-js-remote
255+
tags: [remote]
256+
commands:
257+
- func: "fetch repo"
258+
- func: "setup remote atlas"
259+
- func: "execute tests"
260+
- command: attach.xunit_results
261+
params:
262+
file: src/langchain-js/langchainjs/libs/langchain-mongodb/results.xml
263+
264+
buildvariants:
208265
- name: test-semantic-kernel-python-rhel
209266
display_name: Semantic-Kernel RHEL Python
210267
expansions:
211268
DIR: semantic-kernel-python
212-
REPO_NAME: semantic-kernel
213-
CLONE_URL: https://github.com/microsoft/semantic-kernel.git
214-
DATABASE: pyMSKTest
215269
run_on:
216270
- rhel87-small
217271
tasks:
@@ -224,23 +278,16 @@ buildvariants:
224278
display_name: Semantic-Kernel RHEL CSharp
225279
expansions:
226280
DIR: semantic-kernel-csharp
227-
REPO_NAME: semantic-kernel
228-
CLONE_URL: https://github.com/microsoft/semantic-kernel.git
229-
DATABASE: dotnetMSKNearestTest
230281
run_on:
231282
- rhel87-small
232283
tasks:
233-
- name: test-semantic-kernel-csharp-local
234-
- name: test-semantic-kernel-csharp-remote
284+
- name: test-semantic-kernel-csharp
235285
batchtime: 10080 # 1 week
236286

237287
- name: test-langchain-python-rhel
238288
display_name: Langchain RHEL Python
239289
expansions:
240290
DIR: langchain-python
241-
REPO_NAME: langchain-mongodb
242-
CLONE_URL: https://github.com/langchain-ai/langchain-mongodb.git
243-
DATABASE: langchain_test_db
244291
run_on:
245292
- rhel87-small
246293
tasks:
@@ -252,9 +299,6 @@ buildvariants:
252299
display_name: Langgraph RHEL Python
253300
expansions:
254301
DIR: langgraph-python
255-
REPO_NAME: langchain-mongodb
256-
CLONE_URL: https://github.com/langchain-ai/langchain-mongodb.git
257-
DATABASE: langgraph-test
258302
run_on:
259303
- rhel87-small
260304
tasks:
@@ -266,9 +310,6 @@ buildvariants:
266310
display_name: ChatGPT Retrieval Plugin
267311
expansions:
268312
DIR: chatgpt-retrieval-plugin
269-
REPO_NAME: chatgpt-retrieval-plugin
270-
CLONE_URL: https://github.com/openai/chatgpt-retrieval-plugin.git
271-
DATABASE: chatgpt_retrieval_plugin_test_db
272313
run_on:
273314
- rhel87-small
274315
tasks:
@@ -280,9 +321,6 @@ buildvariants:
280321
display_name: LlamaIndex RHEL Vector Store
281322
expansions:
282323
DIR: llama-index-python-vectorstore
283-
REPO_NAME: llama_index
284-
CLONE_URL: https://github.com/run-llama/llama_index.git
285-
DATABASE: llama_index_test_db
286324
run_on:
287325
- rhel87-small
288326
tasks:
@@ -295,11 +333,59 @@ buildvariants:
295333
display_name: DocArray RHEL
296334
expansions:
297335
DIR: docarray
298-
REPO_NAME: docarray
299-
CLONE_URL: https://github.com/docarray/docarray.git
300-
DATABASE: docarray_test_db
301336
run_on:
302337
- rhel87-small
303338
tasks:
304339
- name: test-docarray-local
305340
- name: test-docarray-remote
341+
342+
- name: test-pymongo-voyageai-rhel
343+
display_name: PyMongo-VoyageAI RHEL
344+
expansions:
345+
DIR: pymongo-voyageai
346+
run_on:
347+
- rhel87-small
348+
tasks:
349+
- name: test-pymongo-voyageai-local
350+
- name: test-pymongo-voyageai-remote
351+
352+
- name: test-haystack-embeddings-rhel
353+
display_name: Haystack Embeddings RHEL
354+
expansions:
355+
DIR: haystack-embeddings
356+
run_on:
357+
- rhel87-small
358+
tasks:
359+
- name: test-haystack-embeddings-local
360+
# TODO: INTPYTHON-465
361+
# - name: test-haystack-embeddings-remote
362+
363+
- name: test-haystack-fulltext-rhel
364+
display_name: Haystack FullText RHEL
365+
expansions:
366+
DIR: haystack-fulltext
367+
run_on:
368+
- rhel87-small
369+
tasks:
370+
- name: test-haystack-fulltext-local
371+
# TODO: INTPYTHON-465
372+
# - name: test-haystack-fulltext-remote
373+
374+
- name: test-langchaingo-ubuntu
375+
display_name: LangchainGo Ubuntu2204
376+
expansions:
377+
DIR: langchaingo-golang
378+
run_on:
379+
- ubuntu2204-small
380+
tasks:
381+
- name: test-langchaingo-local
382+
383+
- name: test-langchain-js-ubuntu
384+
display_name: LangchainJS Ubuntu2204
385+
expansions:
386+
DIR: langchain-js
387+
run_on:
388+
- ubuntu2204-small
389+
tasks:
390+
- name: test-langchain-js-local
391+
- name: test-langchain-js-remote

.evergreen/execute-tests.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
6+
ROOT_DIR=$(dirname $SCRIPT_DIR)
7+
8+
9+
# Source the configuration.
10+
cd ${ROOT_DIR}/${DIR}
11+
set -a
12+
source config.env
13+
set +a
14+
15+
cd ${REPO_NAME}
16+
bash ${ROOT_DIR}/${DIR}/run.sh

0 commit comments

Comments
 (0)