-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Repo Indexer Type Elastic Search does not work with new migrated repositories #16986
Closed
2 of 6 tasks
Labels
Comments
@Joannazyx Could you help to confirm that #16991 fix this? |
zeripath
pushed a commit
that referenced
this issue
Sep 8, 2021
6543
pushed a commit
to 6543-forks/gitea
that referenced
this issue
Sep 8, 2021
6543
pushed a commit
to 6543-forks/gitea
that referenced
this issue
Sep 8, 2021
zeripath
pushed a commit
that referenced
this issue
Sep 8, 2021
Fix #16986, #16152 Co-authored-by: Lunny Xiao <[email protected]>
zeripath
pushed a commit
that referenced
this issue
Sep 9, 2021
Fix #16986, #16152 Co-authored-by: Lunny Xiao <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[x]
):I set logo level to INFO in app.ini
Description
I'm trying to build a gitea with Code Search feature. And I hope it will immediately refresh index after any updates.
I choose elastic search as the engine and in most cases it works well. But when I migrated a repository from Github and tried using Code Search feature on the UI to find a line from that repository, it did not return any output. And in log it seems like that gitea didn't report to elastic search after migrating.
I have to manually commit something new to the new repo to trigger report to elastic search, or delete the old elastic search topic and create a new index.
I've found a related issue: #16152, but my search engine is different so I still post a new issue.
Because the original log does not provide enough info for me, I add a few log.Info codes with "zyx test" as prefix, and tactically it won't affect the original progress.
the log
In MigrateRepositoryGitData() , gitea has already set repo.IsEmpty to false(means that the repo in Github is not empty). But when doing NotifyMigrateRepository(), gitea create a new repo, so it still thinks the repo is empty and won't report to elastic search.
So my question is, is there a special reason for gitea to consider new migrated repo as empty? If so, it seems to me that NotifyMigrateRepository() shouldn't check repo.IsEmpty field when reporting to code search engine.
relevant code NotifyMigrateRepository(with my log codes)
Thanks for reading my question, look forward to your kind reply~
Screenshots
The text was updated successfully, but these errors were encountered: