Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete sequence files from file system via cleanup script #1469

Merged
merged 20 commits into from
Mar 9, 2023

Conversation

ksierks
Copy link
Contributor

@ksierks ksierks commented Feb 16, 2023

Description of changes

Created a script to delete sequence files from local file system that have already been previously deleted from the database.
Previously deleted sequence files are retrieved from the audit table, because of the inconsistent way they are removed within IRIDA.
The intention is for this script to be run once to do an initial cleanup the file system. There will be subsequent PRs addressing ongoing file clean up.

Steps to test

  • create a new sequence run via the irida_uploader
  • login to IRIDA as admin and delete the newly created sequence run
  • run the purge_sequence_files script.py

Related issue

#1125

Checklist

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

  • CHANGELOG.md (and UPGRADING.md if necessary) updated with information for new change.
  • [ ] Tests added (or description of how to test) for any new features.
  • [ ] User documentation updated for UI or technical changes.

@ksierks ksierks changed the title Delete sequence files from file system - Cleanup Script Delete sequence files from file system via cleanup script Feb 16, 2023
@ksierks ksierks marked this pull request as ready for review February 20, 2023 15:13
@ksierks ksierks requested a review from deepsidhu85 February 27, 2023 16:10
@deepsidhu85
Copy link
Contributor

@ksierks Hi Katherine, I see that the script cleans up files on the local file storage system but not from cloud storage (aws, azure). Are you planning on adding that in here or in another PR?

@ksierks
Copy link
Contributor Author

ksierks commented Feb 27, 2023

@ksierks Hi Katherine, I see that the script cleans up files on the local file storage system but not from cloud storage (aws, azure). Are you planning on adding that in here or in another PR?

Hi Deep. I wasn't planning on it, unless told otherwise. The file system has 10+ years worth of files. IRIDA hasn't been installed in the cloud that I know of. The intention is to only run the script once and have IRIDA cleanup files.

@deepsidhu85
Copy link
Contributor

@ksierks Hi Katherine, I see that the script cleans up files on the local file storage system but not from cloud storage (aws, azure). Are you planning on adding that in here or in another PR?

Hi Deep. I wasn't planning on it, unless told otherwise. The file system has 10+ years worth of files. IRIDA hasn't been installed in the cloud that I know of. The intention is to only run the script once and have IRIDA cleanup files.

Sorry about that Katherine. I missed the part in the description where the ongoing cleanup will be addressed in subsequent prs. Disregard my above comment! :)

Copy link
Contributor

@deepsidhu85 deepsidhu85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Member

@JeffreyThiessen JeffreyThiessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a few small changes.

@ksierks ksierks requested a review from JeffreyThiessen March 3, 2023 22:20
Copy link
Member

@JeffreyThiessen JeffreyThiessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ericenns ericenns removed request for apetkau and ericenns March 9, 2023 20:21
@deepsidhu85 deepsidhu85 merged commit 6cc45a2 into development Mar 9, 2023
@ericenns ericenns deleted the filesystem-cleanup-script branch April 14, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants