DependencyTrack / DependencyTrack/dependency-track
Parallel analysis BomUploadProcessTask
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior:
Currently, everything works as an event. The problem is when I send X reviews (bom upload) at the same time, it starts to create events and send them to the queue waiting to be processed for a worker and you get the result of the first review almost when the X review has finished.
### Proposed Behavior:
I would like that BomUploadProcessTask would be asynchronous, but the rest of events that this process task calls, were synchronous. This way, it assures you that when you launch a review, it will be process this review from the beginning until the end of it before starting with other reviews. This way, you will get the response of the first review before waiting the others doing many stuff. Even, it could be parametrised at the config file.
I have tested it with a no-elegant solution but it works. It would be something like this with all dispatch events that BomUploadProcessingTask calls:
For example, In BomUploadProcessingTask, instead of:
```
final VulnerabilityAnalysisEvent vae = new VulnerabilityAnalysisEvent(detachedFlattenedComponent).project(detachedProject);
vae.setChainIdentifier(event.getChainIdentifier());
Event.dispatch(vae);
```
do something like this:
```
final VulnerabilityAnalysisEvent vae = new VulnerabilityAnalysisEvent(detachedFlattenedComponent).project(detachedProject);
vae.setChainIdentifier(event.getChainIdentifier());
final VulnerabilityAnalysisTask vat = new VulnerabilityAnalysisTask();
vat.inform(vae);
```
Contributor guide
Assessment
This issue has not been assessed yet.