-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Store server env defaults by env name #169
Comments
AFAIK, this problem is solved by server_environment_data_encryption. The main goal of server_environment_data_encryption was actually to be able to configure the env values from the UI instead of from the config files on the server, so it has been made to store the value of each env in the database. (and that is also why all is crypted, because the secrets are also made to be stored in the database.) The ideal is the following : Then, from your production, you'll be able to configure in Odoo the value for each environments, and from the other environment, you'll only be able to read the value of its own environment. |
The customisation of a field is blocked if the field is defined in an environment file / envvar. The idea was to allow modules to declare fields as "dependent on the environment", then to let the integrator choose exactly what is shared or not:
I remember that we actually wanted to share the "default " value between environments, but I don't remember the exact use case. Just bear in mind that we would lose this ability to choose if a field must be shared or not. |
@florian-dacosta thanks for your feedback.
Sounds interesting. I guess that I can still edit the values for each environment from each env too? Question: how does it work w/ existing data? Can we safely install the module after setting env keys? @guewen thanks for your feedback
Over the time it drove us to several issues as long as we granted the user the freedom to manage some conf (which prevents us to be a bottleneck for doing things).
I'm not sure this is really desirable. However, |
Yes each environments can read/edit its own value, but if you edit a value on your preprod environment, you will loose it at next database refresh from prod, that is why the idea is to set every thing from production.
The module has no pre/post install hook, I thought about it but we did not actually use these default env value from database, so we did not really need this migration logic. |
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Is your feature request related to a problem?
Today, when a field is made configurable via env you can still edit values manually.
These values are stored into
server_env_defaults
.If you don't have env overrides such values will be used in all envs, which means that by restoring a prod db on staging you might have a prod conf in the wrong place.
This can easily happen when you leave to customers or to consultants the possibility to create new records manually (eg: add a new webservice to call on the fly).
Example of values today:
Describe the solution you'd like
Values from default should be mapped by environment. This way, we can lookup values by specific env.
Example of values in the future:
Describe alternatives you've considered
Any?
@guewen @gurneyalex @sebalix your input is appreciated :)
The text was updated successfully, but these errors were encountered: