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

[Imaging Uploader] Prevent upload duplication and handle other mriFile statuses #3150

Merged
merged 6 commits into from
Oct 18, 2017

Conversation

davidblader
Copy link
Contributor

@davidblader davidblader commented Sep 15, 2017

https://redmine.cbrain.mcgill.ca/issues/13190
https://redmine.cbrain.mcgill.ca/issues/13194
When retrieving the list of MRI's, _getFileList will only append files which already exist in the incoming data directory. However these files get deleted when the MRI pipeline runs successfully, allowing for duplicate uploads for previously successful files. It can be assumed that the insertion was successful based on the number of MINCs inserted being > 0. Use this in addition to file existence to generate the mriList which gets checked when an upload form is submitted

@davidblader davidblader added the Category: Bug PR or issue that aims to report or fix a bug label Sep 15, 2017
@davidblader davidblader added this to the 17.2 milestone Sep 15, 2017
@@ -101,6 +101,17 @@ class UploadForm extends React.Component {
return;
}

// File in the middle of insertion pipeline
if (mriFile.status === "In progress") {
Copy link
Contributor

Choose a reason for hiding this comment

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

In Progress; it is case sensitive I think

@MounaSafiHarab
Copy link
Contributor

@davidblader

works for me now;
for the In Progress... case, I get the correct error message after I refresh Imaging Uploader page only

imaguploader

@MounaSafiHarab MounaSafiHarab added the Passed manual tests PR has been successfully tested by at least one peer label Sep 19, 2017
@MounaSafiHarab
Copy link
Contributor

@driusan

I am assuming this fix can not make it into 17.1; it has to be in 17.2?

@driusan
Copy link
Collaborator

driusan commented Sep 21, 2017

Why can't it go into 18.0.1? (Or whatever the .z is by the time the backlog of open PRs is by the time it catches up to this..)

@MounaSafiHarab
Copy link
Contributor

Okay @driusan
it is a bug fix, so I hope it can make it into the next bug fix release.

@driusan driusan removed this from the 18.1 milestone Oct 2, 2017
@driusan driusan changed the base branch from 17.1-dev to bugfix October 5, 2017 17:59
$filePath = $row[5];
$mincInserted = $row[10];
Copy link
Collaborator

Choose a reason for hiding this comment

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

@davidblader is there a risk of these hard coded values being different from a project to another ? if so, a redmine ticket should be issued in parallell to flag this for change in a minor version

ridz1208
ridz1208 previously approved these changes Oct 11, 2017
@ridz1208
Copy link
Collaborator

@driusan to the limited extent of my knowledge, this looks good.but make sure to review it more thoroughly since its on the MRI side of things

@driusan driusan added this to the 18.0.2 milestone Oct 12, 2017
@driusan driusan added the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Oct 12, 2017
@driusan
Copy link
Collaborator

driusan commented Oct 12, 2017

@davidblader This has conflicts that need to be resolved

@davidblader davidblader removed the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Oct 12, 2017
Copy link
Contributor

@MounaSafiHarab MounaSafiHarab left a comment

Choose a reason for hiding this comment

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

The changes are good in my opinion (and I tested it too!). The changes handle the 2 other possible cases of insertion being in progress or not started

@driusan driusan merged commit 4d587ea into aces:bugfix Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug PR or issue that aims to report or fix a bug Passed manual tests PR has been successfully tested by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants