From c0cec750059511bfb6f43089592299fb6677d8d0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 14 May 2024 09:43:10 -0500 Subject: [PATCH 1/3] GODRIVER-3157 [master] Skip Serverless Proxy test that requires failpoint on hello. (#1641) Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com> --- .evergreen/config.yml | 3 +++ etc/run-serverless-test.sh | 1 + .../integration/unified/unified_spec_runner.go | 16 +++++++++++++--- testdata/load-balancers/sdam-error-handling.json | 4 ++-- testdata/load-balancers/sdam-error-handling.yml | 4 ++-- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 6ad715e580..f446359bd4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -559,6 +559,8 @@ functions: working_dir: src/go.mongodb.org/mongo-driver script: | ${PREPARE_SHELL} + + IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \ bash etc/run-serverless-test.sh run-atlas-data-lake-test: @@ -2109,6 +2111,7 @@ axes: display_name: "Serverless Proxy" variables: VAULT_NAME: "serverless_next" + IS_SERVERLESS_PROXY: "true" task_groups: - name: serverless_task_group diff --git a/etc/run-serverless-test.sh b/etc/run-serverless-test.sh index 9d858a0610..95c7d28ff3 100644 --- a/etc/run-serverless-test.sh +++ b/etc/run-serverless-test.sh @@ -5,6 +5,7 @@ source ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh AUTH="auth" \ SSL="ssl" \ MONGODB_URI="${SERVERLESS_URI}" \ + IS_SERVERLESS_PROXY="${IS_SERVERLESS_PROXY}" \ SERVERLESS="serverless" \ MAKEFILE_TARGET=evg-test-serverless \ sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh diff --git a/internal/integration/unified/unified_spec_runner.go b/internal/integration/unified/unified_spec_runner.go index 42baa22ecf..af71caa44a 100644 --- a/internal/integration/unified/unified_spec_runner.go +++ b/internal/integration/unified/unified_spec_runner.go @@ -10,6 +10,7 @@ import ( "context" "fmt" "io/ioutil" + "os" "path" "strings" "testing" @@ -23,7 +24,7 @@ import ( ) var ( - skippedTestDescriptions = map[string]string{ + skippedTests = map[string]string{ // GODRIVER-1773: This test runs a "find" with limit=4 and batchSize=3. It expects batchSize values of three for // the "find" and one for the "getMore", but we send three for both. "A successful find event with a getmore and the server kills the cursor (<= 4.4)": "See GODRIVER-1773", @@ -56,6 +57,10 @@ var ( "unpin when a non-transaction read operation uses a session": "Implement GODRIVER-3034", } + skippedServerlessProxyTests = map[string]string{ + "errors during the initial connection hello are ignored": "Serverless Proxy does not support failpoints on hello (see GODRIVER-3157)", + } + logMessageValidatorTimeout = 10 * time.Millisecond lowHeartbeatFrequency = 50 * time.Millisecond ) @@ -245,8 +250,13 @@ func (tc *TestCase) Run(ls LoggerSkipper) error { if tc.SkipReason != nil { ls.Skipf("skipping for reason: %q", *tc.SkipReason) } - if skipReason, ok := skippedTestDescriptions[tc.Description]; ok { - ls.Skipf("skipping due to known failure: %v", skipReason) + if skipReason, ok := skippedTests[tc.Description]; ok { + ls.Skipf("skipping due to known failure: %q", skipReason) + } + // If we're running against a Serverless Proxy instance, also check the + // tests that should be skipped only for Serverless Proxy. + if skipReason, ok := skippedServerlessProxyTests[tc.Description]; ok && os.Getenv("IS_SERVERLESS_PROXY") == "true" { + ls.Skipf("skipping due to known failure with Serverless Proxy: %q", skipReason) } // Validate that we support the schema declared by the test file before attempting to use its contents. diff --git a/testdata/load-balancers/sdam-error-handling.json b/testdata/load-balancers/sdam-error-handling.json index b9a11f2527..083c98e941 100644 --- a/testdata/load-balancers/sdam-error-handling.json +++ b/testdata/load-balancers/sdam-error-handling.json @@ -1,6 +1,6 @@ { "description": "state change errors are correctly handled", - "schemaVersion": "1.3", + "schemaVersion": "1.4", "runOnRequirements": [ { "topologies": [ @@ -260,7 +260,7 @@ ] }, { - "description": "errors during the initial connection hello are ignore", + "description": "errors during the initial connection hello are ignored", "runOnRequirements": [ { "minServerVersion": "4.9" diff --git a/testdata/load-balancers/sdam-error-handling.yml b/testdata/load-balancers/sdam-error-handling.yml index 0f93b8a249..fdaba25149 100644 --- a/testdata/load-balancers/sdam-error-handling.yml +++ b/testdata/load-balancers/sdam-error-handling.yml @@ -1,6 +1,6 @@ description: state change errors are correctly handled -schemaVersion: '1.3' +schemaVersion: '1.4' runOnRequirements: - topologies: [ load-balanced ] @@ -139,7 +139,7 @@ tests: # This test uses singleClient to ensure that connection attempts are routed # to the same mongos on which the failpoint is set. - - description: errors during the initial connection hello are ignore + - description: errors during the initial connection hello are ignored runOnRequirements: # Server version 4.9+ is needed to set a fail point on the initial # connection handshake with the appName filter due to SERVER-49336. From 1073c88603fa451165f81da11c800cfa2ad1d18f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 14 May 2024 14:45:56 -0500 Subject: [PATCH 2/3] GODRIVER-3216 [master] Run go mod tidy before lambda test (#1635) --- .evergreen/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index f446359bd4..97bf1299a5 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1946,6 +1946,9 @@ tasks: include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"] script: | ${PREPARE_SHELL} + pushd $TEST_LAMBDA_DIRECTORY/mongodb + go mod tidy + popd ./.evergreen/run-deployed-lambda-aws-tests.sh - name: "test-search-index" From 5296166330672a90f3f672933cdaddc4d3cf4a36 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 17 May 2024 09:15:55 -0400 Subject: [PATCH 3/3] GODRIVER-3218 [master] Skip Aggregation with Crud Tests on 8.0+ (#1643) --- testdata/crud/unified/aggregate-write-readPreference.json | 3 ++- testdata/crud/unified/aggregate-write-readPreference.yml | 2 ++ testdata/crud/unified/db-aggregate-write-readPreference.json | 3 ++- testdata/crud/unified/db-aggregate-write-readPreference.yml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/testdata/crud/unified/aggregate-write-readPreference.json b/testdata/crud/unified/aggregate-write-readPreference.json index bc887e83cb..b50592a98f 100644 --- a/testdata/crud/unified/aggregate-write-readPreference.json +++ b/testdata/crud/unified/aggregate-write-readPreference.json @@ -91,7 +91,8 @@ "runOnRequirements": [ { "minServerVersion": "5.0", - "serverless": "forbid" + "serverless": "forbid", + "maxServerVersion": "7.99" } ], "operations": [ diff --git a/testdata/crud/unified/aggregate-write-readPreference.yml b/testdata/crud/unified/aggregate-write-readPreference.yml index 86f5a4399c..4959588095 100644 --- a/testdata/crud/unified/aggregate-write-readPreference.yml +++ b/testdata/crud/unified/aggregate-write-readPreference.yml @@ -60,6 +60,8 @@ tests: runOnRequirements: - minServerVersion: "5.0" serverless: "forbid" + # GODRIVER-3218 + maxServerVersion: "7.99" operations: - object: *collection0 name: aggregate diff --git a/testdata/crud/unified/db-aggregate-write-readPreference.json b/testdata/crud/unified/db-aggregate-write-readPreference.json index 2a81282de8..10f583269c 100644 --- a/testdata/crud/unified/db-aggregate-write-readPreference.json +++ b/testdata/crud/unified/db-aggregate-write-readPreference.json @@ -65,7 +65,8 @@ "runOnRequirements": [ { "minServerVersion": "5.0", - "serverless": "forbid" + "serverless": "forbid", + "maxServerVersion": "7.99" } ], "operations": [ diff --git a/testdata/crud/unified/db-aggregate-write-readPreference.yml b/testdata/crud/unified/db-aggregate-write-readPreference.yml index 04a3b2169f..eb0fb09bd0 100644 --- a/testdata/crud/unified/db-aggregate-write-readPreference.yml +++ b/testdata/crud/unified/db-aggregate-write-readPreference.yml @@ -53,6 +53,8 @@ tests: runOnRequirements: - minServerVersion: "5.0" serverless: "forbid" + # GODRIVER-3218 + maxServerVersion: "7.99" operations: - object: *database0 name: aggregate