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

4605 rsync upload lock issue #4697

Merged
merged 3 commits into from
May 23, 2018
Merged

4605 rsync upload lock issue #4697

merged 3 commits into from
May 23, 2018

Conversation

landreev
Copy link
Contributor

New Contributors

Welcome! New contributors should at least glance at CONTRIBUTING.md, especially the section on pull requests where we encourage you to reach out to other developers before you start coding. Also, please note that we measure code coverage and prefer you write unit tests. Pull requests can still be reviewed without tests or completion of the checklist outlined below. Thanks!

Related Issues

Pull Request Checklist

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.005%) to 13.167% when pulling 5058cbf on 4605-rsync-upload-lock-issue into b4e1f2a on develop.

@pameyer pameyer self-assigned this May 21, 2018
@pameyer
Copy link
Contributor

pameyer commented May 21, 2018

Functionality looks good - locking consistent with UI/API dataset creation and retrieving transfer script.

Some duplications appear to be duplicated (3x notification on checksum verification success, 2x on checksum verification failure) - these might be due to misconfiguration on my part, and might be out of scope for 4605. Duplicate notifications (success and failure) do not appear for "normal" users, so shouldn't be an issue.

Copy link
Contributor

@matthew-a-dunlap matthew-a-dunlap left a comment

Choose a reason for hiding this comment

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

Overall code looks good, I have one question below

@@ -166,6 +167,13 @@ public void writeItems(List list) {
jobContext.setExitStatus("FAILED");
return;
}
DatasetLock dcmLock = dataset.getLockFor(DatasetLock.Reason.DcmUpload);
Copy link
Contributor

Choose a reason for hiding this comment

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

Its kind of confusing that a writeItems method is removing a lock and updating the dataset version. is there a reason this doesn't live in the close method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH my answer is I don't know. Most of that code was written by somebody who's no longer around.
Maybe the idea is that all these sub-tasks - creating the "package" file, then updating the dataset to reflect it (which in turn requires unlocking the dataset) are all parts of one main task, that cannot be considered complete unless all the parts succeed, transaction-like?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh ok. Thanks for the clarification!

@landreev
Copy link
Contributor Author

@pameyer - is this looking like this extra notifications are new, as in introduced in this PR?

@pameyer
Copy link
Contributor

pameyer commented May 21, 2018

@landreev - the extra (admin only) notifications aren't new in this PR

@kcondon kcondon merged commit c350aa4 into develop May 23, 2018
@kcondon kcondon deleted the 4605-rsync-upload-lock-issue branch May 23, 2018 20:26
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.

6 participants