You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the random error that was irrelevant to the problem
It would be great if it can detect and raise a meaningful error like GitLab
GitLab also has a upgrade path website that will generate upgrade path between two versions with required notes
Running migrations for default
Operations to perform:
Apply all migrations: ai_monitoring, auth, contenttypes, explore, feedback, flags, hybridcloud, insights, investigations, nodestore, notifications, releases, seer, sentry, sessions, sites, social_auth, workflow_engine
Traceback (most recent call last):
File "/.venv/bin/sentry", line 4, in <module>
raise SystemExit(main())
~~~~^^
File "/usr/src/sentry/src/sentry/runner/main.py", line 146, in main
func(**kwargs)
~~~~^^^^^^^^^^
File "/.venv/lib/python3.13/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.13/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
File "/.venv/lib/python3.13/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File "/.venv/lib/python3.13/site-packages/click/core.py", line 1226, in invoke [0/1932]
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.13/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/.venv/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/src/sentry/src/sentry/runner/decorators.py", line 34, in inner
return ctx.invoke(f, *args, **kwargs)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.13/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/usr/src/sentry/src/sentry/runner/commands/upgrade.py", line 168, in upgrade
_upgrade(
~~~~~~~~^
not noinput,
^^^^^^^^^^^^
...<5 lines>...
create_kafka_topics,
^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/sentry/src/sentry/runner/commands/upgrade.py", line 83, 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 464, in execute
output = self.handle(*args, **options)
File "/.venv/lib/python3.13/site-packages/django/core/management/base.py", line 111, in wrapper
res = handle_func(*args, **kwargs)
File "/.venv/lib/python3.13/site-packages/django/core/management/commands/migrate.py", line 299, in handle
pre_migrate_apps = pre_migrate_state.apps
^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.13/site-packages/django/utils/functional.py", line 47, in __get__
res = instance.__dict__[self.name] = self.func(instance)
~~~~~~~~~^^^^^^^^^^
File "/.venv/lib/python3.13/site-packages/django/db/migrations/state.py", line 589, in apps
return StateApps(self.real_apps, self.models)
File "/.venv/lib/python3.13/site-packages/django/db/migrations/state.py", line 660, in __init__
raise ValueError("\n".join(error.msg for error in errors))
ValueError: The field feedback.Feedback.environment was declared with a lazy reference to 'sentry.environment', but app 'sentry' isn't installed.
The field flags.FlagWebHookSigningSecretModel.organization was declared with a lazy reference to 'sentry.organization', but app 'sentry' isn't installed.
The field insights.InsightsStarredSegment.organization was declared with a lazy reference to 'sentry.organization', but app 'sentry' isn't installed.
The field insights.InsightsStarredSegment.project was declared with a lazy reference to 'sentry.project', but app 'sentry' isn't installed.
The field social_auth.UserSocialAuth.user was declared with a lazy reference to 'sentry.user', but app 'sentry' isn't installed.
I've experiencing a similar issue when I missed that 26.7.0 was a hard stop 🫣
For anyone else experiencing this problem, roll your installation back to 26.7.0 and then update your docker-compose.yml file to use Valkey (otherwise Redis will fail to start and you can't run the migrations):
I agree with the sentiment though that Sentry should enforce the hard stops and not allow you to upgrade to a newer version if you haven't upgraded to the hard stop release.
you can see there is no pride in this project to make it as seemless as possible.
all the broken migrations back in 25.x there is no script or new version that fixes that CORRECTLY OR FULLY.
just a "i dont care throwaway project"
Activity
getsantry commentedon Sep 14, 2026
Assigning to @getsentry/support for routing ⏲️
linear-code commentedon Sep 14, 2026
ENG-8607
mhkarimi1383 commentedon Sep 14, 2026
This is the random error that was irrelevant to the problem
It would be great if it can detect and raise a meaningful error like GitLab
GitLab also has a upgrade path website that will generate upgrade path between two versions with required notes
mhkarimi1383 commentedon Sep 15, 2026
I have created this issue on Sentry project iteself initially since it was a migration related thing that happens in the main sentry project
jamgregory commentedon Sep 21, 2026
I've experiencing a similar issue when I missed that 26.7.0 was a hard stop 🫣
For anyone else experiencing this problem, roll your installation back to 26.7.0 and then update your
docker-compose.ymlfile to use Valkey (otherwise Redis will fail to start and you can't run the migrations):I agree with the sentiment though that Sentry should enforce the hard stops and not allow you to upgrade to a newer version if you haven't upgraded to the hard stop release.
mhkarimi1383 commentedon Sep 21, 2026
@jamgregory
For me it was
Using these steps you can migrate database easier
aldy505 commentedon Sep 24, 2026
Oh right, we are trying to mitigate this better with this PR: #4489
romanstingler commentedon Sep 25, 2026
you can see there is no pride in this project to make it as seemless as possible.
all the broken migrations back in 25.x there is no script or new version that fixes that CORRECTLY OR FULLY.
just a "i dont care throwaway project"