DependencyTrack / DependencyTrack/dependency-track
Project can fail to be deleted if a delete is requested whilst BOM processing is occurring
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
If a delete is requested whilst BOM processing is occurring, sometimes you hit this error:
```
ERROR: update or delete on table "PROJECT" violates foreign key constraint "COMPONENT_FK2" on table "COMPONENT" Detail: Key (ID)=(17) is still referenced from table "COMPONENT".
```
The only other reference to this I've seen is in [#2414](https://github.com/DependencyTrack/dependency-track/issues/2414#issuecomment-1412204031).
This isn't a big deal for us, I'm mostly reporting it to help future people searching for the same error understand what's happening.
### Steps to Reproduce
1. Create a project and start importing a BOM
2. Delete the project before BOM processing is finished.
### Expected Behavior
Either:
- the delete request fails, saying that BOM processing is still occurring; or
- the delete request succeeds, and the project is deleted.
### Dependency-Track Version
4.8.2
### Dependency-Track Distribution
Container Image
### Database Server
PostgreSQL
### Database Server Version
15
### Browser
N/A
### Checklist
- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported
Contributor guide
Assessment
This issue has not been assessed yet.