codecov / feedback

A place to discuss feedback about the pull request and web product experience.
38 stars 10 forks source link

24.4.1 Upgrade Errors #343

Closed chaseconey closed 6 months ago

chaseconey commented 7 months ago

Describe the bug When upgrading to the latest stable version of codecov, worker is exiting with error code 1.

Environment (please complete the following information):

To Reproduce Upgrade from 24.2.1 to 24.4.1.

Expected behavior A working stack ๐Ÿ˜….

Additional context

I believe this is the error that is causing the whole stack to fail. We are not receiving this error with 24.2.1 stack.

KeyError: 'timeseries'
Traceback (most recent call last):
  File "/worker/main.py", line 15, in <module>
    import app
  File "/worker/app.py", line 21, in <module>
    django.setup()
  File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  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 "/worker/django_scaffold/settings.py", line 12, in <module>
    DATABASES["timeseries"]["AUTOCOMMIT"] = False

We were not actually using the timeseries configuration, as it seemed to be optional. I did go ahead and create a new pg database and configured the timeseries_database_url in the codecov.yml to see if that would do anything and the error persisted. I never saw any tables get migrated in this new database either.

chaseconey commented 7 months ago

Looks like this might have something to do with it. Having a little bit of trouble tracing it all through the codebase, but I believe this is the line that was added that is showing up in the error.

https://github.com/codecov/worker/compare/self-hosted-24.2.1...self-hosted-24.4.1#diff-061c68e9b47c64f44b5d1fcde4a07eb9a2d40b8505193c7aecda2573b8dd3b30R12

chaseconey commented 6 months ago

Hey there ๐Ÿ‘‹ .

Just wanted to follow up and see if there is anything that we should be looking at or trying?

Thanks!

chaseconey commented 6 months ago

Looks like upgrading to 24.5.1 fixed this issue for me.