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

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.

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

No branches or pull requests

2 participants