Skip to content

Ensure checksum is not recalculated on retries #3257

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

Merged
merged 1 commit into from
Jun 9, 2025
Merged

Conversation

mullermp
Copy link
Contributor

@mullermp mullermp commented Jun 9, 2025

This is already done because of how handlers are set up, but add a test to ensure.

Copy link

github-actions bot commented Jun 9, 2025

You have made a change to core without a corresponding change to the CHANGELOG.md. This change will not result in a new version and will not published unless an entry is added to CHANGELOG.md.

Copy link
Contributor

@richardwang1124 richardwang1124 left a comment

Choose a reason for hiding this comment

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

LGTM. Left a question.

original_checksum = nil
t = Tempfile.new
t.write('original')
t.rewind
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this rewind necessary if you're already rewinding in the proc below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sort of. It's necessary because if the body is re-read, we would want to ensure that it is the new value. However the body is not re-read (by design). It otherwise would make a checksum of an empty string which is still different but not really the ideal test.

@mullermp mullermp merged commit fa29577 into version-3 Jun 9, 2025
24 checks passed
@mullermp mullermp deleted the checksum-retry branch June 9, 2025 19:45
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.

2 participants