Deleting container images is non-deterministic #11123

Open
opened 2025-11-02 09:28:13 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @delvh on GitHub (Jun 28, 2023).

Description

At the moment, it is only somewhat possible to delete container packages:
When you come from the org packages tab and click on delete for any package, you simply get redirected to the org page listing all packages.
When you come from the repo packages tab, there is a chance of about 50-60% that you will get the same behavior as with the org packages tab.
However, after trying about three to four times per package, I was finally able to delete one.

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

Nothing. I mean, we only set the log level to WARNING, but apart from a lot of (somewhat) unrelated 2023/06/28 11:23:44 ...les/cache/context.go:71:SetContextData() [W] [649bfc20] cannot get cache context when setting data: *db.Context.WithValue(type struct {}, val NotifyPackageDelete) messages, there was nothing.

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

From binary.

Database

SQLite

Originally created by @delvh on GitHub (Jun 28, 2023). ### Description At the moment, it is only somewhat possible to delete `container` packages: When you come from the org `packages` tab and click on `delete` for any package, you simply get redirected to the org page listing all packages. When you come from the repo `packages` tab, there is a chance of about 50-60% that you will get the same behavior as with the org `packages` tab. However, after trying about three to four times per package, I was finally able to delete one. ### Gitea Version 1.19.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist **Nothing**. I mean, we only set the log level to `WARNING`, but apart from a lot of (somewhat) unrelated `2023/06/28 11:23:44 ...les/cache/context.go:71:SetContextData() [W] [649bfc20] cannot get cache context when setting data: *db.Context.WithValue(type struct {}, val NotifyPackageDelete)` messages, there was nothing. ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? From binary. ### Database SQLite
GiteaMirror added the topic/packagestopic/ui-interaction labels 2025-11-02 09:28:13 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Jun 29, 2023):

There may be a misunderstanding. You only delete a package version from the ui. If there are multiple versions the package is still there and you can view it from the package list. It may be better to redirect to the package again if there is still another version than the redirect to the package list after the delete.

@KN4CK3R commented on GitHub (Jun 29, 2023): There may be a misunderstanding. You only delete a package **version** from the ui. If there are multiple versions the package is still there and you can view it from the package list. It may be better to redirect to the package again if there is still another version than the redirect to the package list after the delete.
Author
Owner

@delvh commented on GitHub (Jun 29, 2023):

Okay, if that's the case, then we should probably indicate that you only delete the latest version by "deleting the package".
Or alternatively add a delete all versions button.

@delvh commented on GitHub (Jun 29, 2023): Okay, if that's the case, then we should probably indicate that you only delete **the latest version** by "deleting the package". Or alternatively add a `delete all versions` button.
Author
Owner

@KN4CK3R commented on GitHub (Jun 29, 2023):

No, not the latest version. You delete the version you are looking at. The version is mentioned in popup:
grafik

But yes, this area should mention "version" somewhere:
grafik

@KN4CK3R commented on GitHub (Jun 29, 2023): No, not the latest version. You delete the version you are looking at. The version is mentioned in popup: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/9db60d31-a7fc-48fa-a869-ea667954a37f) But yes, this area should mention "version" somewhere: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/beed2e5c-c514-47bf-bd70-b7126d30a142)
Author
Owner

@lonix1 commented on GitHub (Aug 1, 2023):

As shown in my dupe issue, the wording needs some work.

I was apprehensive to click that button because I assumed it would delete the entire package, instead of just a specific version. Since I never clicked the button, I never saw the wording shown in the image above, and assumed it's not possible to delete a specific version.

@lonix1 commented on GitHub (Aug 1, 2023): As shown in my [dupe issue](https://github.com/go-gitea/gitea/issues/26256), the wording needs some work. I was apprehensive to click that button because I assumed it would delete the entire package, instead of just a specific version. Since I never clicked the button, I never saw the wording shown in the image above, and assumed it's not possible to delete a specific version.
Author
Owner

@lonix1 commented on GitHub (Aug 1, 2023):

Probably too late to add more ideas, but what would be the best UX is to have a small delete button next to each version, on the "view all" versions page: https://gitea.example.com/org/-/packages/container/repo/versions.

EDIT:
Nah, it should be hard to delete a version. The current page is ok. Just the wording should be improved.

@lonix1 commented on GitHub (Aug 1, 2023): Probably too late to add more ideas, but what would be the best UX is to have a small delete button next to each version, on the "view all" versions page: `https://gitea.example.com/org/-/packages/container/repo/versions`. EDIT: Nah, it should be hard to delete a version. The current page is ok. Just the wording should be improved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11123