rework settings
Categories
(Tecken :: General, task, P2)
Tracking
(Not tracked)
People
(Reporter: willkg, Assigned: willkg)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Settings is currently done using django-configurations. It's a class hierarchy that difficult to externalize in the documentation in an autodoc way. It's always hard for me to figure out which configuration goes where.
I want to simplify it and switch it to use Everett which automatically generates documentation.
| Assignee | ||
Comment 1•5 years ago
•
|
||
django-configurations uses the imp module which is deprecated. Peter wrote up an issue about it a couple of years ago.
https://github.com/jazzband/django-configurations/issues/190
The imp module isn't long for this world. Further, django-configurations copies the Django settings and that kicks up a bunch of other deprecation warnings in the tests. Going to bump this up to a P2 to fix soon.
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
| Assignee | ||
Comment 4•5 years ago
|
||
I got a chunk of this done, but I'm not going to get to the rest of it any time soon.
| Assignee | ||
Comment 5•4 years ago
|
||
Making this block the GCP migration because it'll be a lot easier to set up a new infrastructure if we have a settings system that has better configuration error messages.
Grabbing it to do soon.
| Assignee | ||
Comment 6•3 years ago
|
||
| Assignee | ||
Comment 7•3 years ago
|
||
| Assignee | ||
Comment 8•3 years ago
|
||
| Assignee | ||
Comment 9•3 years ago
|
||
I created a PR in the infa repo.
I think the order of operations should go like this:
- run
./manage.py diffsettings --all --output unifiedin stage so we know what configuration looked like before anything happened - finish up and land the PR in the infra repo; that requires some values to be set
- finish up and land PR 2523
- landing PR 2523 will kick off a stage deploy
- fix any issues from the deploy
- run
./manage.py diffsettings --all --output unifiedand fix any discrepancies
| Assignee | ||
Comment 10•3 years ago
|
||
Jason landed the infra PR.
willkg merged PR #2523: "bug 1667211: switch from django-configuration to everett" in 0281e18.
This should trigger a stage deploy. I'll keep an eye on that.
| Assignee | ||
Comment 11•3 years ago
|
||
| Assignee | ||
Comment 12•3 years ago
|
||
willkg merged PR #2525: "bug 1667211: fix OIDC_RP_CLIENT_ID configuration parsing" in 0014149.
Previously, OIDC_RP_CLIENT_ID was a SecretValue in server environments and an IntValue in the local dev environment. I screwed up and picked the wrong parsing method. This fixes that.
| Assignee | ||
Comment 13•3 years ago
|
||
| Assignee | ||
Comment 14•3 years ago
|
||
willkg merged PR #2526: "bug 1667211: fix config dict value parsing" in 95a8069.
UPLOAD_URL_EXCEPTIONS takes a value that needs to be converted to a Python dict. I used json.loads, but then it turns out we use single quotes and that's not valid JSON. This switches the parsing code to use ast.literal_eval which works with single quotes and is better in a million ways.
| Assignee | ||
Comment 15•3 years ago
|
||
Stage deployed fine. I checked the settings and everything looks good.
However, one thing we fixed as a typo setting the statsd namespace, so now all the keys are namespaced and the graphs show nothing. We talked about it and decided to endure short-term pain and keep the fix. I'll update graphs on monday. In a month, it won't matter.
Also, building the docs on readthedocs is broken. I wrote up bug #1760308 for that.
| Assignee | ||
Comment 16•3 years ago
|
||
This got deployed to prod in bug #1763165. Everything looks like it's working correctly. Marking as FIXED.
Description
•