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

add checksum in download request to verify its consistency #979

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

CormickKneey
Copy link
Contributor

Description

  1. add calculate_digest for() piece used in DownloadPieceResponse
  2. rename calculate_file_hash() to calculate_file_digest()

Related Issue

dragonflyoss/dragonfly#3811

Motivation and Context

Part of Improvement of Security

@CormickKneey CormickKneey requested a review from a team as a code owner February 13, 2025 05:52
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 64.91228% with 20 lines in your changes missing coverage. Please review.

Project coverage is 33.18%. Comparing base (3339d5c) to head (17af9fd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/resource/piece_downloader.rs 0.00% 17 Missing ⚠️
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #979      +/-   ##
==========================================
+ Coverage   33.04%   33.18%   +0.14%     
==========================================
  Files          59       59              
  Lines        9681     9727      +46     
==========================================
+ Hits         3199     3228      +29     
- Misses       6482     6499      +17     
Files with missing lines Coverage Δ
dragonfly-client-storage/src/metadata.rs 62.90% <100.00%> (+4.37%) ⬆️
dragonfly-client-util/src/digest/mod.rs 80.48% <100.00%> (ø)
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% <0.00%> (ø)
dragonfly-client/src/resource/piece_downloader.rs 3.33% <0.00%> (-1.32%) ⬇️

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 32c99b7 into dragonflyoss:main Feb 14, 2025
6 checks passed
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