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

Fix wrong checksum being used for publication #1976

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Apr 29, 2021

@dralley dralley force-pushed the wrong-checksum branch 2 times, most recently from 95529ed to 92bdfb9 Compare April 29, 2021 22:29
@pulpbot
Copy link
Member

pulpbot commented Apr 29, 2021

Attached issue: https://pulp.plan.io/issues/8644

@dralley
Copy link
Contributor Author

dralley commented Apr 29, 2021

@goosemania This is unrelated to auto-publish, it was introduced when we fixed the "sha" checksum issue.

@dralley dralley requested a review from ggainey April 29, 2021 22:34
pulp_rpm/app/tasks/publishing.py Show resolved Hide resolved
checksum_type = metadata

return getattr(cr, getattr(CHECKSUM_TYPES, checksum_type.upper()), cr.SHA256)
return getattr(cr, getattr(CHECKSUM_TYPES, checksum_type.upper()).upper(), cr.SHA256)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

# "sha" -> "SHA" -> "CHECKSUM_TYPES.SHA" -> "sha1"
normalized_checksum_type = getattr(CHECKSUM_TYPES, checksum_type.upper())
# "sha1" -> "SHA1" -> "cr.SHA1"
return getattr(cr, normalized_checksum_type.upper())
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@dralley dralley merged commit f14be05 into pulp:master Apr 30, 2021
@dralley dralley deleted the wrong-checksum branch April 30, 2021 17:16
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