-
Notifications
You must be signed in to change notification settings - Fork 444
feat: add databaseMirroringPartner event handler
#1671
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
feat: add databaseMirroringPartner event handler
#1671
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1671 +/- ##
==========================================
- Coverage 78.82% 78.80% -0.02%
==========================================
Files 90 90
Lines 4887 4888 +1
Branches 920 920
==========================================
Hits 3852 3852
- Misses 736 737 +1
Partials 299 299 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@arthurschreiber Just curious if this can be merged anytime soon? I am still using a custom fork of this package to support my MSSQL connections, and would greatly appreciate being able to switch back to the official version once this is merged in. Let me know if you need any changes to the PR in order to proceed. Thanks! |
|
@arthurschreiber Is it possible to get this PR merged sometime in the near future? We have been maintaining a fork of tedious while waiting on this PR to be merged, and would appreciate being able to swap back to the official version. |
|
@arthurschreiber Checking in again as to if this can be merged anytime soon, I am still required to use a custom fork of tedious for my MSSQL projects due to this fix not yet being merged into master. Let me know if I can provide any assistance. Thanks! |
|
🎉 This PR is included in version 19.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR is to fix #1669, where the library throws an unhandled exception if it encounters an
ENVCHANGEevent of typeDATABASE_MIRRORING_PARTNER.This behavior isn't explicitly documented, but there have been a few issues brought up regarding this functionality in the past, and it has been stated that tedious does not plan to support failover partners. While that may be the case, this event being emitted by SQL Server is causing Tedious to crash completely rather than simply ignoring it as you would expect.
The changes in this PR are to create the
databaseMirroringPartnerevent emitter and register the necessary handler methods in the associated token handler classes, to prevent the default behavior of throwing anUnexpected tokenerror.To clarify, this does not implement mirroring functionality or anything of the sort, it simply updates the default behavior to allow the event to pass through and be ignored, rather than unnecessarily throwing an unhandled exception.