-
Notifications
You must be signed in to change notification settings - Fork 16
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
Setup scaffolding for dynamic global settings #664
Comments
We discussed about this issue in a meeting yesterday. We agreed on making it in small steps. This is a new refined implementation. Phase 1The simplest way to introduce dynamic settings for the new features.
Phase 2Migrate some static settings from the We need to change the current configuration service. The current service for static configuration:
We allow all the fields in the static config we want to make dynamic. NOTE: This has to be done manually by admins. The code will change the JSON schema but the admins have to include new fields manually in their databases. We can only add DB migrations for the default values. AE migration script could be provided. Phase 3Introduce a breaking change. In version Those fields will be ignored when reading the TOML config. Ideally, we only want to keep settings that require an application restart to be changed:
Or are very unlikely to change or require infrastructure changes:
And in general settings that are not ready to ve changed at runtime. TODO
NOTES
cc @da2ce7 |
Cameron's ProposalKey Points
Migration PlanTo avoid breaking changes and provide a smooth transition to the new configuration system, the following phased migration plan is proposed: Phase 1: Introduction of New Configuration Structure
Phase 2: Gradual Migration of Settings
Phase 3: Enable Dynamic Configuration Through Database
Phase 4: Deprecation and Removal of
|
Parent issue: #657
Context
Configuration injected when the Index starts is the only way to configure/customise the application. See below an example configuration injected via a config file and env vars.
Given that:
Many configuration values were originally added to the file configuration because it was easy. However, there are some issues with that approach:
It would be good to allow the
admins
(platform admin, not sysadmin responsible for the infrastructure) to change some settings. In fact, theadmin
is responsible for many of the current settings we put in the config file.Naming
Proposal
We need to add a new module/context for dynamic settings.
I see only these types of values:
Some can be grouped, but that can be implemented in a second iteration.
We can have a new table,
torrust_global_settings
. The implementation details should go on the Index repo.Example configuration in JSON
The text was updated successfully, but these errors were encountered: