-
-
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
Update object repo with the migrated repository #18684
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hoitih
changed the title
Update object
Code Indexer is not updated when migrating a repository using the API
Feb 9, 2022
repo
with the migrated repository
lunny
approved these changes
Feb 9, 2022
GiteaBot
added
the
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
label
Feb 9, 2022
Gusted
approved these changes
Feb 9, 2022
GiteaBot
added
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
and removed
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
labels
Feb 9, 2022
zeripath
approved these changes
Feb 9, 2022
Please send backport |
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Feb 10, 2022
* giteaofficial/main: Fix issue with docker-rootless shimming script (go-gitea#18690) tests: remove redundant comparison in repo dump/restore (go-gitea#18660) [skip ci] Updated translations via Crowdin Disable unnecessary OpenID/OAuth2 elements (go-gitea#18491) Add apply-patch, basic revert and cherry-pick functionality (go-gitea#17902) C preprocessor colors improvement (go-gitea#18671) Update object repo with the migrated repository (go-gitea#18684)
wxiaoguang
pushed a commit
to wxiaoguang/gitea
that referenced
this pull request
Feb 11, 2022
When migrating a repository (from GitHub) using the API (**POST** `repos/migrate`), the Code Indexer is not updated. Searching in the user interface will not return any results. When migrating the same repository using **+/New Migration** in the web interface, the search index is updated and searching works as expected. Caused by the fact that object `repo` is never updated with the migrated repo so `setting.Indexer.RepoIndexerEnabled && !repo.IsEmpty` in `modules/notification/indexer/indexer.go:NotifyMigrateRepository` always evaluates to `false`. Tested with gitea:1.16.1, MariaDB:10, Breve in `Run Mode: Dev`.
I did the backport #18726 |
6543
pushed a commit
that referenced
this pull request
Feb 11, 2022
When migrating a repository (from GitHub) using the API (**POST** `repos/migrate`), the Code Indexer is not updated. Searching in the user interface will not return any results. When migrating the same repository using **+/New Migration** in the web interface, the search index is updated and searching works as expected. Caused by the fact that object `repo` is never updated with the migrated repo so `setting.Indexer.RepoIndexerEnabled && !repo.IsEmpty` in `modules/notification/indexer/indexer.go:NotifyMigrateRepository` always evaluates to `false`. Tested with gitea:1.16.1, MariaDB:10, Breve in `Run Mode: Dev`. Co-authored-by: Hugo Hoitink <[email protected]>
zeripath
changed the title
Code Indexer is not updated when migrating a repository using the API
Update object repo with the migrated repository
Feb 12, 2022
Chianina
pushed a commit
to Chianina/gitea
that referenced
this pull request
Mar 28, 2022
When migrating a repository (from GitHub) using the API (**POST** `repos/migrate`), the Code Indexer is not updated. Searching in the user interface will not return any results. When migrating the same repository using **+/New Migration** in the web interface, the search index is updated and searching works as expected. Caused by the fact that object `repo` is never updated with the migrated repo so `setting.Indexer.RepoIndexerEnabled && !repo.IsEmpty` in `modules/notification/indexer/indexer.go:NotifyMigrateRepository` always evaluates to `false`. Tested with gitea:1.16.1, MariaDB:10, Breve in `Run Mode: Dev`.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
backport/done
All backports for this PR have been created
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
type/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When migrating a repository (from GitHub) using the API (POST
repos/migrate
), the Code Indexer is not updated. Searching in the user interface will not return any results.When migrating the same repository using +/New Migration in the web interface, the search index is updated and searching works as expected.
Caused by the fact that object
repo
is never updated with the migrated repo sosetting.Indexer.RepoIndexerEnabled && !repo.IsEmpty
inmodules/notification/indexer/indexer.go:NotifyMigrateRepository
always evaluates tofalse
.Tested with gitea:1.16.1, MariaDB:10, Breve in
Run Mode: Dev
.