From 7f807061d5fd921bcbd003257567807a9abfcf6a Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Thu, 16 Jan 2025 15:42:27 -0700 Subject: [PATCH 1/7] GODRIVER-3334 Include LangChainGo in AI/ML integration pipeline --- .evergreen/config.yml | 16 ++++++++++++++++ .evergreen/fetch-repo.sh | 16 ++++++++++++++-- langchaingo/config.env | 3 +++ langchaingo/run.sh | 7 +++++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 langchaingo/config.env create mode 100644 langchaingo/run.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4f6208c..e0024ce 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -205,6 +205,13 @@ tasks: - func: "setup remote atlas" - func: "execute tests" + - name: test-langchaingo-local + tags: [local] + commands: + - func: "fetch repo" + - func: "setup local atlas" + - func: "execute tests" + buildvariants: - name: test-llama-index-kvstore-rhel # TODO - Maintainer has pushed back on this. @@ -317,3 +324,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 + run_on: + - ubuntu2204-small + tasks: + - name: test-langchaingo-local diff --git a/.evergreen/fetch-repo.sh b/.evergreen/fetch-repo.sh index dc79878..684f653 100644 --- a/.evergreen/fetch-repo.sh +++ b/.evergreen/fetch-repo.sh @@ -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 @@ -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}" +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 diff --git a/langchaingo/config.env b/langchaingo/config.env new file mode 100644 index 0000000..1d6d3ff --- /dev/null +++ b/langchaingo/config.env @@ -0,0 +1,3 @@ +REPO_NAME=langchaingo +CLONE_URL="https://github.com/prestonvasquez/langchaingo.git" +BRANCH="GODRIVER-3345" diff --git a/langchaingo/run.sh b/langchaingo/run.sh new file mode 100644 index 0000000..d2fef6f --- /dev/null +++ b/langchaingo/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eu + +cd langchaingo/vectorstores/mongovector + +go test -v -failfast From 3131c25748a3fd719353b2cb9cd63ac30e986aa5 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Thu, 16 Jan 2025 16:42:56 -0700 Subject: [PATCH 2/7] GODRIVER-3334 Remove setup local atlas --- .evergreen/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e0024ce..eb2ffc4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -209,7 +209,6 @@ tasks: tags: [local] commands: - func: "fetch repo" - - func: "setup local atlas" - func: "execute tests" buildvariants: From 5591c063b8084cdf24fe3ca527875257e80a8f10 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Thu, 16 Jan 2025 17:06:49 -0700 Subject: [PATCH 3/7] GODRIVER-3334 Rename dir --- .evergreen/config.yml | 2 +- {langchaingo => langchaingo-golang}/config.env | 0 langchaingo-golang/run.sh | 7 +++++++ langchaingo/run.sh | 7 ------- 4 files changed, 8 insertions(+), 8 deletions(-) rename {langchaingo => langchaingo-golang}/config.env (100%) create mode 100644 langchaingo-golang/run.sh delete mode 100644 langchaingo/run.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index eb2ffc4..363026a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -327,7 +327,7 @@ buildvariants: - name: test-langchaingo-ubuntu display_name: LangchainGo Ubuntu2204 expansions: - DIR: langchaingo + DIR: langchaingo-golang run_on: - ubuntu2204-small tasks: diff --git a/langchaingo/config.env b/langchaingo-golang/config.env similarity index 100% rename from langchaingo/config.env rename to langchaingo-golang/config.env diff --git a/langchaingo-golang/run.sh b/langchaingo-golang/run.sh new file mode 100644 index 0000000..8f0d408 --- /dev/null +++ b/langchaingo-golang/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eu + +cd langchaingo-repo/vectorstores/mongovector + +go test -v -failfast diff --git a/langchaingo/run.sh b/langchaingo/run.sh deleted file mode 100644 index d2fef6f..0000000 --- a/langchaingo/run.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -eu - -cd langchaingo/vectorstores/mongovector - -go test -v -failfast From ab1eb95fc88606b7d192811f42fe53eea60e6f2d Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Thu, 16 Jan 2025 17:13:53 -0700 Subject: [PATCH 4/7] GODRIVER-3334 Rename repo --- langchaingo-golang/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchaingo-golang/run.sh b/langchaingo-golang/run.sh index 8f0d408..d2fef6f 100644 --- a/langchaingo-golang/run.sh +++ b/langchaingo-golang/run.sh @@ -2,6 +2,6 @@ set -eu -cd langchaingo-repo/vectorstores/mongovector +cd langchaingo/vectorstores/mongovector go test -v -failfast From 304cf1077f8848239099d6fbdc3f6b3d13893301 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Fri, 17 Jan 2025 19:02:40 -0700 Subject: [PATCH 5/7] GODRIVER-3334 export go env variables --- langchaingo-golang/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/langchaingo-golang/run.sh b/langchaingo-golang/run.sh index d2fef6f..ef5d485 100644 --- a/langchaingo-golang/run.sh +++ b/langchaingo-golang/run.sh @@ -2,6 +2,11 @@ set -eu -cd langchaingo/vectorstores/mongovector +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 From bdea0ade32ce4fe19a841f68ebc19b1ccaccf98f Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Fri, 17 Jan 2025 19:14:11 -0700 Subject: [PATCH 6/7] GODRIVER-3334 Include race and shuffle in tests --- langchaingo-golang/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchaingo-golang/run.sh b/langchaingo-golang/run.sh index ef5d485..0f149c5 100644 --- a/langchaingo-golang/run.sh +++ b/langchaingo-golang/run.sh @@ -9,4 +9,4 @@ cd vectorstores/mongovector export PATH="$PATH:/opt/golang/$GO_VERSION/bin" export GOROOT="/opt/golang/$GO_VERSION" -go test -v -failfast +go test -v -failfast -race -shuffle=on From 4b658145f324106a5a927b7a4343294bd0923f6e Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Fri, 24 Jan 2025 19:50:55 -0700 Subject: [PATCH 7/7] GODRIVER-3334 Remove branching logic --- .evergreen/fetch-repo.sh | 14 +------------- langchaingo-golang/config.env | 3 +-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.evergreen/fetch-repo.sh b/.evergreen/fetch-repo.sh index 684f653..ad9621a 100644 --- a/.evergreen/fetch-repo.sh +++ b/.evergreen/fetch-repo.sh @@ -2,12 +2,6 @@ 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 @@ -21,13 +15,7 @@ source config.env set +a rm -rf ${REPO_NAME} - -# Clone the repository, with an optional branch -if [ -n "${BRANCH}" ]; then - git clone --branch "${BRANCH}" "${CLONE_URL}" -else - git clone "${CLONE_URL}" -fi +git clone ${CLONE_URL} # Apply patches to upstream repo if desired. if [ -d "patches" ]; then diff --git a/langchaingo-golang/config.env b/langchaingo-golang/config.env index 1d6d3ff..51fc29a 100644 --- a/langchaingo-golang/config.env +++ b/langchaingo-golang/config.env @@ -1,3 +1,2 @@ REPO_NAME=langchaingo -CLONE_URL="https://github.com/prestonvasquez/langchaingo.git" -BRANCH="GODRIVER-3345" +CLONE_URL=" -b GODRIVER-3345 --single-branch https://github.com/prestonvasquez/langchaingo.git"