Refactor #34305
closedTracker #29939: Improve setting definition DSL and move setting registry to memory
Stop creating settings in the DB
Description
We are still creating all the setting information in the settings table, but that can be dropped as of now.
Updated by The Foreman Bot almost 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ondřej Ezr
- Pull request https://github.com/theforeman/foreman/pull/9050 added
Updated by Adam Ruzicka over 2 years ago
- Related to Bug #34645: Some migrations will break after settings won't be stored in DB added
Updated by Ian Ballou over 2 years ago
Hello,
What Foreman version is this expected to make it into? Since Katello will need to change as well, it would be best to sync-up.
Updated by Ondřej Ezr over 2 years ago
Hi Ian!
I'd like to align it with 3.4 exactly for that reason, tho Katello should be quite ready as I've sent some PRs Katello way already, but obviously we will not know what breaks prior merge, there might be dragons and some are already. I've send some info Jeremy's way, but let's have it here:
Following text is sligly redacted for wide audience :)
Hi, there is an issue in katello with PR ^^ It happened to foreman as well and it was fixed in https://github.com/theforeman/foreman/pull/9155 so the root cause is that some weird AR subclass is initialized before some well behaved class (the well behaved first class was always Setting, but it will no longer be true) Q: what do we need to do to fix it? A: What I did in Foreman was to put `pp caller` on top of <foreman>/app/models/application_record.rb, figured that first time it gets required is from Facet, so I've postponed facet registration and all worked well again so my educated guess would be you will need to move https://github.com/Katello/katello/blob/2a10b1eb15f0dab79630aeba832b67b8ef043767/lib/katello/plugin.rb#L291 into a [in_to_prepare](https://github.com/theforeman/foreman/blob/8e0e3f78fb69789cacc29888bc121a541134269c/app/registries/foreman/plugin.rb#L481)
Updated by Ondřej Ezr over 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|de56ffb2806473db9dc0cfd1f13d38076c7e56ea.
Updated by Evgeni Golov over 2 years ago
- Related to Bug #34994: "ERROR: relation "application_records" does not exist" when using models inside migrations added
Updated by The Foreman Bot over 2 years ago
- Pull request https://github.com/theforeman/foreman/pull/9246 added
Updated by The Foreman Bot almost 2 years ago
- Pull request https://github.com/theforeman/foreman/pull/9570 added