Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f21b0ba
adding the StructuredMessageDecoder
gunjansingh-msft Oct 8, 2025
e1c23c5
adding the pipeline policy changes
gunjansingh-msft Oct 15, 2025
1d0cc92
smart retry changes
gunjansingh-msft Oct 29, 2025
b7ba234
fixing smart retry impl
gunjansingh-msft Dec 3, 2025
657f987
smart retry changes
gunjansingh-msft Dec 15, 2025
f7939e7
smart retry changes
gunjansingh-msft Dec 17, 2025
89f9292
smart retry changes
gunjansingh-msft Dec 17, 2025
62f72cc
smart retry changes
gunjansingh-msft Mar 16, 2026
09f49f9
adding content validation tests
gunjansingh-msft Mar 27, 2026
973cdf6
code refactoring
gunjansingh-msft Mar 28, 2026
a58dc63
fixing errors i introduced :(
ibrandes Mar 30, 2026
e12aa82
addressing review comments
gunjansingh-msft Apr 2, 2026
2b2e86d
code refactoring based on latest review comments
gunjansingh-msft Apr 3, 2026
11a2da2
code refactoring based on latest review comments
gunjansingh-msft Apr 8, 2026
c907649
simplifying retry mechanism
gunjansingh-msft Apr 8, 2026
5b153a4
removing dead code
gunjansingh-msft Apr 8, 2026
f72cb8b
addressing Kyle's review comments
gunjansingh-msft Apr 17, 2026
20e3303
addressing latest review comments
gunjansingh-msft Apr 17, 2026
b33a785
Merge origin/feature/storage/content-validation into feature/storage/…
gunjansingh-msft Apr 17, 2026
f9befff
refactoring based on latest review comments
gunjansingh-msft Apr 22, 2026
b3298c2
refactoring based on latest review comments
gunjansingh-msft Apr 22, 2026
ed8c3eb
refactoring based on latest review comments
gunjansingh-msft Apr 23, 2026
d7b0c51
refactoring based on latest review comments from kyle
gunjansingh-msft Apr 28, 2026
73f22e9
expanding test coverage
ibrandes Apr 28, 2026
c5f3a8c
removing unused imports
ibrandes Apr 28, 2026
2d5c9b8
recordings
ibrandes Apr 28, 2026
c1a3f1f
adding documentation to decoder classes
ibrandes Apr 29, 2026
3c77a76
small fixes and failure path tests
ibrandes Apr 29, 2026
aaa6414
addressing context comment
ibrandes Apr 29, 2026
e08eaba
analyze error
ibrandes Apr 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-blob/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/storage/azure-storage-blob",
"Tag": "java/storage/azure-storage-blob_4e6c4fe966"
"Tag": "java/storage/azure-storage-blob_1f689f90f0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.azure.storage.common.policy.ResponseValidationPolicyBuilder;
import com.azure.storage.common.policy.ScrubEtagPolicy;
import com.azure.storage.common.policy.StorageBearerTokenChallengeAuthorizationPolicy;
import com.azure.storage.common.policy.StorageContentValidationDecoderPolicy;
import com.azure.storage.common.policy.StorageContentValidationPolicy;
import com.azure.storage.common.policy.StorageSharedKeyCredentialPolicy;

Expand Down Expand Up @@ -117,6 +118,7 @@ public static HttpPipeline buildPipeline(StorageSharedKeyCredential storageShare
policies.add(new MetadataValidationPolicy());

policies.add(new StorageContentValidationPolicy());
policies.add(new StorageContentValidationDecoderPolicy());

if (storageSharedKeyCredential != null) {
policies.add(new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1261,16 +1261,20 @@ Mono<BlobDownloadAsyncResponse> downloadStreamWithResponseInternal(BlobRange ran
BlobRequestConditions requestConditions, boolean getRangeContentMd5,
ContentValidationAlgorithm contentValidationAlgorithm, Context context) {
BlobRange finalRange = range == null ? new BlobRange(0) : range;

Boolean getMD5 = getRangeContentMd5 ? getRangeContentMd5 : null;
BlobRequestConditions finalRequestConditions
= requestConditions == null ? new BlobRequestConditions() : requestConditions;
DownloadRetryOptions finalOptions = (options == null) ? new DownloadRetryOptions() : options;

context
= ContentValidationModeResolver.addStructuredMessageDecodingToContext(context, contentValidationAlgorithm);

// The first range should eagerly convert headers as they'll be used to create response types.
Context firstRangeContext = context == null
? new Context("azure-eagerly-convert-headers", true)
: context.addData("azure-eagerly-convert-headers", true);

Context nextRangeContext = context;
return downloadRange(finalRange, finalRequestConditions, finalRequestConditions.getIfMatch(), getMD5,
firstRangeContext).map(response -> {
BlobsDownloadHeaders blobsDownloadHeaders = new BlobsDownloadHeaders(response.getHeaders());
Expand Down Expand Up @@ -1315,7 +1319,7 @@ Mono<BlobDownloadAsyncResponse> downloadStreamWithResponseInternal(BlobRange ran

try {
return downloadRange(new BlobRange(initialOffset + offset, newCount), finalRequestConditions,
eTag, getMD5, context);
eTag, getMD5, nextRangeContext);
} catch (Exception e) {
return Mono.error(e);
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class BlobContentValidationAsyncUploadTests extends BlobTestBase {
private static final int UNDER_4MB = 2 * Constants.MB;

private static final long LARGE_UPLOAD_MIN_BYTES = 500L * Constants.MB;
private static final long LARGE_UPLOAD_MAX_BYTES = 1L * Constants.GB;
private static final long LARGE_UPLOAD_MAX_BYTES = Constants.GB;
private static final long LARGE_UPLOAD_BLOCK_SIZE_BYTES = 8L * Constants.MB;
private static final int LARGE_UPLOAD_MAX_CONCURRENCY = 8;

Expand Down Expand Up @@ -163,7 +163,6 @@ public void uploadWithoutContentValidation() {
/**
* Blob parallel upload rejects using both computeMd5 (SDK-computed MD5) and CRC64 (transfer validation checksum algorithm) at once.
*/
@SuppressWarnings("deprecation")
@Test
public void uploadWithComputeMd5AndCrc64Throws() {
BlobAsyncClient client = createBlobAsyncClientWithRequestSniffer(new CopyOnWriteArrayList<>());
Expand Down
Loading
Loading