wojciech.kapcia@tigase.net opened 7 years ago
|
|
Wojciech Kapcia wrote:
Indeed, it would be better to use some existing extension if possible. I am not that familiar with the DSL format to suggest something though. The syntax looks similar to many scripting languages. I guess if we used groovy extension some of the editors would already offer some syntax support.
It was useful in some cases in the past. I am not sure if this is still relevant. I am personally in favor of not having a single, large configuration file which needs to be changed to update some settings. It's easier to have kind of a "master" file which fairly static settings which can be relatively big and one or more small files with settings changed more often. On the other hand. How often a configuration is changed anyway? Indeed, the most handy this is for the testing system, where we run tests over the system with almost identical settings and only small parts changed, such as DB or something like this. Would it still be useful for our Test-NG system?
Simpler is better in this case for me.
I still like your idea of not supporting any single case but just discovering that something is not right and notify a user, preferably with a link to correct documentation. What I mean here. The new software could discover old configuration style or incompatible settings and does not need to handle it all transparently and automatically. It would be good enough to just print a warning with some explanation and pointers on where to find more information. |
|
Artur Hefczyc wrote:
%andrzej.wojcik any suggestion? From what I've read it's supposedly a groovy syntax, but there were a couple of changes (support for system properties and dashes in option names) hence it's not completely exact…
It's not, and I think majority of deployments use single config file (on, to be honest only TTS was using multiple config files…). What's more, I think you've said that we should provide relatively best defaults that would limit the need for tweaks, hence better defaults -> smaller config file.
I think not. With the recent changes it's better and simpler to user system properties for that (and now neither TTS nor TTS-NG use multiple configuration files - we simply use environment variable instead of a bunch of confing files just to store different JDBC property).
There is already an error message that should be more clear (vide #5005#note-9), i.e. indicating that particular configuration was not correct. To summarize:
Anything missing? |
|
As %wojtek mentioned, our DSL syntax is similar to groovy but it is not the same, so using groovy extension may lead to the errors being reported, while in fact configuration would be correct. |
|
Nothing more from my side. What about '.dsl' extension then? I might be able to create a syntax processor/highlighter for emacs if I have time. Not sure who else, except me would use it though. |
|
I think some of you use vim. You can ':set ft=groovy' or java, or anything else to change syntax highlighting. |
|
Artur Hefczyc wrote:
It seems this one exists already so maybe .tdsl (tigase dsl)? If noone (%kobit %bmalkow %Eric %Daniel ) opposes then %andrzej.wojcik, could you:
|
|
Looks OK to me, please assign ticket to me once it's finished so i know when to update documentation. |
|
%kobit What do you think about renaming config file? As we already decided to change suffix from |
|
config.tdsl |
|
I've changed the name of a config file, adjusted converter (with refactoring to move properties conversion to separate class) and modified web setup to use the proper file. This way it should be easier in the future to drop code used for conversion from properties file to DSL. Additionally, I've introduced new config option Old config option Config file can be updated and renamed if needed when:
|
|
There is a weird issue ocuring now - after stopping the server the file is reformatted and all non-normative settings are stripped (which includes commented out options). This is not ok. It's ok to run a one-time conversion but afterwards we should not touch/update configuration file. |
|
I tried to replicate this issue and was unable to do so. Right now we have 2 conversions which are taking place:
Done if
DSL is loaded and checked if any field/property needs to be converted (ie. due to rename of a property). My guess is that in your case the issue is with second conversion but in my case it is not executed. Please attach your config file which is being "replaced" every time. I need it to find cause of this issue - ie. find why converted is assuming that there was an upgrade if there wasn't one. |
|
I've just found an example config file which causes this issue during the upgrade of one of our servers. I need to check why this issue happens. Moreover, during this upgrade, it was detected that |
|
Fixed issue with constant upgrades and issue with Schema Manager. |
|
Still happening. I'm on the latest sources:
I've added explicit config file configuration (to avoid annoying changing default repository config and avoiding accidental commit):
Server starts:
|
|
I reviewed config file you've sent me and it required single time conversion which was done and after that no further conversions were done. |
|
~~Seems to be working ok now. I've notice one more property that's not updated: @--script-dir@~~ (wrong ticket) |
Type |
Task
|
Priority |
Normal
|
Assignee | |
RedmineID |
5710
|
Version |
tigase-server-8.0.0
|
Spent time |
48h 45m
|
Folloup to #5682:
As per request.
This is more RFC ticket.
I think that we should consider following:
is there existing extension, which usage would justify the switch (for example better out-of-the-box syntax high-lighting)?
do we want to support multi-configuration files setup (like previously)? it was used to support different configurations for different databases previously (for example in TTS) but right now we have support for environment variables and there is tendency to rely more and more on the defaults (so, opposition to having more and more configuration files);
developing on the above - do we need to configure the properties file name? I think majority of the installations use the default… we could hard-code the default (as right now - when the property or file from property is not present) and remove the hard-code from the
etc/tigase.conf
but still support overriding the default (if someone would like to point to init.properties in different location?).I think that updating the documentation would be the least of the problems - old threads would be more problematic.
%andrzej.wojcik %bmalkow %kobit %Daniel %Eric ?