Delete all repository records which are missing their Git files - does not work #1411

Closed
opened 2025-11-02 03:59:59 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @strk on GitHub (Dec 30, 2017).

  • Gitea version (or commit ref): f5155b9913 (1.4.0-dev)
  • Git version: 2.11.0
  • Operating system: Ubuntu 17.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No -- I DO NOT HAVE PERMISSIONS TO TRY IT THERE
    • Not relevant
  • Log gist:
    nothing interesting there

Description

Hitting the Delete all repository records which are missing their Git files task operation starter from the admin panel, which results in a GET to /admin?op=3 URL, after REMOVING a git repository, does not remove the corresponding repository record from the database.

Originally created by @strk on GitHub (Dec 30, 2017). - Gitea version (or commit ref): f5155b99136b6e19ab494a97adfcee1810a3d5e7 (1.4.0-dev) - Git version: 2.11.0 - Operating system: Ubuntu 17.04 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No -- I DO NOT HAVE PERMISSIONS TO TRY IT THERE - [ ] Not relevant - Log gist: nothing interesting there ## Description Hitting the `Delete all repository records which are missing their Git files` task operation starter from the admin panel, which results in a GET to `/admin?op=3` URL, after REMOVING a git repository, does not remove the corresponding repository record from the database.
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 03:59:59 -06:00
Author
Owner

@strk commented on GitHub (Dec 30, 2017):

It may be related to the status of the offending repository, which is displayed as having no organization (?)

Can you understand what is this all about, @bkcsoft ?
Also note that the organization link points to an organization called "error".
I've had such "error" organizations in my production deploy as well, there seem to be a pattern here, can it be some code is taking an error typename as an organization name for some reason ?

selection_003

@strk commented on GitHub (Dec 30, 2017): It may be related to the status of the offending repository, which is displayed as having no organization (?) Can you understand what is this all about, @bkcsoft ? Also note that the organization link points to an organization called "error". I've had such "error" organizations in my production deploy as well, there seem to be a pattern here, can it be some code is taking an error typename as an organization name for some reason ? ![selection_003](https://user-images.githubusercontent.com/289678/34454481-b543d57a-ed6c-11e7-8a2e-2f2c7d514b5e.png)
Author
Owner

@strk commented on GitHub (Dec 31, 2017):

I checked the database and found that the "test" repository had a owner_id value for which no id existed in the public.user table. In that situation the admin page for managing repositories also fails with an error message, making it impossible to recover via GUI

@strk commented on GitHub (Dec 31, 2017): I checked the database and found that the "test" repository had a `owner_id` value for which no `id` existed in the `public.user` table. In that situation the admin page for managing repositories also fails with an error message, making it impossible to recover via GUI
Author
Owner

@lunny commented on GitHub (Jan 9, 2019):

Is this still a problem?

@lunny commented on GitHub (Jan 9, 2019): Is this still a problem?
Author
Owner

@arbv commented on GitHub (Mar 1, 2019):

I can confirm this on Postgres. I tried to delete a repository which contained LFS files. As the result, the data is gone but I can still find the repository listed in the user repositories. It is impossible to delete as trying to look at the data leads to the 500 page. Deleting emty repositories from within admin panel does not help too.

I am running 1.7.2 ARMv7 build.

@arbv commented on GitHub (Mar 1, 2019): I can confirm this on Postgres. I tried to delete a repository which contained LFS files. As the result, the data is gone but I can still find the repository listed in the user repositories. It is impossible to delete as trying to look at the data leads to the 500 page. Deleting emty repositories from within admin panel does not help too. I am running 1.7.2 ARMv7 build.
Author
Owner

@tekgoblin commented on GitHub (Mar 8, 2019):

Same thing happens when using an sqlite backend with an LFS repo

@tekgoblin commented on GitHub (Mar 8, 2019): Same thing happens when using an sqlite backend with an LFS repo
Author
Owner

@zeripath commented on GitHub (Jun 22, 2019):

I think this might be fixed by #7213

@zeripath commented on GitHub (Jun 22, 2019): I think this might be fixed by #7213
Author
Owner

@zeripath commented on GitHub (Jun 22, 2019):

Yep this should have been fixed by #7213 - therefore I'm going to close this.

@zeripath commented on GitHub (Jun 22, 2019): Yep this should have been fixed by #7213 - therefore I'm going to close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1411