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

feat: compute hashes while extracting #176

Merged

Conversation

baszalmstra
Copy link
Collaborator

This computes the hashes of extracted archives on the fly. I think this is really fast and shouldn't add much overhead (compared to disk and network access) but we can also put it behind flags that we pass in. Or we can separate this concern into different functions. However, I also think its good practice to check the hash of the downloaded file to ensure consistency so 🤷

Let me know what you think!

Fixes: #41

@baszalmstra baszalmstra requested a review from wolfv April 19, 2023 16:06
@baszalmstra baszalmstra force-pushed the feat/compute_hashes_while_extracting branch 2 times, most recently from 41951ca to 2d5d7e5 Compare April 19, 2023 16:08
@baszalmstra baszalmstra force-pushed the feat/compute_hashes_while_extracting branch from 2d5d7e5 to e16af90 Compare April 19, 2023 17:10
@wolfv
Copy link
Contributor

wolfv commented Apr 27, 2023

just to be sure – this computes the hash of the outer archive on the fly, correct? E.g. the hash of the .tar.bz2 or .conda file?

I think that's great :) Do we take any actions when the hash doesn't match? E.g. removing the archive & extracted contents?

@baszalmstra
Copy link
Collaborator Author

just to be sure – this computes the hash of the outer archive on the fly, correct? E.g. the hash of the .tar.bz2 or .conda file?

Yes, that's exactly what it does!

Do we take any actions when the hash doesn't match? E.g. removing the archive & extracted contents?

No not yet, that's what the package cache should do. The extraction process itself is unaware of the expected hash.

@baszalmstra baszalmstra merged commit aa46f5a into conda:main May 5, 2023
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.

Use rstest for extraction
2 participants