-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
column sentry_notificationsetting.target_id_id does not exist #2281
Comments
@vbro Is there any chance this is related to migration 0434? That seems to be the last time we touched this model - maybe in all the renaming of |
i encountered the same error. the log doesn't even provide which migration step fails, because it errors before logging the actual migration. |
I created "sentry_notificationsettings.target_id_id" manually in postgres to skip through the error.
|
Just ran into this error too after waiting several hours for the database to upgrade. :-( Forced to reinstall from backup with some data loss....
|
To fix this do: Worked for me. Had exactly the same problem. :-) All data is there. I guess bug was introduced in 23.7.0 :-) |
Can anyone from Sentry attest to this rollback being supported at least in theory?
|
@mmerickel Going from 23.4.0 to 23.6.2 should be fine. If your migrations are failing at 0438, you won't have gotten to a point in the migration history where you couldn't roll back to 23.6. I'll take a look into why the |
Regarding all above, for me it was, that I'm always on nightly and this time it went wrong. Always on the edge. :-) Did install.sh couple of times, upgraded docker to latest version. OS to latest version. Nothing helped. Then decided to go rejection path, checkout to versions till it works. My version before upgrade was 23.3.1. Also during upgrade my HDD on EC2 Volume storage got out of space. So I just improved its size from 160GB to 320GB and increase IOPS to 4000 and increased transfer rate to 1000MiB/s. After that waited till it will complete optimisation, extended volume on Ubuntu OS. And tried again, but it failed. So checkout to 23.6.2 ran install.sh and it finished upgrade. Also was looking at the changes between 23.6.2 and 23.7.0 on sentry itself project, where migrations are, but was not able to spot where that |
Upgrading from 23.4.0 to 2.5.0 and then to 2.6.0 and finally to 2.7.0 fixed the issue for me. |
I just ran into this issue upgrading from 22.3.0 to 23.7.0. I tried the suggestions of running ./install.sh from the 23.6.2 and 23.5.0 branches and received the same error, Not sure how @juslintek was able to get it working without restoring from backup. Do I need to pin the docker image to an earlier build? EDIT: I realized my |
When 0434 and 0439 were written we were on django 2.2. While these migrations ran fine in sentry.io environments, they are not running cleanly for self-hosted users. Several self-hosted users have reported an upgrade issue in 23.7.0 (django 3.2) where migration 0439 fails to run because `notificationsetting.target_id_id` doesn't exist. By revising the state changes we can correct django 3.2's interpretation of the schema state to run cleanly. Tested this by: 1. Start off with an empty database. 2. Checkout 23.4.0 3. Run `sentry upgrade` to build schema up to the point of 23.4.0 4. Checkout 23.7.0. 5. Apply this patch. 6. Run `sentry upgrade` again. Refs getsentry/self-hosted#2281
We've got a fix in the pipeline. We will try to roll the referenced change into the |
Pleased I took a snapshot before upgrading, from 23.6.2 to 23.7.0 as hit this error too. Left DB in degraded state. Recommend not upgrading until this is resolved. |
…53379) When 0434 and 0439 were written we were on django 2.2. While these migrations ran fine in sentry.io environments, they are not running cleanly for self-hosted users. Several self-hosted users have reported an upgrade issue in 23.7.0 (django 3.2) where migration 0439 fails to run because `notificationsetting.target_id_id` doesn't exist. By revising the state changes we can correct django 3.2's interpretation of the schema state to run cleanly. Tested this by: 1. Start off with an empty database. 2. Checkout 23.4.0 3. Run `sentry upgrade` to build schema up to the point of 23.4.0 4. Checkout 23.7.0 and update deps with `make install-py-dev`. 5. Apply this patch. 6. Run `sentry upgrade` again. Refs getsentry/self-hosted#2281
We're stuck since yesterday morning (UTC) and due the aforementioned planned release we decided to wait. |
We're aiming to cut the release today. |
The release is currently being rolled, tracking bug is here. It should be up in 3-4 hours. |
23.7.1 has landed. Marking this closed, though if anyone still has trouble moving from an uncorrupted database on 23.6.x or below to 23.7.1, please update or file a new bug. |
Sorry to bother you, but clearly I intended that the fix would be able to salvage a botched 23.7.0 update. Right now I'm stuck with another migration not running correctly: Thanks for your help
|
Self-Hosted Version
23.7.0
CPU Architecture
x86_64
Docker Version
20.10.23
Docker Compose Version
2.19.1
Steps to Reproduce
I tried to upgrade sentry from 23.4.0 to 23.7.0. The process crashed during db migrations with error.
The sentry is unusable now.
Oops! Something went wrong
It looks like you've hit an issue in our server API. Don't worry though! We use Sentry to monitor Sentry and it's likely we're already looking into this!
If you're daring, you may want to try the following:
Give it a few seconds and reload the page.
If all else fails, contact us with more details.
Expected Result
Successful upgrade.
Actual Result
Cleaning up...
Event ID
No response
The text was updated successfully, but these errors were encountered: