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

DRIVERS-716 skip bulkWrite tests on Atlas Serverless #1636

Merged
merged 7 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all 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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ schemaVersion: "1.7"

runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down
4 changes: 4 additions & 0 deletions source/crud/bulk-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,10 @@ the initial implementation and testing of the new bulk write API, but may be rev

## Q&A

### Is `bulkWrite` supported on Atlas Serverless?

No. See [CLOUDP-256344](https://jira.mongodb.org/browse/CLOUDP-256344)

### Why are we adding a new bulk write API rather than updating the `MongoCollection.bulkWrite` implementation?

The new `bulkWrite` command is only available in MongoDB 8.0+, so it cannot function as a drop-in replacement for the
Expand Down
25 changes: 13 additions & 12 deletions source/crud/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ WriteError's `details` property.
Test that `MongoClient.bulkWrite` properly handles `writeModels` inputs containing a number of writes greater than
`maxWriteBatchSize`.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) with
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -98,7 +98,7 @@ command. Assert that the length of `firstEvent.command.ops` is `maxWriteBatchSiz
Test that `MongoClient.bulkWrite` properly handles a `writeModels` input which constructs an `ops` array larger than
`maxMessageSizeBytes`.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) with
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -137,7 +137,7 @@ driver exposes `operationId`s in its CommandStartedEvents, assert that `firstEve

Test that `MongoClient.bulkWrite` properly collects and reports `writeConcernError`s returned in separate batches.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) with `retryWrites: false` configured and
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -182,7 +182,7 @@ Assert that two CommandStartedEvents were observed for the `bulkWrite` command.

Test that `MongoClient.bulkWrite` handles individual write errors across batches for ordered and unordered bulk writes.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) with
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -237,7 +237,7 @@ Assert that one CommandStartedEvent was observed for the `bulkWrite` command.

Test that `MongoClient.bulkWrite` properly iterates the results cursor when `getMore` is required.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) with
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -276,7 +276,8 @@ Assert that a CommandStartedEvent was observed for the `getMore` command.
Test that `MongoClient.bulkWrite` executed within a transaction properly iterates the results cursor when `getMore` is
required.

This test must only be run on 8.0+ servers. This test must not be run against standalone servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless. This test must not be run
against standalone servers.

Construct a `MongoClient` (referred to as `client`) with
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -318,7 +319,7 @@ Assert that a CommandStartedEvent was observed for the `getMore` command.

Test that `MongoClient.bulkWrite` properly handles a failure that occurs when attempting a `getMore`.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) with
[command monitoring](../../command-logging-and-monitoring/command-logging-and-monitoring.rst) enabled to observe
Expand Down Expand Up @@ -369,7 +370,7 @@ Assert that a CommandStartedEvent was observed for the `killCursors` command.

### 10. `MongoClient.bulkWrite` returns error for unacknowledged too-large insert

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`).

Expand Down Expand Up @@ -423,7 +424,7 @@ Expect a client-side error due the size.
Test that `MongoClient.bulkWrite` batch splits a bulk write when the addition of a new namespace to `nsInfo` causes the
size of the message to exceed `maxMessageSizeBytes - 1000`.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Repeat the following setup for each test case:

Expand Down Expand Up @@ -603,8 +604,8 @@ remainingBulkWriteBytes = maxMessageSizeBytes - 1122
Test that `MongoClient.bulkWrite` returns an error if an operation provided exceeds `maxMessageSizeBytes` such that an
empty `ops` payload would be sent.

This test must only be run on 8.0+ servers. This test may be skipped by drivers that are not able to construct
arbitrarily large documents.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless. This test may be skipped by
drivers that are not able to construct arbitrarily large documents.

Construct a `MongoClient` (referred to as `client`). Perform a `hello` command using `client` and record the
`maxMessageSizeBytes` value contained in the response.
Expand Down Expand Up @@ -649,7 +650,7 @@ This test is expected to be removed when [DRIVERS-2888](https://jira.mongodb.org

Test that `MongoClient.bulkWrite` returns an error if the client has auto-encryption configured.

This test must only be run on 8.0+ servers.
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.

Construct a `MongoClient` (referred to as `client`) configured with the following `AutoEncryptionOpts`:

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite delete options"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ description: "client bulkWrite errorResponse"
schemaVersion: "1.12"
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down
3 changes: 2 additions & 1 deletion source/crud/tests/unified/client-bulkWrite-errors.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions source/crud/tests/unified/client-bulkWrite-errors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ description: "client bulkWrite errors"
schemaVersion: "1.21"
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite with mixed namespaces"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down
5 changes: 3 additions & 2 deletions source/crud/tests/unified/client-bulkWrite-options.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion source/crud/tests/unified/client-bulkWrite-options.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite top-level options"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down
5 changes: 3 additions & 2 deletions source/crud/tests/unified/client-bulkWrite-ordered.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion source/crud/tests/unified/client-bulkWrite-ordered.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite with ordered option"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down
5 changes: 3 additions & 2 deletions source/crud/tests/unified/client-bulkWrite-results.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion source/crud/tests/unified/client-bulkWrite-results.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite results"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite update options"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
description: "client bulkWrite update pipeline"
schemaVersion: "1.1"
schemaVersion: "1.4" # To support `serverless: forbid`
runOnRequirements:
- minServerVersion: "8.0"
serverless: forbid

createEntities:
- client:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

description: "retryable writes handshake failures"

schemaVersion: "1.3"
schemaVersion: "1.4" # For `serverless: forbid`

runOnRequirements:
- minServerVersion: "4.2"
Expand Down Expand Up @@ -54,6 +54,7 @@ tests:
{%- if (operation.operation_name == 'clientBulkWrite') %}
runOnRequirements:
- minServerVersion: "8.0" # `bulkWrite` added to server 8.0
serverless: forbid
{%- endif %}
operations:
- name: failPoint
Expand Down Expand Up @@ -102,6 +103,7 @@ tests:
{%- if (operation.operation_name == 'clientBulkWrite') %}
runOnRequirements:
- minServerVersion: "8.0" # `bulkWrite` added to server 8.0
serverless: forbid
{%- endif %}
operations:
- name: failPoint
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ runOnRequirements:
- replicaset
- sharded
- load-balanced
serverless: forbid

createEntities:
- client:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ runOnRequirements:
- replicaset
- sharded
- load-balanced
serverless: forbid

createEntities:
- client:
Expand Down
Loading
Loading