-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Repository owner can be nil if deleted and that breaks the listing of repositories. #24857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can make a pull request with this patch or one avoiding to retrieve in RenderRepoSearch a empty owner repo in the first place whatever you do think is more elegant. |
I think a user containing all the orphan repositories would be the ideal thing, but I have deleted users because many of them where spam accounts and in those cases their repositories are spam also. PD: I saw that such thing exist and it is called ghostuser, maybe RenderRepoSearch should return ghostuser for Owner = nil, althought I am not really sure if that makes sense. |
It's impossible because there is a transaction on Gitea side. I think the correct method is to run |
I agree that |
This situation is not by design, so it should return 500. Other problems, like issues' author deleted, it will be displayed as ghost which is by design. I don't think it can be resolved simply. If the UI isn't crash, the problem cannot be found. And even if you ignore that on search or list UI, when click in the detail page or any other repo page, it will return 500 still. If you want to fix all of them, it's a nightmare. |
I will run gitea doctor. Where is this documented? How could we make admins more aware that the real issue is the failure to run gitea doctor? |
Description
I do not know if it is still posible to reach a point where deleting a owner does not delete its repositories, but is was once possible and failure to handle that breaks the lists of repositories.
Before patching it myself to avoid the bug.- By not listing repositories without owner.- this url would throw a 500 error.
https://git.owlcode.tech/explore/repos?page=2&sort=recentupdate&q=&topic=false&language=&only_show_relevant=false
Gitea Version
1.19.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.39.3
Operating System
Gentoo GNU/Linux
How are you running Gitea?
Built from portage renaming the ebuild to point the lastest upstream version to see if that solved the bug, it did not.
I have added this patch to /etc/portage/patches to avoid the bug:
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: