[COMPASS-6252] Investigate changes in NODE-4393: remove public `result` property from BulkWriteResult class Created: 26/Oct/22  Updated: 03/Mar/23  Resolved: 03/Mar/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: PM Bot Assignee: Unassigned
Resolution: Done Votes: 0
Labels: node-driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-4393 Make `result` property from BulkWrite... Closed
Related
related to MONGOSH-1358 Update to driver and bson v5.x Closed
Documentation Changes: Not Needed

 Description   

The BulkWriteResult class has a public property called `result` which contains the raw bulkWrite response.  The class also has getters which just reach into the `result` object to pass nested properties out.

This causes issues with the unified test suite runner for `rewrapManyDataKey` operations because our BulkWriteResult class has extra properties (the `result` property), causing tests to fail.  We worked around this in the test runner by making the property non-enumerable before returning it from the operation handler, but this is not ideal.

Acceptance Criteria

  • Refactor the BulkWriteResult class to set each property in the constructor instead of using getters.

Generated at Wed Feb 07 22:42:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.