-
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
WX-1153 Azure blob read md5 from metadata for large files #7204
Changes from 6 commits
359ef4d
0b9aca0
cad86dc
ade9145
39024c2
108f60e
c4fbfb1
ac4bd02
cf96a7c
d348428
c5d991e
b62c9de
c4e3ece
4c9a642
b4872d9
c36e3e5
2fe419c
23217a2
35ec356
f845d8b
d17274f
ba60ef8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,6 +100,30 @@ class BlobPathBuilderSpec extends AnyFlatSpec with Matchers with MockSugar { | |
new BlobPathBuilder(store, endpoint)(fsm) | ||
} | ||
|
||
it should "read md5 from small files <5g" in { | ||
val builder = makeBlobPathBuilder(endpoint, store) | ||
val evalPath = "/test/inputFile.txt" | ||
val testString = endpoint.value + "/" + store + evalPath | ||
val blobPath1: BlobPath = builder build testString getOrElse fail() | ||
blobPath1.md5HexString.toOption.get should equal(Some("967f0f086992f1a8b48f0a533f80290b")) | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add test cases for the two types of missing hashes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that the tests are working... with pleasure! |
||
it should "read md5 from large files >5g" in { | ||
val builder = makeBlobPathBuilder(endpoint, store) | ||
val evalPath = "/test/Rocky-9.2-aarch64-dvd.iso" | ||
val testString = endpoint.value + "/" + store + evalPath | ||
val blobPath1: BlobPath = builder build testString getOrElse fail() | ||
blobPath1.md5HexString.toOption.get should equal(Some("13cb09331d2d12c0f476f81c672a4319")) | ||
} | ||
|
||
it should "choose the native md5 over the metadata md5 for files that have both" in { | ||
val builder = makeBlobPathBuilder(endpoint, store) | ||
val evalPath = "/test/redundant_md5_test.txt" | ||
val testString = endpoint.value + "/" + store + evalPath | ||
val blobPath1: BlobPath = builder build testString getOrElse fail() | ||
blobPath1.md5HexString.toOption.get should equal(Some("9e5ceec07c8730b593a3a4b4ae324475")) | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not really happy with immediately |
||
ignore should "resolve an absolute path string correctly to a path" in { | ||
val builder = makeBlobPathBuilder(endpoint, store) | ||
val rootString = s"${endpoint.value}/${store.value}/cromwell-execution" | ||
|
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 choice seems logical to me but we should run it by the TES folks to ensure we're not missing some reason to prefer the other hash. Not 100% sure but I believe they are always setting the metadata value on upload, regardless of file size.
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.
Implemented the decision from today's discussion.