-
Notifications
You must be signed in to change notification settings - Fork 762
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
Reindexing project after repositories were renamed/deleted #3421
Comments
With per project workflow you basically need to re-add the project that changed the repositories using the RESTful API (the |
Thanks!
I wonder, is my use-case very specialized? Is there a better group-project-repo arrangement that I should consider? The issue is just that we would like to index all the code in our institute, which is spread over many repositories that belong to different "groups" (as in entities at our institute). These repositories appear and disappear over time as work evolves. Finally, you mention the issue in #3402 - my java is very rusty, but I see there is a fair bit of python in there - With a bit of guidance, I could help extending the python tools with this functionality, if I manage to dig out a little freetime to work on this. |
I'd say it is a bit uncommon, at least to my knowledge. As I said, nothing wrong with that as long as you are not rewriting history of the repositories that stick around.
That's already in progress. @tulinkry mentioned that he would like to work on it in the past and my thinking was that it should not really take a lot of time however in the end I was surprised how much effort was needed to make it happen - it was not too much work, I was just surprised. |
To wrap this up, for your use case it should be sufficient to run |
OK, thank you very much! I'll include that into my workflow then 😄 |
Cool. let us know how it goes. |
Describe the bug
We have an opengrok instance with several projects each containing several repositories. A nightly cronjob checks on our remote git servers the various repositories, clones new repositories and (when this occasionally happens) deletes repositories that were deleted/moved on the remote git server. The rough directory organization looks like this:
Now after our git repo synrhonization runs it looks like this:
We then ran the project reindexing tool as follows to refresh the index reflecting the changes in the filesystem:
followed by the configuration merging as described in the wiki:
When I then go on the web interface I see that the project repository list is still out of sync
Digging further, I did a curl request:
which also returns an outdated list of repositories.
Looking further into the
configuration.xml
I see still the non-existing repositories mentioned.To Reproduce
opengrok-project-reindex
Expected behavior
I expect that changing repositories inside the project will be reflected in the index after rerunning the indexer. Or if that is not possible, I would appreciate some guidance on how to update the index through the RESTFul API?
Maybe more fundamentally. Are repository changes supported at all, or do we have to delete the project entirely and index it from scratch if a repository is added/removed/renamed?
Additional context
I tried deleting the index to the repository and reindexing, but now the project is completely gone from the UI:
No more project show up in the UI, but doing
curl -X GET -s --include "http://localhost:8080/source/api/v1/projects/proj_A/repositories"
will show me still the old outdated project list.Versions
Ubuntu 18.04
opengrok: 1.5.11
jdk: openjdk 11.0.9.1 2020-11-04
tomcat: 9.0.16
The text was updated successfully, but these errors were encountered: