-
Notifications
You must be signed in to change notification settings - Fork 360
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
41 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 1966d28
Tests
jgainerdewar d0ad499
Scalafmt
jgainerdewar e30b7c2
Remove a few TODOs
jgainerdewar 05876b3
Allow users to configure hash strategy as single string
jgainerdewar 3a9e180
Explanatory comment for unprotected get
jgainerdewar 22cbc1f
Cleanup
jgainerdewar 83c381d
Consistent blob id strings
jgainerdewar 1458942
Ignore failing test
jgainerdewar c1c9c38
Cleanup
jgainerdewar ed662f5
Merge branch 'develop' into jd_AN-380_hash
jgainerdewar b3f04fd
Docs
jgainerdewar c03f985
Merge branch 'jd_AN-380_hash' of github.com:broadinstitute/cromwell i…
jgainerdewar 57ed4b4
PR Feedback
jgainerdewar 1f036c1
Doc feedback
jgainerdewar cc0aba1
Fix test, clearer naming
jgainerdewar 8c626c9
Centralized (and correct!) logic for identity hashing
jgainerdewar 2071ecb
Fix typo
jgainerdewar 46eb4bd
Remove unused checksum validation
jgainerdewar 892a5d4
AN-375 Metrics, logging for present vs. missing md5 (#7690)
aednichols c01fbb1
Merge branch 'develop' into jd_AN-380_hash
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.
Should this be the list of md5 + identity?
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 generic fallback across all backends and filesystems, since identity is only implemented for GCP I'm afraid that would confuse people.
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.
That makes sense!