self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

Error in install/set-up-and-migrate-database.sh:23

Open TimKoehler-KSO opened this issue 10 months ago • 1 comments

Self-Hosted Version

25.1.0

CPU Architecture

x86_64

Docker Version

27.5.0

Docker Compose Version

2.32.4

Machine Specification

  • [x] My system meets the minimum system requirements of Sentry

Steps to Reproduce

  1. download git repo
  2. checkout branch 25.1.0
  3. run sudo ./install.sh

Expected Result

When trying to update from 24.8.0 to 25.1.0 the setup should run through and install as expected without any errors.

Actual Result

Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Running migrations for default Operations to perform: Apply all migrations: auth, contenttypes, feedback, flags, hybridcloud, nodestore, remote_subscriptions, replays, sentry, sessions, sites, social_auth, tempest, uptime, workflow_engine Running migrations: Applying sentry.0795_drop_included_excluded_projects...Traceback (most recent call last): File "/.venv/bin/sentry", line 4, in raise SystemExit(main()) ~~~~^^ File "/usr/src/sentry/src/sentry/runner/main.py", line 148, in main func(**kwargs) ~~~~^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/click/core.py", line 1157, in call return self.main(*args, **kwargs) ~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/.venv/lib/python3.13/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/.venv/lib/python3.13/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/src/sentry/src/sentry/runner/decorators.py", line 35, in inner return ctx.invoke(f, *args, **kwargs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/usr/src/sentry/src/sentry/runner/commands/upgrade.py", line 147, in upgrade _upgrade( ~~~~~~~~^ not noinput, ^^^^^^^^^^^^ ...<5 lines>... create_kafka_topics, ^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/sentry/src/sentry/runner/commands/upgrade.py", line 63, in _upgrade dj_call_command( ~~~~~~~~~~~~~~~^ "migrate", ^^^^^^^^^^ ...<3 lines>... verbosity=verbosity, ^^^^^^^^^^^^^^^^^^^^ ) ^ File "/.venv/lib/python3.13/site-packages/django/core/management/init.py", line 194, in call_command return command.execute(*args, **defaults) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) File "/.venv/lib/python3.13/site-packages/django/core/management/base.py", line 107, in wrapper res = handle_func(*args, **kwargs) File "/.venv/lib/python3.13/site-packages/django/core/management/commands/migrate.py", line 357, in handle post_migrate_state = executor.migrate( targets, ...<3 lines>... fake_initial=fake_initial, ) File "/.venv/lib/python3.13/site-packages/django/db/migrations/executor.py", line 135, in migrate state = self._migrate_all_forwards( state, plan, full_plan, fake=fake, fake_initial=fake_initial ) File "/.venv/lib/python3.13/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards state = self.apply_migration( state, migration, fake=fake, fake_initial=fake_initial ) File "/usr/src/sentry/src/sentry/new_migrations/monkey/executor.py", line 141, in apply_migration return super().apply_migration(state, migration, fake=fake, fake_initial=fake_initial) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/django/db/migrations/executor.py", line 255, in apply_migration state = migration.apply(state, schema_editor) File "/usr/src/sentry/src/sentry/new_migrations/migrations.py", line 33, in apply return super().apply(project_state, schema_editor, collect_sql) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.13/site-packages/django/db/migrations/migration.py", line 132, in apply operation.database_forwards( ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ self.app_label, schema_editor, old_state, project_state ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/sentry/src/sentry/new_migrations/monkey/fields.py", line 66, in database_forwards schema_editor.remove_field(field.model, field, is_safe=True) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: BaseDatabaseSchemaEditor.remove_field() got an unexpected keyword argument 'is_safe' Error in install/set-up-and-migrate-database.sh:23. '$dcr web upgrade --noinput --create-kafka-topics' exited with status 1 -> ./install.sh:main:36 --> install/set-up-and-migrate-database.sh:source:23

Cleaning up...

Event ID

No response

TimKoehler-KSO avatar Jan 23 '25 10:01 TimKoehler-KSO

@hubertdeng123 @asottile-sentry anyone have any clue?

aldy505 avatar Jun 05 '25 03:06 aldy505

Any updates on this issue? I am facing a simular issue currently.

Naendo avatar Sep 17 '25 15:09 Naendo