Describe the bug
Running worker with the following config
setup:
timeseries:
enabled: false
results in
Configuration considered invalid, using dict as it is Traceback (most recent call last): File "/worker/manage.py", line 22, in <module> main() File "/worker/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 382, in execute settings.INSTALLED_APPS File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__ self._setup(name) File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/worker/django_scaffold/settings.py", line 12, in <module> DATABASES["timeseries"]["AUTOCOMMIT"] = False KeyError: 'timeseries'
Environment (please complete the following information):
Not relevant
To Reproduce
Try to run self hosted Codecov with timeseries disabled.
Expected behavior
I expect everything besides flags tab in the UI to work as stated in docs, a good start would be being able to actually run the worker.
Additional context
If I have the same config as above for the API, it will try to use the timeseries db when I browse repos in the frontend (multiple error messages in logs where the default timescaledb host is mentioned) only removing the key entirely from the config seems to work. Did not dig deeper into root cause. The same fix cannot be used for worker. In addition to this, worker does not try to convert the value of the enabled key from string to bool (if string value defined) unlike the API. This results in the worker assuming timeseries is enabled and it will try to connect to it when processing reports.
Describe the bug Running worker with the following config
results in
Configuration considered invalid, using dict as it is Traceback (most recent call last): File "/worker/manage.py", line 22, in <module> main() File "/worker/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 382, in execute settings.INSTALLED_APPS File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__ self._setup(name) File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/worker/django_scaffold/settings.py", line 12, in <module> DATABASES["timeseries"]["AUTOCOMMIT"] = False KeyError: 'timeseries'
Environment (please complete the following information): Not relevant
To Reproduce Try to run self hosted Codecov with timeseries disabled.
Expected behavior I expect everything besides flags tab in the UI to work as stated in docs, a good start would be being able to actually run the worker.
Additional context If I have the same config as above for the API, it will try to use the timeseries db when I browse repos in the frontend (multiple error messages in logs where the default timescaledb host is mentioned) only removing the key entirely from the config seems to work. Did not dig deeper into root cause. The same fix cannot be used for worker. In addition to this, worker does not try to convert the value of the enabled key from string to bool (if string value defined) unlike the API. This results in the worker assuming timeseries is enabled and it will try to connect to it when processing reports.