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-3036 Remove the BSON document size validation requirement for the client bulk write operation #1725

Merged

Conversation

stIncMale
Copy link
Member

@stIncMale stIncMale commented Nov 5, 2024

Preview

Please complete the following before merging:

  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded
    clusters, and serverless).

DRIVERS-3036

@stIncMale stIncMale self-assigned this Nov 5, 2024
@stIncMale stIncMale requested a review from a team as a code owner November 5, 2024 22:59
@stIncMale stIncMale requested review from nbbeeken, kevinAlbs, jyemin and isabelatkinson and removed request for a team November 5, 2024 22:59
@stIncMale stIncMale marked this pull request as draft November 5, 2024 23:02
@stIncMale
Copy link
Member Author

stIncMale commented Nov 5, 2024

@jyemin I dislike how the change turned out - the rules became complex for no good reason. I think the spec should stay unchanged, even if its requirement does not match Java's behavior for the rest of commands, especially given that the current (before the PR) spec requirement follows the "Where possible, depend on server to return errors" principle.

source/crud/bulk-write.md Outdated Show resolved Hide resolved
@stIncMale stIncMale changed the title Update the requirements regarding the size validation DRIVERS-3036 Update the requirements regarding the size validation Nov 6, 2024
@stIncMale stIncMale requested review from nbbeeken and jyemin and removed request for nbbeeken November 6, 2024 04:23
@stIncMale stIncMale marked this pull request as ready for review November 6, 2024 04:25
@stIncMale
Copy link
Member Author

Does anyone understand why the pre-commit failed? https://github.com/mongodb/specifications/actions/runs/11696304981/job/32573170376?pr=1725

The only error-related info I see there is

Error: Process completed with exit code 1.

and it's not helpful.

@alcaeus
Copy link
Member

alcaeus commented Nov 7, 2024

Does anyone understand why the pre-commit failed?

Opening up the details of the pre-commit task shows the diff it produced: https://github.com/mongodb/specifications/actions/runs/11713782255/job/32627198204?pr=1725#step:4:57

diff --git a/source/crud/bulk-write.md b/source/crud/bulk-write.md
index 569e9a2..8724232 100644
--- a/source/crud/bulk-write.md
+++ b/source/crud/bulk-write.md
@@ -912,8 +912,8 @@ In accordance with the
 ["_Where possible, depend on server to return errors_"](https://github.com/mongodb/specifications/blob/f8dbd2469f18d093f917efa1f758024bca5d3aaa/source/driver-mantras.md#where-possible-depend-on-server-to-return-errors)
 mantra, drivers should rely on the server validating the size. Such reliance is not possible when a server
 acknowledgement is not expected, but for simplicity and given that unacknowledged writes does not provide a way to know
-whether a write succeeded on the server, it does not seem necessary to help an application with that info
-in the specific situation when the BSON document size limit is exceeded.  
+whether a write succeeded on the server, it does not seem necessary to help an application with that info in the
+specific situation when the BSON document size limit is exceeded.
 
 ## **Changelog**

@GromNaN since you already added logic to create a commit for updated JSON test files, do you think we can somehow also apply suggestions from the linter? I suppose it's not as easy if both jobs need to make changes, as the commits may happen near-simultaneously and conflict when pushed.

@stIncMale
Copy link
Member Author

Thanks, @alcaeus, for pointing out what exactly was wrong. I initially failed to interpret the logs correctly.

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the PR. LGTM with minor suggestions.


Does anyone understand why the pre-commit failed?

README > Linting describes how to run locally. Running the following works for me:

pre-commit run --all-files --hook-stage manual mdformat

source/crud/tests/README.md Show resolved Hide resolved
source/crud/bulk-write.md Show resolved Hide resolved
@stIncMale stIncMale requested a review from kevinAlbs November 7, 2024 18:10
@stIncMale stIncMale merged commit 3a4e2da into mongodb:master Nov 8, 2024
5 checks passed
@stIncMale stIncMale deleted the bulkWriteUpdateSizeValidationRequirements branch November 8, 2024 20:09
@stIncMale stIncMale changed the title DRIVERS-3036 Update the requirements regarding the size validation DRIVERS-3036 Remove the BSON document size validation requirement for the client bulk write operation Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants