Skip to content
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

[Bug] REPO_INDEXER doesn't index mirrored repository #11200

Closed
2 of 7 tasks
ghost opened this issue Apr 24, 2020 · 5 comments · Fixed by #11309
Closed
2 of 7 tasks

[Bug] REPO_INDEXER doesn't index mirrored repository #11200

ghost opened this issue Apr 24, 2020 · 5 comments · Fixed by #11309
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 24, 2020

  • Gitea version (or commit ref): 1.11.4
  • Git version: Not relevant
  • Operating system: docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: Not relevant

Description

The REPO_INDEXER doesn't index the mirrored repository automatically. I have to remove the .bleve every time to start a new reindex for all repositories.

It would be great if the indexing can be triggered manually on a selected repository. Would be better if indexing is automatically triggered after pulling from remotes.

Screenshots

Here is my indexer configuration

[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = /data/gitea/indexers/repos.bleve
UPDATE_BUFFER_LEN = 20
MAX_FILE_SIZE = 1048576
REPO_INDEXER_INCLUDE = 
REPO_INDEXER_EXCLUDE = resources/bin/**
@ghost
Copy link
Author

ghost commented Apr 30, 2020

Is it possible to call NotifyPushCommits manually form GUI, or via some command-line?

func (r *indexerNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {

Currently it is only called from repofiles/action.go, not for mirrored commits.

notification.NotifyPushCommits(pusher, repo, opts.RefFullName, opts.OldCommitID, opts.NewCommitID, opts.Commits)

@ghost
Copy link
Author

ghost commented Apr 30, 2020

For mirrored commits, there is a NotifySyncPushCommits notification.

notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, result.refName, oldCommitID, newCommitID, theCommits)

But the implementation seems to be missing in indexer/indexer.go.

There is only one for NotifyPushCommits, not for NotifySyncPushCommits

func (r *indexerNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {

zeripath added a commit to zeripath/gitea that referenced this issue May 6, 2020
Thanks to @simon-on-gh for tracking down the issue.

Fix go-gitea#11200

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

zeripath commented May 6, 2020

To me it seems that simply copying the code for NotifyPushCommits would suffice to fix this issue.

@lunny lunny added this to the 1.11.5 milestone May 8, 2020
zeripath added a commit that referenced this issue May 8, 2020
Thanks to @simon-on-gh for tracking down the issue.

Fix #11200

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue May 8, 2020
Thanks to @simon-on-gh for tracking down the issue.

Fix go-gitea#11200

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue May 8, 2020
Thanks to @simon-on-gh for tracking down the issue.

Fix #11200

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@ghost
Copy link
Author

ghost commented May 18, 2020

It seems that this bug wasn't fixed in the 1.11.5 release. Was the backport included in this release?

@zeripath
Copy link
Contributor

func (r *indexerNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {

ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
Thanks to @simon-on-gh for tracking down the issue.

Fix go-gitea#11200

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants