-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
HTTP 500 on explore/code search after repo delete (with enabled code indexer via elasticsearch) #19076
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
Debug log
|
As system fix - you should call code search index clean/remove (only for deleted repo) after repo delete, for example like that As workaround manual remove from ES index will fix this problem.
|
I submitted a fix. Additionally the Elasticsearch index should be cleaned, however without a fix in the explore/code code, a 500 response could stil happen because of eventual consistency / delays in index purging. Furthermore a workaround could also be adding a custom template for explore/code.tmpl which checks if $repo exists: https://github.com/go-gitea/gitea/blob/release/v1.17/templates/explore/code.tmpl#L40 (use if, not with) |
This prevents a 500 response, because null pointer exceptions in rendering the template. This happends bc the repoId is not in the repoMap because it is delete fix #19076 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: 6543 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
Gitea Version
1.16.3
Git Version
1.8.3.1
Operating System
CentOS Linux 7 (Core)
How are you running Gitea?
Self-hosted instance in ProxMox
configuration:
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
Steps to reproduce:
Error from logs
If you need more information - please tell
Screenshots
No response
The text was updated successfully, but these errors were encountered: