-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: in-db config values not loading for pgrst.server_trace_header
and pgrst.server_cors_allowed_origins
#3346
Conversation
I tried using postgrest/src/PostgREST/App.hs Lines 70 to 74 in f1f01f1
But after reloading the Still, I'm not entirely sure if this is the best solution but it works in using the updated in-db configuration values. |
f062a2d
to
4fa7c43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice work 💯
edc513c
to
4947bdf
Compare
…d pgrst.server_cors_allowed_origins
To correctly test in-db override of config file values, the former must be different from the latter.
4947bdf
to
5ee7189
Compare
I still don't understand why we want to load |
server-timing-enabled makes a lot of sense for instance. If you'd want to quickly get timings for a request. Changing that through the db is much quicker than through the config.
IMO the only things that shouldn't are |
Maybe it's also the other way around. Maybe I feel like the |
Perhaps we can settle this with a shared design principle. I'd like to pursue extreme-database centric architecture (pdf), which goes a bit beyond "db as source of truth". Right now:
For now following this principle for PostgREST means that everything should be configurable through the db. WDYT? |
For the kubernetes-world, this would be a step backward. If you run PostgREST in a cluster, it should be configured via kubernetes, not the database. |
I think the original idea of database config was to put the config for things to the same place where a change would occur, which would make the config need to change. Examples:
Or to reframe it: When configuring PostgREST, I would like to theoretically point multiple instances of PostgREST, with possibly very different "outside" environments, at the same database with the same postgrest user. In this case, all the config that is the same, because it depends on database stuff, should be in the database. All the config that is about the environment that PostgREST runs in should be outside the database. |
Closes #3345