feat(34): allow update functions to return the symbol NO_UPDATE - #38
Conversation
No need to count bulk operations, it already counts them itself.
The test didn't work because the validation schema set up in the test fixture was incorrect: - no `_id` field - `properties` and `additionalProperties` no placed under `$jsonSchema`
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
This commit breaks the progress logs, as they are performed by the bulk holders (`BackupBulk`, `MigrationBulk` and `RollbackBulk`), which count the number of documents they are fed. We'll address that next.
As the various `XXXBulkOperation` classes cannot know reliably the number of treated documents, I'm moving the progress logging directly in `MongoBulkDataMigration`.
eba3b9f to
40f6f60
Compare
pp0rtal
left a comment
There was a problem hiding this comment.
@LucVidal360 Perfect with the fix on progress
Thank you for unskipping the extra test too 👍
| if (updateQuery === NO_UPDATE) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
This commit breaks the progress logs, as they are performed by
@LucVidal360 I was first not convinced by this return. I wondered if there was a way to not break the resumability of MBDM. But resumablity relies on update docs anyway which is not even alays possible.
If we choose in the future to store in the backup docs, there will be a little drawback to not store an empty backup, but this is not a big deal.
|
@pp0rtal Help, how can I publish the new 1.8.1 version to npm?
|
Context
updateoption ofMongoBulkDataMigrationcan be a function{ $set: xxx })Changes
NO_UPDATEsymbol