Package Retention don't delete all version #13445

Closed
opened 2025-11-02 10:42:36 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @wassy92x on GitHub (Sep 3, 2024).

Description

I have a package (container-images) with 1805 versions uploaded to gitea.
I discovered, that not all versions are deleted.
So I tested the cleanup-regexes against the not deleted versions - short answer the regex is correct.

I turned on Debug-Logging and there is no matching log-entry logged, that those versions will be kept.

In the source code I discovered that in the cleanup job only the first 200 versions of each package are loaded.
So the regex is only applied to to those first 200 versions.

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu-Server 22.04.4 LTS

How are you running Gitea?

Gitea is running from docker. The image is gitea/gitea:1.22.1-rootless.

Database

PostgreSQL

Originally created by @wassy92x on GitHub (Sep 3, 2024). ### Description I have a package (container-images) with 1805 versions uploaded to gitea. I discovered, that not all versions are deleted. So I tested the cleanup-regexes against the not deleted versions - short answer the regex is correct. I turned on Debug-Logging and there is no matching log-entry logged, that those versions will be kept. In the source code I discovered that in the cleanup job only the first 200 versions of each package are loaded. So the regex is only applied to to those first 200 versions. ### Gitea Version 1.22.1 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Ubuntu-Server 22.04.4 LTS ### How are you running Gitea? Gitea is running from docker. The image is gitea/gitea:1.22.1-rootless. ### Database PostgreSQL
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 10:42:36 -06:00
Author
Owner

@saitho commented on GitHub (Apr 4, 2025):

We're also running into that issue. Would be great if that can be fixed, so container cleanup works correctly.

@saitho commented on GitHub (Apr 4, 2025): We're also running into that issue. Would be great if that can be fixed, so container cleanup works correctly.
Author
Owner

@brunick commented on GitHub (Apr 4, 2025):

i've been running into that issue in the last couple of weeks as well - there are a lot of images that are older that 2 week but they're not cleaned up.

Version:
1.23.6

@brunick commented on GitHub (Apr 4, 2025): i've been running into that issue in the last couple of weeks as well - there are a lot of images that are older that 2 week but they're not cleaned up. Version: 1.23.6
Author
Owner

@aco-jbruhns commented on GitHub (Jun 17, 2025):

we're running now into this problem a lot more often, as we're having some 500 container images produced within 3 month
The cleanup-rule:
Image
the preview:

Image

and some of the images, some more than 2 month old - i already started to cleanup the images by hand...

Image

@aco-jbruhns commented on GitHub (Jun 17, 2025): we're running now into this problem a lot more often, as we're having some 500 container images produced within 3 month The cleanup-rule: ![Image](https://github.com/user-attachments/assets/8951e168-0b26-4838-b9d7-6a51818176a7) the preview: ![Image](https://github.com/user-attachments/assets/a201dcd6-44a3-4954-b41e-cbb4d6014a11) and some of the images, some more than 2 month old - i already started to cleanup the images by hand... ![Image](https://github.com/user-attachments/assets/693814f2-2b83-4235-b24f-d826d50f9305)
Author
Owner

@lunny commented on GitHub (Jun 17, 2025):

This should be fixed by #34709 #34632

@lunny commented on GitHub (Jun 17, 2025): This should be fixed by ~#34709~ #34632
Author
Owner

@aco-jbruhns commented on GitHub (Jun 17, 2025):

thanks, looking forward to this

@aco-jbruhns commented on GitHub (Jun 17, 2025): thanks, looking forward to this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13445