-
Notifications
You must be signed in to change notification settings - Fork 359
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
AN-380 Make call cache hashing strategy configurable per filesystem and backend #7683
Draft
jgainerdewar
wants to merge
21
commits into
develop
Choose a base branch
from
jd_AN-380_hash
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
e712005
Specify filesystemTypeKey on each Path subclass
jgainerdewar 449567c
Read per-filesystem AsyncFileHashingStrategy from config
jgainerdewar 4a36763
Set default hashing strategies for each backend
jgainerdewar 98beda3
Move AsyncFileHashingStrategy to core
jgainerdewar 7ea5618
Plumb hashStrategy through io commands, use for batch commands
jgainerdewar 2f55cd4
Rename GcsBatchCrc32cCommand -> GcsBatchHashCommand
jgainerdewar 6854497
Rename S3BatchTagCommand -> S3BatchHashCommand
jgainerdewar 61eae83
Rename AsyncFileHashingStrategy -> FileHashStrategy
jgainerdewar be3a8a3
Update non-DRS NioHashing hash logic
jgainerdewar 0c32295
Progress on DRS
jgainerdewar baf8151
Switch FileHashStrategy to list approach, make DRS conform
jgainerdewar 6b435d5
Also check in this file
jgainerdewar c10ae98
Eliminate special GcsCrc32c hash type
jgainerdewar 065ff05
Lazily evaluate hashes
jgainerdewar df9dccc
Test fixes
jgainerdewar b82f2ec
Remove defunct tests
jgainerdewar 0a101df
Better handling for hex vs b64 crc32c representations
jgainerdewar add5a8c
Rename test file
jgainerdewar de33a85
Comments
jgainerdewar 875f9b5
FileHashStrategy tests
jgainerdewar 16137f2
Imports
jgainerdewar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
21 changes: 21 additions & 0 deletions
21
core/src/main/scala/cromwell/core/callcaching/FileHashStrategy.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cromwell.core.callcaching | ||
|
||
// File hashing strategies used by IoHashCommand, primarily when obtaining file hashes | ||
// for call caching purposes. | ||
sealed trait FileHashStrategy | ||
|
||
object FileHashStrategy { | ||
case object Crc32c extends FileHashStrategy | ||
case object Md5 extends FileHashStrategy | ||
case object Md5ThenIdentity extends FileHashStrategy | ||
case object ETag extends FileHashStrategy | ||
|
||
// TODO validate fs type here? | ||
def apply(s: String): Option[FileHashStrategy] = s.toLowerCase() match { | ||
case "md5" => Some(Md5) | ||
case "crc32c" => Some(Crc32c) | ||
case "md5+identity" => Some(Md5ThenIdentity) | ||
case "etag" => Some(ETag) | ||
case _ => None | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the most questionable part of this diff IMO.