submit a workflow through /vre-api/api/workflows/submit
→ a workflow object is added to the db
create a data product object referencing
delete the workflow from Argo
access /vre-api/api/workflows/
→ because the workflow was deleted from argo, we attempt to remove the corresponding workflow object from the db
→ this triggers a foreign key constraint violation because the wf is still referenced by the data product:
django.db.utils.IntegrityError: update or delete on table "workflows_workflow" violates foreign key constraint "data_products_datapr_workflow_id_4d36ce10_fk_workflows" on table "data_products_dataproduct"
DETAIL: Key (argo_id)=(n-a-a-vre-user-p5rnp) is still referenced from table "data_products_dataproduct".
Steps to reproduce:
/vre-api/api/workflows/submit
→ a workflow object is added to the db/vre-api/api/workflows/
→ because the workflow was deleted from argo, we attempt to remove the corresponding workflow object from the db → this triggers a foreign key constraint violation because the wf is still referenced by the data product: