goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
23.95k stars 4.74k forks source link

Dry run deleted my images #20996

Open fatsolko opened 2 weeks ago

fatsolko commented 2 weeks ago

Expected behavior and actual behavior: I expected the images to remain and didn't even check after the dry run, I discovered it only now when I first tried to pull images. And in the logs I found that they were still deleted, despite the dry run. Info from policy: image image Info from logs: image

2024-09-24T09:56:20Z [INFO] [/pkg/retention/job.go:86]: Run retention process.
 Repository: docker/utils-images/alpine-tools 
 Rule Algorithm: or 
 Dry Run: true
2024-09-24T09:56:20Z [INFO] [/pkg/retention/job.go:101]: Load 1 candidates from repository docker/utils-images/alpine-tools
2024-09-24T09:56:20Z [INFO] [/pkg/retention/job.go:212]: 
|                                 Digest                                  | Tag | Kind  | Labels |     PushedTime      | PulledTime |     CreatedTime     | Retention |
|-------------------------------------------------------------------------|-----|-------|--------|---------------------|------------|---------------------|-----------|
| sha256:45d9d35b558f9f7ac7f6e91d22db8c95f4deb7e05b5b690f4262bf6e29e004d0 |   3 | image |        | 2024/07/04 10:20:28 |            | 2024/07/04 10:20:28 | DEL       |

Harbor chart version: 1.4.0-dev appVersion: dev goharbor/harbor-core:dev@sha256:739af1664fe39f43d6c01afff64a1e0843dc5417d154d323fc3bcf5dca559cff

wy65701436 commented 1 week ago

can you try with the latest harbor chart? And please do not use the dev tag images.