Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

projects lost when merging per-project setting in read-only configuration with active configuration #2147

Open
vladak opened this issue Jun 8, 2018 · 6 comments
Labels

Comments

@vladak
Copy link
Member

vladak commented Jun 8, 2018

https://github.com/oracle/opengrok/wiki/Per-project-configuration advises to put per-project configuration into read-only configuration file. However when merged with a configuration retrieved from webapp that already contains some projects via:

/opengrok/dist/bin/projadm.py -b /opengrok -R /opengrok/etc/readonly_configuration.xml -r

the resulting configuration.xml will only have the projects specified in read-only configuration.

@vladak
Copy link
Member Author

vladak commented Jun 8, 2018

One way how to deal with this would be to change the workflow - augment the Project Message to be able to set per-project properties and then retrieve the configuration so that it is persistent.

@vladak
Copy link
Member Author

vladak commented Jun 8, 2018

I think this is a fall-out of how XML serialization is done. As a result, merge is not really a merge.

vladak pushed a commit to vladak/OpenGrok that referenced this issue Jun 11, 2018
@vladak
Copy link
Member Author

vladak commented Jun 11, 2018

Possibly as a fix the configuration merge needs to be more intelligent.

@tulinkry
Copy link
Contributor

tulinkry commented Jun 11, 2018

I think some customizations in this code
https://github.com/oracle/opengrok/blob/master/src/org/opensolaris/opengrok/index/Indexer.java#L903-L920
would do the trick

vladak pushed a commit that referenced this issue Jun 14, 2018
@vladak
Copy link
Member Author

vladak commented Jul 13, 2018

This has a workaround so stripping the stopper tag for now.

@vladak vladak removed the stopper label Jul 13, 2018
@vladak
Copy link
Member Author

vladak commented Aug 31, 2018

Thel workaround needs a tweak for full global (not per project) indexing - I believe the per-project setting in read-only configuration is applied after the projects are discovered however once the initial index is done, the per-project settings have to be removed from read-only configuration and set in the webapp.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants