Implement a Vulnerability::ModificationWrapper to invert callback dependencies
Why are we doing this work
To replace the database trigger for the vulnerability read update without making a massive coding burden for ourselves, we need to implement a callback wrapper that can consult the changes that were made and determine what callbacks to launch implicitly from that. This will reduce development burden and risk of mistakes during further iteration.
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
-
Create a Vulnerability::ModificationWrapper to be wrapped around updates of relevance to callbacks. -
Write a suitable callback interface in this to understand the given changeset and update the vulnerability read accordingly.
A potential implementation was discussed on the epic here regarding how to design the wrapper and callback behaviour.
Verification steps
Verifying this will require Ensure all appropriate sources of vulnerability... (#541894) • Adrien Narinesingh • 18.6 to be implemented so that we can confirm that the subscription to the event works by having events actually submitted.
Ideally we'd then test every feature to ensure that the changes are being synced across correctly.