-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Expected behavior and actual behavior:
Harbor's retention policy has a bug where it deletes recently-pulled individual architecture manifests when their parent manifest list expires, even when the child manifests should be retained based on their own pull timestamps. Instead...I would expect the images to be retained as they are not violating the cleanup policy.
For example if using a 7 day cleanup policy and the multi-arch manifest hasn't been pulled in 7 days, but the actual images have. The underlying images shouldn't be deleted.
Steps to reproduce the problem:
Assuming the default 7 day based retention policy on the proxy cache here's the steps to reproduce:
- pull multiple manifests from a multi-arch image
docker pull harbor-staging.usw2.dash-management.doordash.red/dockerhub/library/redis:8.2.1 --platform linux/arm64
docker pull harbor-staging.usw2.dash-management.doordash.red/dockerhub/library/redis:8.2.1 --platform linux/amd64
-
Wait ~ 10 mins. We have to wait for harbor to create the OCI manifests
-
Go to harbor UI. validate that the Pull time is set on the individual arches but not on the multi-arch manifests


- Run the retention policy and observe that all of the images are getting deleted even if they have been pulled within the last 7 days.
2025-09-26T23:29:05Z [INFO] [/pkg/retention/job.go:86]: Run retention process.
Repository: dockerhub/library/redis
Rule Algorithm: or
Dry Run: true
2025-09-26T23:29:06Z [INFO] [/pkg/retention/job.go:101]: Load 1 candidates from repository dockerhub/library/redis
2025-09-26T23:29:06Z [INFO] [/pkg/retention/job.go:212]:
| Digest | Tag | Kind | Labels | PushedTime | PulledTime | CreatedTime | Retention |
|-------------------------------------------------------------------------|-----|-------|--------|---------------------|------------|---------------------|-----------|
| sha256:af43038a62c4ff6df52eda1a6d7c8d9610b6c10e156a0ce0f70bee9932ffc52f | | image | | 2025/09/26 23:23:40 | | 2025/09/26 23:23:40 | DEL |
Versions:
Please specify the versions of following systems.
- harbor version: Version v2.13.1-9384ed0e