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: Use checksum to dedupe uploaded release artifacts #1275

Merged
merged 2 commits into from Jul 11, 2022

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Jul 11, 2022

This change will make sentry-cli skip the upload of files that are already present for the given release.
It's using sha1 checksum for comparison, as we already have this data for every file that was uploaded to our servers.
When skipped, an appropriate message is added to the upload report.
The same behavior already exists for all other debug files formats.

@kamilogorek kamilogorek requested a review from a team July 11, 2022 12:33
Comment on lines 178 to 182
/// Adds an already uploaded sources checksum.
pub fn add_already_uploaded_source(&mut self, checksum: Digest) -> Result<()> {
self.already_uploaded_sources.push(checksum);
Ok(())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this method return a result? It doesn't look like it can fail in any way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Forgot to change that after moving from HashSet which looked like overkill.

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