Skip to content

GODRIVER-3173 Complete pending reads on conn checkout #1977

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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a805a43
GODRIVER-3173 Complete pending reads on conn checkout
prestonvasquez Mar 5, 2025
70cfd39
GODRIVER-3173 Update unified spect tests
prestonvasquez Mar 7, 2025
f060a09
GODRIVER-3173 Refresh pending read every 4KB
prestonvasquez Mar 19, 2025
4cc9b31
Merge branch 'master' into GODRIVER-3173
prestonvasquez Apr 14, 2025
61a0fc6
GODRIVER-3173 Update APR
prestonvasquez Apr 16, 2025
50b921b
Merge branch 'master' into GODRIVER-3173
prestonvasquez Apr 17, 2025
9cc397a
GODRIVER-3173 Unset pending read state when succeeded
prestonvasquez Apr 17, 2025
0615759
GODRIVER-3173 Clean up code
prestonvasquez Apr 19, 2025
5afbc96
GODRIVER-3173 Add prose tests
prestonvasquez Apr 22, 2025
c9ef687
GODRIVER-3173 Organize prose tests
prestonvasquez Apr 24, 2025
d15516d
GODRIVER-3173 Fix bugs in events and logs
prestonvasquez Apr 24, 2025
1752645
GODRIVER-3173 Update test runner to use response over read
prestonvasquez Apr 25, 2025
245945d
Merge branch 'master' into GODRIVER-3173
prestonvasquez Apr 30, 2025
3fa059d
GODRIVER-3173 Fix typos
prestonvasquez Apr 30, 2025
6bcc8b0
Merge branch 'master' into GODRIVER-3173
prestonvasquez Apr 30, 2025
72a4a0d
GODRIVER-3173 Update spec
prestonvasquez Apr 30, 2025
02f048a
GODRIVER-3173 Add duration to failure; update tests
prestonvasquez May 5, 2025
328db7e
GODRIVER-3173 Shore up testing
prestonvasquez May 9, 2025
106003a
GODRIVER-3173 Add CMAP prose tests
prestonvasquez Jun 25, 2025
73e7b02
Update pool w/ aliveness check
prestonvasquez Jun 27, 2025
e465d62
GODRIVER-3173 Fix peek bug
prestonvasquez Jun 27, 2025
32e751c
Use raw net connection for read()
prestonvasquez Jun 27, 2025
901ddbe
Fix timeout problems
prestonvasquez Jun 27, 2025
fad8cf1
Update test to align with prose tests
prestonvasquez Jun 27, 2025
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
47 changes: 45 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,17 @@ functions:
binary: bash
args: ["${DRIVERS_TOOLS}/.evergreen/csfle/await-servers.sh"]

start-mongoproxy:
- command: ec2.assume_role # TODO: not sure this is needd
params:
role_arn: ${aws_test_secrets_role}
- command: subprocess.exec
params:
binary: bash
include_expansions_in_env: [AUTH, SSL, MONGODB_URI]
background: true
args: [*task-runner, start-mongoproxy]

run-kms-tls-test:
- command: subprocess.exec
type: test
Expand Down Expand Up @@ -658,6 +669,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -673,12 +685,14 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
AUTH: "noauth"
SSL: "nossl"
MONGO_GO_DRIVER_COMPRESSOR: "snappy"
MONGO_PROXY_URI: "mongodb://127.0.0.1:28017/?directConnection=true"

- name: test-standalone-noauth-nossl-zlib-compression
tags: ["test", "standalone", "compression", "zlib"]
Expand All @@ -689,6 +703,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -705,6 +720,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -720,7 +736,8 @@ tasks:
TOPOLOGY: "server"
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -736,6 +753,7 @@ tasks:
AUTH: "auth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -751,6 +769,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -766,7 +785,8 @@ tasks:
TOPOLOGY: "server"
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand All @@ -783,6 +803,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "server"
Expand Down Expand Up @@ -1203,6 +1224,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "replica_set"
Expand All @@ -1219,6 +1241,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "replica_set"
Expand All @@ -1234,6 +1257,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "replica_set"
Expand All @@ -1249,6 +1273,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "replica_set"
Expand All @@ -1267,6 +1292,7 @@ tasks:
AUTH: "auth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "replica_set"
Expand All @@ -1282,6 +1308,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1297,6 +1324,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1313,6 +1341,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1329,6 +1358,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1345,6 +1375,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1360,6 +1391,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1376,6 +1408,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1392,6 +1425,7 @@ tasks:
AUTH: "auth"
SSL: "ssl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1408,6 +1442,7 @@ tasks:
AUTH: "auth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-tests
vars:
TOPOLOGY: "sharded_cluster"
Expand Down Expand Up @@ -1479,6 +1514,7 @@ tasks:
SSL: "nossl"
REQUIRE_API_VERSION: true
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-versioned-api-test
vars:
TOPOLOGY: "server"
Expand All @@ -1496,6 +1532,7 @@ tasks:
SSL: "nossl"
REQUIRE_API_VERSION: true
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-versioned-api-test
vars:
TOPOLOGY: "sharded_cluster"
Expand All @@ -1513,6 +1550,7 @@ tasks:
SSL: "nossl"
ORCHESTRATION_FILE: "versioned-api-testing.json"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-versioned-api-test
vars:
TOPOLOGY: "server"
Expand All @@ -1528,6 +1566,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-kms-tls-test
vars:
KMS_TLS_TESTCASE: "INVALID_CERT"
Expand All @@ -1544,6 +1583,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-kms-tls-test
vars:
KMS_TLS_TESTCASE: "INVALID_HOSTNAME"
Expand All @@ -1560,6 +1600,7 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-kmip-tests
vars:
TOPOLOGY: "server"
Expand All @@ -1575,12 +1616,14 @@ tasks:
AUTH: "noauth"
SSL: "nossl"
- func: start-cse-servers
#- func: start-mongoproxy
- func: run-retry-kms-requests

- name: "test-serverless"
tags: ["serverless"]
commands:
- func: start-cse-servers
#- func: start-mongoproxy
- func: "run-serverless-tests"
vars:
MONGO_GO_DRIVER_COMPRESSOR: "snappy"
Expand Down
8 changes: 4 additions & 4 deletions .evergreen/run-task.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
#
# Source the env.sh file and run the given task
set -eu
set -exu

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
PROJECT_DIRECTORY=$(dirname $SCRIPT_DIR)
pushd ${PROJECT_DIRECTORY} > /dev/null
pushd ${PROJECT_DIRECTORY} >/dev/null

source env.sh
task "$@"

popd > /dev/null
popd >/dev/null
19 changes: 10 additions & 9 deletions .evergreen/setup-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -eu

# Set up default environment variables.
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
PROJECT_DIRECTORY=$(dirname $SCRIPT_DIR)
pushd $PROJECT_DIRECTORY
ROOT_DIR=$(dirname $PROJECT_DIRECTORY)
Expand Down Expand Up @@ -40,18 +40,19 @@ PATH="${GOROOT}/bin:${GOPATH}/bin:${MONGODB_BINARIES}:${EXTRA_PATH}:${PATH}"

# Get the current unique version of this checkout.
if [ "${IS_PATCH:-}" = "true" ]; then
CURRENT_VERSION=$(git describe)-patch-${VERSION_ID}
CURRENT_VERSION=$(git describe)-patch-${VERSION_ID}
else
CURRENT_VERSION=latest
CURRENT_VERSION=latest
fi

# Ensure a checkout of drivers-tools.
if [ ! -d "$DRIVERS_TOOLS" ]; then
git clone https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS
#git clone https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS
git clone -b DRIVERS-2884-mongoproxy https://github.com/prestonvasquez/drivers-evergreen-tools $DRIVERS_TOOLS
fi

# Write the .env file for drivers-tools.
cat <<EOT > ${DRIVERS_TOOLS}/.env
cat <<EOT >${DRIVERS_TOOLS}/.env
SKIP_LEGACY_SHELL=1
DRIVERS_TOOLS="$DRIVERS_TOOLS"
MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME"
Expand All @@ -67,7 +68,7 @@ go env
go install github.com/go-task/task/v3/cmd/[email protected]

# Write our own env file.
cat <<EOT > env.sh
cat <<EOT >env.sh
export GOROOT="$GOROOT"
export GOPATH="$GOPATH"
export GOCACHE="$GOCACHE"
Expand All @@ -78,12 +79,12 @@ export PATH="$PATH"
EOT

if [ "Windows_NT" = "$OS" ]; then
echo "export USERPROFILE=$USERPROFILE" >> env.sh
echo "export HOME=$HOME" >> env.sh
echo "export USERPROFILE=$USERPROFILE" >>env.sh
echo "export HOME=$HOME" >>env.sh
fi

# source the env.sh file and write the expansion file.
cat <<EOT > expansion.yml
cat <<EOT >expansion.yml
CURRENT_VERSION: "$CURRENT_VERSION"
DRIVERS_TOOLS: "$DRIVERS_TOOLS"
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
Expand Down
2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ tasks:

setup-encryption: bash etc/setup-encryption.sh

start-mongoproxy: bash etc/start-mongoproxy.sh

evg-test:
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=$MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s -p 1 ./... >> test.suite

Expand Down
6 changes: 6 additions & 0 deletions etc/start-mongoproxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
#
# Set up environment and write env.sh and expansion.yml files.
set -eux

bash $DRIVERS_TOOLS/.evergreen/start-mongoproxy.sh
Loading