media-insights-on-aws icon indicating copy to clipboard operation
media-insights-on-aws copied to clipboard

DELETE /metadata/:Asset_id should also delete entries inside mieWorkflowExecution-table

Open kamudadreieck opened this issue 3 years ago • 1 comments

Describe the bug When deleting an asset via the dataplane api, everything connected should be erased, also the workflow execution data inside the mieWorkflowExecution dynamo-db table.

Currently the data only in the mieDataplaneTable is deleted. The rows in mieWorkflowExecution are preserved. If some workflows are stuck because of waiting for some input or some other errors, they count still to MaxConcurrentWorkflows, even after they are deleted.

To Reproduce Start a new workflow, delete it and inspect the mieWorkflowExecution table. In app.py:1018 you can see that only the table mieDataplaneTable is considered.

Expected behavior After deletion of assets / workflows via the dataplane deletion endpoint, all entries for this asset should either be deleted, or marked as stale, so that they do not count towards the max execution limit.

  • [x] Region: [e.g. eu-west-1]
  • [ ] Was the solution modified from the version published on this repository?
  • [ ] If the answer to the previous question was yes, are the changes available on GitHub?
  • [x] Have you checked your service quotas for the sevices this solution uses?
  • [ ] Were there any errors in the CloudWatch Logs?

Screenshots DELETE request, successfull image

But entry still in database (1632745142.246491 = 27.09.2021 12:19:02.246) image

Additional context Thanks for your help!

kamudadreieck avatar Oct 04 '21 13:10 kamudadreieck

Thanks for this bug report.

ianwow avatar Oct 04 '21 16:10 ianwow