phac-nml / irida

Canada’s Integrated Rapid Infectious Disease Analysis Platform for Genomic Epidemiology
https://irida.ca
Apache License 2.0
40 stars 31 forks source link

Delete sequence files from file storage via sequence run page #1468

Closed ksierks closed 1 year ago

ksierks commented 1 year ago

Description of changes

Added functionality to delete sequence files from file storage (local, Azure, and AWS) when removing a sequence run.

image

Related issue

1125

Checklist

Things for the developer to confirm they've done before the PR should be accepted:

ksierks commented 1 year ago

2 notes:

  1. When removing a run via the admin sequencing run screen, only the unzipped files are deleted, and the gzipped files remain. This can be seen by running ls /tmp/irida/sequence-files/*/* Is this intended behaviour?
  2. A bug occurs when removing a run via the admin sequencing run screen, when sequencing files have manually been removed.

Here 1 file has been deleted image

Then the run gets removed via the admin sequencing run screen, then go back to the project to see this image

I found it easiest to test these cases by removing all the files in /tmp/irida/sequence-files/ and /tmp/irida/output-files/ , and start irida with a new db each time

Thanks for the review, Jeff.

  1. Please see 655f175642941d08147fe4fdeb8c463ce3297893.
  2. I'm not introducing this bug in this PR. I believe it exists in development. When the file is removed from the sample, so is the sequencing object. When the sequencing object is removed it breaks the link to the sequencing run. Will address this in a future PR.