Fix settings regression and unpin dynaconf

Settings were failing to load with dynaconf>=3.0 because there was a
breaking change that disabled environments loading [1].

Fixes: https://github.com/ansible-community/ara/issues/149

[1]: https://www.dynaconf.com/release_notes/#breaking-changes

Change-Id: Ia97ba4a7f10aedc3b3c30b58beed68baa329cad3
This commit is contained in:
David Moreau Simard 2020-08-10 20:09:57 -04:00
parent 8628be9c45
commit 9e88f33c5e
No known key found for this signature in database
GPG Key ID: 7D4729EC4E64E8B7
3 changed files with 6 additions and 7 deletions

View File

@ -34,7 +34,10 @@ BASE_DIR = os.environ.get("ARA_BASE_DIR", os.path.expanduser("~/.ara/server"))
DEFAULT_SETTINGS = os.path.join(BASE_DIR, "settings.yaml")
settings = LazySettings(
GLOBAL_ENV_FOR_DYNACONF="ARA", ENVVAR_FOR_DYNACONF="ARA_SETTINGS", SETTINGS_MODULE_FOR_DYNACONF=DEFAULT_SETTINGS
environments=True,
GLOBAL_ENV_FOR_DYNACONF="ARA",
ENVVAR_FOR_DYNACONF="ARA_SETTINGS",
SETTINGS_MODULE_FOR_DYNACONF=DEFAULT_SETTINGS,
)
# reread BASE_DIR since it might have gotten changed in the config file.

View File

@ -12,9 +12,7 @@ djangorestframework>=3.9.1
django-cors-headers
django-filter
django-health-check
# Pin due to settings regression in 3.0
# See https://github.com/ansible-community/ara/issues/149
dynaconf[yaml]<3.0
dynaconf[yaml]
tzlocal
whitenoise
pygments

View File

@ -61,9 +61,7 @@ server=
django-cors-headers
django-filter
django-health-check
# Pin due to settings regression in 3.0
# See https://github.com/ansible-community/ara/issues/149
dynaconf[yaml]<3.0
dynaconf[yaml]
tzlocal
whitenoise
pygments