Feature #30862
Tracker #29939: Improve setting definition DSL and move setting registry to memory
Introduce SettingRegistry as a setting inventory
Pull request:
Fixed in Releases:
Found in Releases:
Description
Bring int SettingRegistry, that should be an inventory for the settings.
Related issues
Associated revisions
Refs #30862 - do not validate new settings
While creating the settings, the definitions are not loaded yet, so the
validations depending on other setting values are failing. We should not
validate on create anyway.
This is fixing a forgotten validation on new setting from 8137b14c.
History
#1
Updated by Ondřej Ezr almost 2 years ago
- Blocked by Refactor #30860: Create SettingPresenter as a proxy for setting UI values added
#2
Updated by The Foreman Bot almost 2 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8002 added
#3
Updated by The Foreman Bot about 1 year ago
- Fixed in Releases 2.5.0 added
#4
Updated by Ondřej Ezr about 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|8137b14ca0bc12e9a96258b02588eaa042d5eff8.
#5
Updated by The Foreman Bot about 1 year ago
- Pull request https://github.com/theforeman/foreman/pull/8464 added
#6
Updated by Ondřej Ezr about 1 year ago
- Related to Bug #32729: Dynflow doesn't reflect changes in Setting added
#7
Updated by Ondřej Ezr 12 months ago
- Related to Bug #32953: Fix the creation of missing settings added
#8
Updated by Ondřej Ezr 12 months ago
- Related to Bug #32963: Load only core setting values the first time we load them added
#9
Updated by Ondřej Ezr 10 months ago
- Related to Refactor #33280: Mark Settings defined by DSL as special category in DB added
#10
Updated by Ondřej Ezr 4 months ago
- Related to Refactor #34570: SettingPresenter - pass kwarks in Ruby 3 compatible format added
#11
Updated by Ondřej Ezr 4 months ago
- Related to Bug #34573: Settings defined by DSL are not properly encrypted added
Fixes #30862 - introduce SettingRegistry (#8002)
SettingRegistry keeps all the setting information as set of SettingPresenters in memory.
This registry should be the public API for accessing setting values and keeps all the information about settings.
That will allow dropping all information except `name` and `value` from database.
The public interface should be:
`Foreman.settings[<name>] => value` with syntactic suggar `Setting[<name>]` proxying to this method.
We load values from database per request and repopulate the values, what is quite fast. This allows us dropping the cache for setting.
Key implementation features:ready or not by `ready?` method.