BUG: DejaCode scan_single_package for previously failed scans results in bad request #222
Labels
bug
Something isn't working
design needed
Design details needed to complete the issue
enhancement
New feature or request
Describe the bug
When DejaCode is tasked with analyzing an SBOM it roughly performs two steps:
load_sbom
pipeline in ScanCode.io and import the packages into the inventoryscan_single_package
for each of the entries in the inventoryDue to unforseen circumstance it can happen that a
scan_single_package
pipeline fails in ScanCode.io. If one attempts to load another SBOM or rerun the scan through Action > Scan all packages, this results in Bad Request HTTP 400 responses. ScanCode.io rejects the requests to/api/projects
with{"name":["project with this name already exists."]}
.It seems this can only be fixed by manually deleting the failed projects in ScanCode.io. For the end user is not clear why the package scan does not start and if only some are affected, it may even go entirely unnoticed resulting in incomplete data for the product in DejaCode.
To Reproduce
Setup DejaCode to use a ScanCode.io instance.
Steps to reproduce the behavior:
load_sbom
has completed e.g. terminate it, interrupt connection to DBObserve in the logs that ScanCode.io complains about Bad Requests and pipeline not being restarted.
Expected behavior
The expected behavior is that DejaCode would either restart the pipeline if it already exists or deletes and recreates it. Perhaps behavior could also be changed on ScanCode.io's side where a call to an existing project simply restarts the pipeline.
Screenshots
Example requests and response (IPs, URLs and tokens replaced with dummy data)
Context (OS, Browser, Device, etc.):
n.a.
The text was updated successfully, but these errors were encountered: