-
Notifications
You must be signed in to change notification settings - Fork 31
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 storage via sequence run page #1468
Conversation
@@ -257,7 +268,7 @@ public void appendToFile(Path target, SequenceFile file) throws IOException { | |||
try (FileChannel out = FileChannel.open(target, StandardOpenOption.CREATE, StandardOpenOption.APPEND, | |||
StandardOpenOption.WRITE)) { | |||
try (FileChannel in = new FileInputStream(iridaTemporaryFile.getFile().toFile()).getChannel()) { | |||
for (long p = 0, l = in.size(); p < l;) { | |||
for (long p = 0, l = in.size(); p < l; ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck> reported by reviewdog 🐶
';' is followed by whitespace.
@@ -151,7 +164,7 @@ public void appendToFile(Path target, SequenceFile file) throws IOException { | |||
try (FileChannel out = FileChannel.open(target, StandardOpenOption.CREATE, StandardOpenOption.APPEND, | |||
StandardOpenOption.WRITE)) { | |||
try (FileChannel in = FileChannel.open(file.getFile(), StandardOpenOption.READ)) { | |||
for (long p = 0, l = in.size(); p < l;) { | |||
for (long p = 0, l = in.size(); p < l; ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck> reported by reviewdog 🐶
';' is followed by whitespace.
@@ -234,7 +243,7 @@ public void appendToFile(Path target, SequenceFile file) throws IOException { | |||
try (FileChannel out = FileChannel.open(target, StandardOpenOption.CREATE, StandardOpenOption.APPEND, | |||
StandardOpenOption.WRITE)) { | |||
try (FileChannel in = new FileInputStream(iridaTemporaryFile.getFile().toFile()).getChannel()) { | |||
for (long p = 0, l = in.size(); p < l;) { | |||
for (long p = 0, l = in.size(); p < l; ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck> reported by reviewdog 🐶
';' is followed by whitespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 notes:
-
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? -
A bug occurs when removing a run via the admin sequencing run screen, when sequencing files have manually been removed.
Then the run gets removed via the admin sequencing run screen, then go back to the project to see this
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is looking good just one thing below for now. I still need to test it out
...efacility/bioinformatics/irida/repositories/filesystem/IridaFileStorageAzureUtilityImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good..seems to be working as expected. Just a few small things below
...ility/bioinformatics/irida/repositories/filesystem/FilesystemSupplementedRepositoryImpl.java
Outdated
Show resolved
Hide resolved
.../corefacility/bioinformatics/irida/ria/integration/cloud/IridaFileStorageAwsUtilityTest.java
Show resolved
Hide resolved
.../corefacility/bioinformatics/irida/ria/integration/cloud/IridaFileStorageAwsUtilityTest.java
Outdated
Show resolved
Hide resolved
.../corefacility/bioinformatics/irida/ria/integration/cloud/IridaFileStorageAwsUtilityTest.java
Outdated
Show resolved
Hide resolved
...orefacility/bioinformatics/irida/ria/integration/cloud/IridaFileStorageAzureUtilityTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see 655f175.
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.
I confirmed it's happening in development too. It only leaves the sample on the page, the underlying files are all removed correctly.
Code looks great too.
Description of changes
Added functionality to delete sequence files from file storage (local, Azure, and AWS) when removing a sequence run.
Related issue
#1125
Checklist
Things for the developer to confirm they've done before the PR should be accepted:
[ ] User documentation updated for UI or technical changes.