Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .evergreen/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,22 @@ is_python_310() {
}


retry() {
for i in 1 2 4 8 16; do
{ "$@" && return 0; } || sleep $i
done
return 1
}


# 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)
# stores the connection string in .local_atlas_uri file
setup_local_atlas() {
echo "Starting the container"

IMAGE=artifactory.corp.mongodb.com/dockerhub/mongodb/mongodb-atlas-local:latest
retry podman pull $IMAGE

CONTAINER_ID=$(podman run --rm -d -e DO_NOT_TRACK=1 -P --health-cmd "/usr/local/bin/runner healthcheck" mongodb/mongodb-atlas-local:latest)

echo "waiting for container to become healthy..."
Expand Down
2 changes: 1 addition & 1 deletion chatgpt-retrieval-plugin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $PYTHON_BINARY -m poetry install --with dev
OPENAI_API_KEY=$openai_api_key \
DATASTORE="mongodb" \
BEARER_TOKEN="staylowandkeepmoving" \
MONGODB_URI=$chatgpt_retrieval_plugin_mongodb_uri \
MONGODB_URI=$(fetch_local_atlas_uri) \
MONGODB_DATABASE="chatgpt_retrieval_plugin_test_db" \
MONGODB_COLLECTION="chatgpt_retrieval_plugin_test_vectorstore" \
MONGODB_INDEX="vector_index" \
Expand Down