Skip to content
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

Support disabled timescaledb #260

Closed
Alexsaphir opened this issue Jun 24, 2024 · 1 comment
Closed

Support disabled timescaledb #260

Alexsaphir opened this issue Jun 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@Alexsaphir
Copy link

Alexsaphir commented Jun 24, 2024

📣 Feedback / 🐛 Bugs

Trying to self host codecov, SETUP__TIMESERIES__ENABLED set to false.

The migrations failed, I suppose since there is no timeseries database set up.
If running codecov without timeseries enable is still supported, the migrations for this part should not be enabled in this case.

(Output from the api container, the code seem to correspond to this repo)

{"message": "Codecov is starting migrations...", "asctime": "2024-06-24 20:01:50,410", "name": "shared.django_apps.legacy_migrations.management.commands.migrate", "levelname": "INFO", "lineno": 116, "pathname": "/usr/local/lib/python3.12/site-packages/shared/django_apps/legacy_migrations/management/commands/migrate.py", "funcName": "handle", "threadName": "MainThread", "taskName": null, "logger.name": "shared.django_apps.legacy_migrations.management.commands.migrate", "logger.thread_name": "MainThread", "level": "INFO"}
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/django/utils/connection.py", line 58, in __getitem__
    return getattr(self._connections, alias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/asgiref/local.py", line 105, in __getattr__
    raise AttributeError(f"{self!r} object has no attribute {key!r}")
AttributeError: <asgiref.local.Local object at 0x77f4ef154470> object has no attribute 'timeseries'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/manage.py", line 17, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/shared/django_apps/legacy_migrations/management/commands/migrate.py", line 118, in handle
    db_connection = connections[database]
                    ~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/django/utils/connection.py", line 61, in __getitem__
    raise self.exception_class(f"The connection '{alias}' doesn't exist.")
django.utils.connection.ConnectionDoesNotExist: The connection 'timeseries' doesn't exist.
@thomasrockhu-codecov thomasrockhu-codecov added the question Further information is requested label Jun 27, 2024
@codecov-hooky codecov-hooky bot added the bug Something isn't working label Jul 29, 2024
@codecov-hooky codecov-hooky bot closed this as completed Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants