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-1253] Check MD5 before upload to verify change in content #1063

Merged
merged 7 commits into from
Feb 12, 2024

Conversation

BryanFauble
Copy link
Contributor

@BryanFauble BryanFauble commented Feb 8, 2024

Problem:

  1. When there is a cache miss we never checked if the content of the file to be uploaded actually changed. As a result we would always upload the file to Synapse.

Solution:

  1. If we need to upload a file to Synapse and the file already exists in Synapse and we got back an MD5 from Synapse compare the MD5 in Synapse to what the local file is - Is they are the same do not upload the file.

Testing:

  1. Integration tests around this logic

@BryanFauble BryanFauble requested a review from a team as a code owner February 8, 2024 20:01
@pep8speaks
Copy link

pep8speaks commented Feb 8, 2024

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

Line 1638:89: E501 line too long (99 > 88 characters)

Comment last updated at 2024-02-09 17:20:57 UTC

Copy link
Contributor

@BWMac BWMac 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 comments/questions

synapseclient/client.py Outdated Show resolved Hide resolved
synapseclient/client.py Show resolved Hide resolved
tests/unit/synapseutils/unit_test_synapseutils_sync.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Feb 9, 2024

@BryanFauble BryanFauble merged commit 84b65a3 into develop Feb 12, 2024
38 checks passed
@BryanFauble BryanFauble deleted the SYNPY-1253-check-md5-against-synapse branch February 12, 2024 16:19
@thomasyu888
Copy link
Member

🔥

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

4 participants