Allow loading settings from outside of the postgresqleu tree#171
Allow loading settings from outside of the postgresqleu tree#171mwanner wants to merge 1 commit intopgeu:masterfrom
Conversation
b2d781d to
95f5666
Compare
|
I like this idea in general. In fact, I think something like this can be used to significantly simplify some of the hacks around the deployment we do on pginfra as well! But I think the ordering s wrong :) Today we have:
I think what you're adding is basically "site settings", so shouldn't they be loaded before local_settings? In a lot of ways, local_settings should be loaded last. The reason they're not loaded last toay is that local_settings is where you define the SKIN_DIRECTORY. So there's kind of a chicken and egg situation there. I think your idea of splitting it into two makes a lot of sense -- but it should then also be done for local_settings, as in it should have a similar override:ability. So I'm thinking maybe something like this (open for discussions):
Or something like that. If seems wrong that "system settings" would override "local settings"... |
|
Thanks for your consideration.
I agree and like this order. I'll try to adjust the PR accordingly.
This could be more of a naming issue. The entire project is called Do we need two different override modules? To avoid bike-shedding as much as possible, I tend to just |
Oh. Gotcha. I did not realize it came from that :) With that it makes a lot more sense.
Maybe? When deploying to multiple different servers (like we do for pginfra for example), having the module mentioned in point 1 above makes sense. It would be a good place to put things like logging configurations. And then the usecase that you mention have use for the module in point 5?
I don't think changing the base to So maybe |
|
@mhagander I updated this PR, please take another look. |
6f85177 to
261f8ee
Compare
261f8ee to
80d2758
Compare
12366d9 to
25e542b
Compare
|
(I'm back from the mostly dead wrt this project) The changes to tools/devsetup/dev_setup.sh kind of feels like they're left-over from something that did more? I'm not sure as they stand now they're really an improvement? The rest I think looks pretty good now. I think I'll add a pure "list of the order of processing" in the readme file, but I can do that as part of a merge. |
Thanks for reviewing, welcome back! ;-)
Correct, I think I intended to provide an alternative command using the newly introduced I'm happy removing the logical changes and leaving just a comment.
|
To ease building docker images and prevent having to maintain an in-tree file for local settings, allow a pgeu_system_global_settings module anywhere in the PYTHONPATH for configuration. In addition, also allow overrides to be applied after loading the skin through a pgeu_system_override_settings module in PYTHONPATH.
|
Adjusted accordingly. @mhagander |
|
This has been merged. Thanks! |
To ease building docker images and prevent having to maintain an
in-tree file for local settings, allow a pgeu_system_settings
module anywhere in the PYTHONPATH for configuration.
In addition, also allow overrides to be applied after loading the
skin.