Skip to content

fix: #900 replace callback implementation by the promise one#901

Open
vvandens wants to merge 1 commit into
loopbackio:masterfrom
vvandens:fix/900-mongodb-callback
Open

fix: #900 replace callback implementation by the promise one#901
vvandens wants to merge 1 commit into
loopbackio:masterfrom
vvandens:fix/900-mongodb-callback

Conversation

@vvandens

@vvandens vvandens commented Jul 1, 2026

Copy link
Copy Markdown

Starting from version 5, the mongodb node driver removed callback support in favor of promises only. This PR fixes the commit and rollback implementation of the connector.
No extra test needed. It is already covered by the transaction one (that is skipped...).

Fixes #900

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Commit messages are following our guidelines

@vvandens vvandens requested review from achrinza and dhmlau as code owners July 1, 2026 13:52
@vvandens vvandens force-pushed the fix/900-mongodb-callback branch from fddd595 to 77f95d4 Compare July 1, 2026 14:05
@achrinza achrinza force-pushed the fix/900-mongodb-callback branch from 77f95d4 to 24b3a47 Compare July 1, 2026 14:17
Signed-off-by: Vincent Vandenschrick <vvandens@gmail.com>
@vvandens vvandens force-pushed the fix/900-mongodb-callback branch from 24b3a47 to 568b12b Compare July 1, 2026 14:18

@achrinza achrinza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the quick PR turnaround! All LGTM 👍

I'll give the other maintainers an opportunity to review this PR if they wish. Otherwise, we'll proceed to merge this after ~one day.

@vvandens

vvandens commented Jul 1, 2026

Copy link
Copy Markdown
Author

Perfect.
It would need a backport to the 7.x branch of course.

@achrinza

achrinza commented Jul 1, 2026

Copy link
Copy Markdown
Member

We can consider backporting to v7 if there's a use-case for it.

From a cursory check, v8's only breaking change is dropping support for Node.js v20, which has already reached End of Life.

Is there any particular blocker that's preventing an upgrade to v8?

@vvandens

vvandens commented Jul 1, 2026

Copy link
Copy Markdown
Author

Not our side. We can definitely upgrade to V8.
But it's a pretty big issue IMHO. It makes the whole 7.x versions unusable as soon as you use transactions. As of now, we have monkey-patched the prototype at runtime.

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.

commit / rollback are stuck forever

2 participants