From d98784c1983d5585ff6f78bececce17ff2183438 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 18 Feb 2025 00:54:00 +0100 Subject: [PATCH 1/3] test(NODE-6745): only find python when installing native --- .evergreen/config.yml | 5 +++++ .evergreen/generate_evergreen_tasks.js | 8 +++++++- .evergreen/install-dependencies.sh | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 7216fcb9a0d..d4e6a2ad46c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1520,6 +1520,11 @@ tasks: - auth - kerberos commands: + - command: expansions.update + type: setup + params: + updates: + - {key: NATIVE, value: 'true'} - func: install dependencies - func: run kerberos tests - name: test-auth-ldap diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 2af924466f3..1f14f4c62ea 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -162,7 +162,13 @@ TASKS.push( { name: 'test-auth-kerberos', tags: ['auth', 'kerberos'], - commands: [{ func: 'install dependencies' }, { func: 'run kerberos tests' }] + commands: [ + updateExpansions({ + NATIVE: 'true' + }), + { func: 'install dependencies' }, + { func: 'run kerberos tests' } + ] }, { name: 'test-auth-ldap', diff --git a/.evergreen/install-dependencies.sh b/.evergreen/install-dependencies.sh index 33b9958b885..6715b1397df 100644 --- a/.evergreen/install-dependencies.sh +++ b/.evergreen/install-dependencies.sh @@ -11,6 +11,13 @@ export NODE_LTS_VERSION=${NODE_LTS_VERSION:-16} # be handled by this script in drivers tools. source $DRIVERS_TOOLS/.evergreen/install-node.sh +if [ "$NATIVE" = "true" ]; then + # https://github.com/nodejs/node-gyp#configuring-python-dependency + . $DRIVERS_TOOLS/.evergreen/find-python3.sh + NODE_GYP_FORCE_PYTHON=$(find_python3) + export NODE_GYP_FORCE_PYTHON +fi + npm install "${NPM_OPTIONS}" source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh From f6c141761076d8c520b14e9c9aea3264c59a7a47 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 18 Feb 2025 00:59:53 +0100 Subject: [PATCH 2/3] test: pin tools --- .evergreen/prepare-shell.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/prepare-shell.sh b/.evergreen/prepare-shell.sh index af8cd4a00ee..8abac7d462d 100644 --- a/.evergreen/prepare-shell.sh +++ b/.evergreen/prepare-shell.sh @@ -32,7 +32,7 @@ export PATH="$MONGODB_BINARIES:$PATH" if [ ! -d "$DRIVERS_TOOLS" ]; then # Only clone driver tools if it does not exist - git clone --depth=1 "https://github.com/mongodb-labs/drivers-evergreen-tools.git" "${DRIVERS_TOOLS}" + git clone --depth=1 --branch NODE-6745 "https://github.com/mongodb-labs/drivers-evergreen-tools.git" "${DRIVERS_TOOLS}" fi echo "installed DRIVERS_TOOLS from commit $(git -C "${DRIVERS_TOOLS}" rev-parse HEAD)" From 51a70eb2f04d42bf02240072b56d5fde93d53c52 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 18 Feb 2025 23:52:40 +0100 Subject: [PATCH 3/3] chore: revert tools branch --- .evergreen/prepare-shell.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/prepare-shell.sh b/.evergreen/prepare-shell.sh index 8abac7d462d..af8cd4a00ee 100644 --- a/.evergreen/prepare-shell.sh +++ b/.evergreen/prepare-shell.sh @@ -32,7 +32,7 @@ export PATH="$MONGODB_BINARIES:$PATH" if [ ! -d "$DRIVERS_TOOLS" ]; then # Only clone driver tools if it does not exist - git clone --depth=1 --branch NODE-6745 "https://github.com/mongodb-labs/drivers-evergreen-tools.git" "${DRIVERS_TOOLS}" + git clone --depth=1 "https://github.com/mongodb-labs/drivers-evergreen-tools.git" "${DRIVERS_TOOLS}" fi echo "installed DRIVERS_TOOLS from commit $(git -C "${DRIVERS_TOOLS}" rev-parse HEAD)"