feat: prioritize content-based task ID over blob digest in task ID calc#1775
Merged
feat: prioritize content-based task ID over blob digest in task ID calc#1775
Conversation
Signed-off-by: Gaius <gaius.qi@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1775 +/- ##
==========================================
- Coverage 44.53% 44.51% -0.02%
==========================================
Files 91 91
Lines 25790 25834 +44
==========================================
+ Hits 11485 11501 +16
- Misses 14305 14333 +28
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces support for task ID calculation based on blob digests for OCI registry blob downloads, which enables deduplication of blobs across registries and reduces redundant downloads and storage. It also adds a new HTTP header to control this behavior and refines the logic for task ID generation. Additionally, there are improvements to code documentation and tests.
Task ID calculation and deduplication improvements:
enable_task_id_based_blob_digestfield toGetRequestand related structs, allowing the task ID to be derived from the blob digest for OCI blob URLs, which deduplicates blobs across registries. [1] [2] [3] [4]X-Dragonfly-Enable-Task-ID-Based-Blob-Digest, to propagate the deduplication preference through the request pipeline, and added logic to read and set this header. [1] [2] [3] [4]Documentation and code clarity:
header.rs, making their purpose and usage clearer. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Testing:
X-Dragonfly-Enable-Task-ID-Based-Blob-Digestheader.Refactoring:
Dependency and import updates:
is_blob_urltodragonfly-client-util/src/request/mod.rs.Related Issue
Motivation and Context
Screenshots (if appropriate)