OCA / server-env

Tools to manage environment-dependent configuration
GNU Affero General Public License v3.0
57 stars 157 forks source link

[[14.0][REF] make server_environment_ir_config_parameter compatible with server_environment_data_encryption #115

Closed florian-dacosta closed 2 years ago

florian-dacosta commented 2 years ago

This PR in draft state and is not necessarily meant to be merged, it will probably be best to aims the v16. But I'd like to have feedback from the users on the proposed changes and this way adapt it if there is strong blocakge about the current changes.

So, the idea is to make ir.config_parameter inherit from server.env.mixin like any other server_environment_* modules. It will standardize the module which seems nice to me, and this way make it compatible with server_environment_data_encryption which override the server.env.mixin mixin. I guess in the future we could have the same problem with any other module which aims to override server.env.mixin in order to add features for all server_environment_* modules.

The main blocking point maybe is that refactore changes the format of the configuration file. Indeed, the current module exects something like :

[ir.config_parameter]
name1=value1
name2=value2

While after the refactore, we have something similar as the other server_environement_* modules :

[ir.config_parameter.name1]
value=value1

[ir.config_parameter.name1]
value=value2

Since this configuration is made by developpers, and since usually when you install server_environment_ir_config_parameter you also install other server_environment_* modules, in my opinion, it is not a bad thing to go with this second format because this way it won't be different from the others server_environment_* modules. But, if it is a real issue, maybe we could find a way to keep the old one. (But it would complexify the module)

I'll be happy to have the opinion of the users of this module. @sbidoul @TDu @GillesTephaneMeyomesse @legalsylvain @sebastienbeau @gurneyalex @simahawk

florian-dacosta commented 2 years ago

In version 16, the _get_param native method totally bypass the ORM and make a direct sql query. This make ir_config_parameter totally incompatible with the server.env.mixin This refactore is obsolete in recent version so let's close it.