Skip to content

Implement callbacks on applicable models to update vulnerability reads when singular updates are made

Why are we doing this work

While most of this epic will require us to implement the callback wrapper for bulk modifications, we still need the changes to be applied to the Vulnerabilities::Read record when it's sibling records are updated individually.

In these circumstances, it should be possible to use standard Rails callbacks to achieve this change and ensure the needed changes occur.

Relevant links

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

  • Implement Vulnerability::Read callbacks to upsert the necessary changes for:
    • Vulnerability
    • Vulnerabilities::IssueLinks
    • Vulnerabilities::MergeRequestLinks
    • Vulnerabilities::StateTransitions
    • any others that we may modify in the singular and want their data to be propogated to the read.

It will be necessary to insert the transaction config change to deactivate the database trigger for these callbacks to be the source of changes correctly.

Verification steps

Edited by 🤖 GitLab Bot 🤖