Skip to content

Commit 7ad0cf2

Browse files
authored
Merge pull request #47 from blink1073/INTPYTHON-323
INTPYTHON-323 & INTPYTHON-420 Use Local Atlas on Chatgpt-retrieval-plugin Tests
2 parents d779a0c + 8813435 commit 7ad0cf2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.evergreen/utils.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,22 @@ is_python_310() {
5252
}
5353

5454

55+
retry() {
56+
for i in 1 2 4 8 16; do
57+
{ "$@" && return 0; } || sleep $i
58+
done
59+
return 1
60+
}
61+
62+
5563
# start mongodb-atlas-local container, because of a bug in podman we have to define the healtcheck ourselves (is the same as in the image)
5664
# stores the connection string in .local_atlas_uri file
5765
setup_local_atlas() {
5866
echo "Starting the container"
67+
68+
IMAGE=artifactory.corp.mongodb.com/dockerhub/mongodb/mongodb-atlas-local:latest
69+
retry podman pull $IMAGE
70+
5971
CONTAINER_ID=$(podman run --rm -d -e DO_NOT_TRACK=1 -P --health-cmd "/usr/local/bin/runner healthcheck" mongodb/mongodb-atlas-local:latest)
6072

6173
echo "waiting for container to become healthy..."

chatgpt-retrieval-plugin/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $PYTHON_BINARY -m poetry install --with dev
2929
OPENAI_API_KEY=$openai_api_key \
3030
DATASTORE="mongodb" \
3131
BEARER_TOKEN="staylowandkeepmoving" \
32-
MONGODB_URI=$chatgpt_retrieval_plugin_mongodb_uri \
32+
MONGODB_URI=$(fetch_local_atlas_uri) \
3333
MONGODB_DATABASE="chatgpt_retrieval_plugin_test_db" \
3434
MONGODB_COLLECTION="chatgpt_retrieval_plugin_test_vectorstore" \
3535
MONGODB_INDEX="vector_index" \

0 commit comments

Comments
 (0)