fix: Support Azure backend for dataset files (HEXA-1781) - #416
Merged
Conversation
to datasets. Azure's Put Blob REST API requires the header x-ms-blob-type: BlockBlob on every blob-creating PUT. We didn't send this, resulting in error: 400 MissingRequiredHeader — An HTTP header that's mandatory for this request is not specified.
Azure has a hard limit on 5GiB for a single file upload PUT. Since dataset files can be larger, we need to do them block per block to avoid hitting the limit. This implements this to upload in 64MiB blocks.
bramj
marked this pull request as ready for review
August 21, 2026 11:54
yolanfery
approved these changes
Aug 21, 2026
yolanfery
left a comment
Contributor
There was a problem hiding this comment.
Good catch 🤯 and still crazy to me to see this type of fix being produced in such a short timeframe 😛
Comment on lines
+238
to
+248
| mutation generateDatasetUploadUrl ($input: GenerateDatasetUploadUrlInput!) { | ||
| generateDatasetUploadUrl(input: $input) { | ||
| uploadUrl | ||
| headers | ||
| success | ||
| errors | ||
| } | ||
| } | ||
| """, | ||
| {"input": {"versionId": self.id, "contentType": content_type, "uri": filename}}, | ||
| ) |
Contributor
There was a problem hiding this comment.
Out of scope but those could become part of our typed SDK client
Merged
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.
Note: I tested the main logic in the workspace copier script (where we duplicate this; not ideal, we'll look into refactoring later)
Two issues:
Changes
x-ms-blob-type: BlockBlobon every blob-creating PUT. We didn't send this, resulting in error:400 MissingRequiredHeader — An HTTP header that's mandatory for this request is not specified.