Skip to content

Commit e569784

Browse files
authored
Merge pull request #285 from dotnet/size
Use more conservative upload size
2 parents 3621378 + e2b36da commit e569784

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Microsoft.NET.Build.Containers/Registry.cs

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

3131
/// <summary>
32-
/// The max chunk size for patch blob uploads. By default the size is 5 MB.
32+
/// The max chunk size for patch blob uploads.
3333
/// </summary>
3434
/// <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.
35+
/// This varies by registry target, for example Amazon Elastic Container Registry requires 5MB chunks for all but the last chunk.
3736
/// </remarks>
38-
public readonly int MaxChunkSizeBytes => 5 * 1024 * 1024;
37+
public readonly int MaxChunkSizeBytes => IsAmazonECRRegistry ? 5248080 : 1024 * 64;
3938

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

0 commit comments

Comments
 (0)