-
Notifications
You must be signed in to change notification settings - Fork 116
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
Minor chunk upload improvements. #2779
Conversation
[noissue] Required PR: pulp/pulpcore#2779
pulpcore/app/models/upload.py
Outdated
upload_chunk = UploadChunk(upload=self, offset=offset, size=len(chunk)) | ||
upload_chunk = UploadChunk(upload=self, offset=offset, size=len(chunk_read)) |
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 looks like something we could write a test expectation for.
[noissue] Required PR: pulp/pulpcore#2779
[noissue] Required PR: pulp/pulpcore#2779
[noissue] Required PR: pulp/pulpcore#2779
[noissue] Required PR: pulp/pulpcore#2779
[noissue] Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779 Required PR: pulp/pulpcore#2842
closes pulp#797 Required PR: pulp/pulpcore#2779
1744096
to
d72d1ef
Compare
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.
A test would be nice.
closes pulp#797 Required PR: pulp/pulpcore#2779
pulpcore/app/models/upload.py
Outdated
if sha256: | ||
current_sha256 = hashlib.sha256(chunk_read).hexdigest() | ||
if sha256 != current_sha256: | ||
raise serializers.ValidationError("Checksum does not match chunk upload.") |
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 I think is user facing so it should be wrapped in gettext
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes pulp#797 Required PR: pulp/pulpcore#2779
closes #797 Required PR: pulp/pulpcore#2779
[noissue]
Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html