Generate chain of custody CSV reports asyncronously
Problem
Curently, chain of custody reports are generated synchronously rather than via a background job. This, whilst irritating, isn't an issue right now as they are only consisting of merge commits.
#267601 (closed) wants to expand this to all commits which would potentially greatly increase the size of the download and the amount of time it takes to generate which could result in timeouts. Before implementing that issue, we should change the functionality of the chain of custody reports to generate those reports async via a background worker and send them as an email attachment to the requesting user.
As a single data point, generating a CoC report for gitlab-org/gitlab on staging.gitlab.com takes nearly 1 minute.
Implementation Proposal
- Create a new sidekiq worker to generate the CoC report. (The logic of the generation itself will not change.)
- Create new mailers to send the newly generated report.
- Update the documentation to make it clear that this report is now generated in the background rather than generated inline.
- Update the tooltip to make it clear that this process is now asyncronous.
Current behaviour
graph LR
A[User] -->|Click button| B(Report generates/downloads)
Proposed behaviour
graph LR
C[User] --> |Click button| D[Trigger background generation job] --> E[Email attachment to requesting user]
Edited by Max Woolf