AlexsLemonade / refinebio

Refine.bio harmonizes petabytes of publicly available biological data into ready-to-use datasets for cancer researchers and AI/ML scientists.
https://www.refine.bio/
Other
128 stars 19 forks source link

Fix commont_tests PostgreSQL version not supported error #3202

Closed arkid15r closed 1 year ago

arkid15r commented 1 year ago

Context

In order to restore staging/prod deploy process CI/CD tests need to be fixed.

Problem or idea

#16 exporting cache
#16 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4
#16 preparing build cache for export done
#16 DONE 0.0s
------
 > importing cache manifest from ghrc.io/alexslemonade/refinebio/dr_migrations:
------
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 96, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py", line 141, in handle
    loader.check_consistent_history(connection)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/loader.py", line 313, in check_consistent_history
    applied = recorder.applied_migrations()
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 81, in applied_migrations
    if self.has_table():
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 57, in has_table
    with self.connection.cursor() as cursor:
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 323, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 299, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 265, in connect
    self.init_connection_state()
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 251, in init_connection_state
    super().init_connection_state()
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 232, in init_connection_state
    self.check_database_version_supported()
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 207, in check_database_version_supported
    raise NotSupportedError(
django.db.utils.NotSupportedError: PostgreSQL 11 or later is required (found 9.606).
Error: Process completed with exit code 1.

Solution or next step

Resolve version requirements problem (upgrade postgres?).

arkid15r commented 1 year ago

Resolved by https://github.com/AlexsLemonade/refinebio/pull/3227