Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GODRIVER-3334 Include LangChainGo in AI/ML integration pipeline #59

Merged
merged 7 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 6 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
15 changes: 15 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ tasks:
- func: "setup remote atlas"
- func: "execute tests"

- name: test-langchaingo-local
tags: [local]
commands:
- func: "fetch repo"
- func: "execute tests"

buildvariants:
- name: test-llama-index-kvstore-rhel
# TODO - Maintainer has pushed back on this.
Expand Down Expand Up @@ -317,3 +323,12 @@ buildvariants:
- name: test-haystack-fulltext-local
# TODO: INTPYTHON-465
# - name: test-haystack-fulltext-remote

- name: test-langchaingo-ubuntu
display_name: LangchainGo Ubuntu2204
expansions:
DIR: langchaingo-golang
run_on:
- ubuntu2204-small
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come you've changed the host? It was a set and forget thing. Does rhel87-small not have your go version? Should we consider updating all?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests rely on docker, which isn't available on the RHEL hosts.

tasks:
- name: test-langchaingo-local
16 changes: 14 additions & 2 deletions .evergreen/fetch-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -eu

# Check if a branch parameter is provided
BRANCH=""
if [ $# -gt 0 ]; then
BRANCH=$1
fi

if [ ! -d "${DIR}" ]; then
echo '${REPO_NAME} could not be found' 1>&2
exit 1
Expand All @@ -15,11 +21,17 @@ source config.env
set +a

rm -rf ${REPO_NAME}
git clone ${CLONE_URL}

# Clone the repository, with an optional branch
if [ -n "${BRANCH}" ]; then
git clone --branch "${BRANCH}" "${CLONE_URL}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem necessary. Your CLONE_URL can be arbitrary. For example:

CLONE_URL=" -b PYTHON-4522 --single-branch https://github.com/shruti-sridhar/llama_index.git"

else
git clone "${CLONE_URL}"
fi

# Apply patches to upstream repo if desired.
if [ -d "patches" ]; then
cd ${REPO_NAME}
echo "Applying patches."
git apply ../patches/*
git apply ../patches/*
fi
3 changes: 3 additions & 0 deletions langchaingo-golang/config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REPO_NAME=langchaingo
CLONE_URL="https://github.com/prestonvasquez/langchaingo.git"
BRANCH="GODRIVER-3345"
12 changes: 12 additions & 0 deletions langchaingo-golang/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -eu

GO_VERSION="go1.22"

cd vectorstores/mongovector

export PATH="$PATH:/opt/golang/$GO_VERSION/bin"
export GOROOT="/opt/golang/$GO_VERSION"

go test -v -failfast -race -shuffle=on
Loading