oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.33k stars 746 forks source link

opengrok-sync invalid remote leads to skipping the index #2530

Open tulinkry opened 5 years ago

tulinkry commented 5 years ago

I didn't find a way how to ignore a project in opengrok-mirror but still perform the index of the project. My case is that I want to use sync/mirror even for the first index from scratch, which works fine except this particular case.

The use case is: The repository has invalid remote (it does not exist anymore). So basic mirror fails with 1 (with some stderr), skipping the index. I tried to use mirror-config.yml with disabled: true for that particular project, that skips the mirror part (no stderr) but also skips the index.

Expectations: Mirroring skipped/failed, but I still want to index the source code if it hasn't been indexed before.

vladak commented 5 years ago

If a project is disabled, mirror.py will exit with 2 thus you can run sync.py with --driveon to continue past that command.

tulinkry commented 5 years ago

But that's not the original design to have --driveon in the cron entry, is it? New project can be added at anytime without the need to change the cron command.

tulinkry commented 5 years ago

I'd be for some permanent solution, possibly operating on the indexed flag on each project to determine if this run is a first index or not.