-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
Use Case
As a driver engineer,
I want our FLE logic to use async-await,
So that it is easier to debug, it is easier to maintain and we can ensure we catch errors thrown.
User Impact
n/a - should be internal refactor.
Dependencies
n/a
Unknowns
n/a
Acceptance Criteria
Implementation Requirements
- Remove callbacks from `MongocryptdManager`, `StateMachine` and `AutoEncrypter` and refactor the methods to be async-await.
- Adjust any places in the driver that consume these APIs.
- Make `Encrypter.close` async.
- Update all tests in FLE and the driver to use async/await or promises where they were using callbacks.
- Update the StateMachine's parsing of TLS options to be async
- Remove `common.js` now that maybePromise and promiseOrCallback are unused
Testing Requirements
- Our unit tests for MongocryptdManager, StateMachine and AutoEncrypter mock the internal APIs we are modifying. We'll need to update the unit tests to stub async functions instead of stubbing callback functions.
Documentation Requirements
- n/a
Follow Up Requirements
- n/a