Skip to content

Commit 9ef2262

Browse files
committed
set chunk size to 5MB maximum for all registries
1 parent 707010e commit 9ef2262

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Microsoft.NET.Build.Containers/Registry.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ public Registry(Uri baseUri)
2929
}
3030

3131
/// <summary>
32-
/// The max chunk size for patch blob uploads. By default the size is 64 KB.
33-
/// Amazon Elasic Container Registry (ECR) requires patch chunk size to be 5 MB except for the last chunk.
32+
/// The max chunk size for patch blob uploads. By default the size is 5 MB.
3433
/// </summary>
35-
public readonly int MaxChunkSizeBytes => IsAmazonECRRegistry ? 5248080 : 1024 * 64;
34+
/// <remarks>
35+
/// 5 MB is chosen because it's the limit that works with all registries we tested -
36+
/// notably Amazon Elastic Container Registry requires 5MB chunks for all but the last chunk.
37+
/// </remarks>
38+
public readonly int MaxChunkSizeBytes => 5 * 1024 * 1024;
3639

3740
/// <summary>
3841
/// Check to see if the registry is for Amazon Elastic Container Registry (ECR).

0 commit comments

Comments
 (0)