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

[SYNPY-1316] Fix for cache item names matching #998

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

BryanFauble
Copy link
Contributor

Problem:
When items in the cache on local machine had the same name for a file it would some-times assume it was the intended file to download and would not download the correct file from Synapse. Instead it would copy the incorrect file (With the correct name) to the requested location.

Solution:
I am doing a MD5 check of the cached item and the item from the server to verify they match

Testing:

  1. I tested this is the script located in the comments on: https://sagebionetworks.jira.com/browse/SYNPY-1316
  2. I also verified that with and without the changes that the introduced integration test passes/fails

@BryanFauble BryanFauble requested a review from a team as a code owner October 30, 2023 19:02
@pep8speaks
Copy link

Hello @BryanFauble! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 406:89: E501 line too long (108 > 88 characters)

Copy link
Member

@thomasyu888 thomasyu888 left a comment

Choose a reason for hiding this comment

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

🔥 LGTM! thanks for adding the extra type hinting.

In the future, we may want to look at performance if larger files are downloaded. It doesn't generally take too long to calculate a md5, but something to look out for.

@BryanFauble BryanFauble merged commit c6223b5 into develop Oct 30, 2023
18 of 35 checks passed
@BryanFauble BryanFauble deleted the SYNPY-1316-resolve-cache-issues branch October 30, 2023 22:10
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.

None yet

3 participants