goharbor/harbor

Azure ACR replication adapter does not support chunked/resumable blob uploads (413 error)

已关闭

#23,015 创建于 2026年3月19日

 (2 条评论) (0 个反应) (0 位负责人)Go (5,235 个派生)batch import
Stalehelp wantedreplication/adapters

仓库指标

星标
 (28,490 个星标)
PR 合并指标
 (平均合并 8天 17小时) (30 天内合并 74 个 PR)

描述

Description

Harbor's azure-acr replication adapter pushes blobs as single monolithic PUT requests. Azure ACR enforces a request body size limit and rejects uploads above ~20MB with HTTP 413. This makes push-based replication to Azure ACR unusable for any image with layers larger than ~20MB.

This is a continuation of #21640 which was closed without resolution.

Environment

  • Harbor version: v2.16.0 (Helm, Kubernetes)
  • Replication mode: Push-based, event-based trigger
  • Destination: Azure ACR Basic tier (*.azurecr.io)

Steps to reproduce

  1. Create a push-based replication rule targeting an Azure ACR registry
  2. Push an image with any blob layer > ~20MB
  3. Replication fails with 413

Error log [ERROR] failed to pushing the blob sha256:77dab3318d..., size 29154834: http status code: 413, body: 413 Request Entity Too Large - AzureContainerRegistry

What we tried

  • Set REPLICATION_CHUNK_SIZE=5242880 (5MB) as env var on jobservice pod — confirmed present but has no effect on the azure-acr adapter
  • Per the documentation: "Copy by chunk has not been verified officially between harbor and other type registries"
  • Docker CLI push to the same ACR endpoint works fine (uses OCI-compliant chunked uploads)

Expected behavior The azure-acr replication adapter should use chunked/resumable uploads (as per the OCI distribution spec) when pushing blobs, similar to how the Docker client handles it.

贡献者指南