[Storage] Disable decompression on download when using crc64#47553
Open
jalauzon-msft wants to merge 5 commits into
Open
[Storage] Disable decompression on download when using crc64#47553jalauzon-msft wants to merge 5 commits into
jalauzon-msft wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Azure Storage download APIs to prevent automatic response decompression from interfering with CRC64 (structured message) content validation by forcing decompression off for CRC64 validation and erroring when users explicitly request decompression.
Changes:
- Added runtime guards to disable
decompressfor CRC64 validation and raiseValueErrorwhendecompress=Trueis explicitly requested (Blob + File Share). - Updated docstrings across Blob, File Share, and Data Lake to document the CRC64/decompression incompatibility and the required
ext-checksumsextra. - Centralized the Blob behavior via
_download_blob_options, implicitly covering Data Lake downloads that delegate to the internal blob client.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py | Enforces decompress=False for CRC64 validation and raises on decompress=True; updates docs. |
| sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py | Sync equivalent of the CRC64/decompression guard; updates docs. |
| sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py | Doc update to reflect CRC64/decompression incompatibility for Data Lake downloads. |
| sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py | Doc update to reflect CRC64/decompression incompatibility for Data Lake downloads. |
| sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py | Doc update to reflect CRC64/decompression incompatibility for Blob downloads. |
| sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py | Doc update to reflect CRC64/decompression incompatibility for Blob downloads. |
| sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client_helpers.py | Implements the Blob-side CRC64/decompression guard in _download_blob_options. |
weirongw23-msft
approved these changes
Jun 18, 2026
weirongw23-msft
approved these changes
Jun 18, 2026
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.
Content validation with CRC64 using structured message for download which, due to the extra data in the payload to encode the checksums, cannot work with auto-decompression. This change disables decompression when using CRC64 and produces errors if users try to opt into it. This is not a breaking change because the options
autoandcrc64have not released yet.