-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: DB migration script #2779
fix: DB migration script #2779
Conversation
Can you explain a bit more why the old one was broken? (just trying to learn 🙂) |
This fixed #2780 for me, logs before applying this patch:
|
Fix works for me. |
@BYK I've added some more info in the description of the PR. I couldn't quite wrap my head around the error around waiting for the postgres server to become healthy and ready for connections, since it works locally for me. It even passed CI here. I just opted for an approach that we used previously that seemed to work more broadly across platforms. |
@hubertdeng123 From what I understand the issue was that by default
The reason for that seems to be that the docker container uses "postgres" as user. Shouldn't it have been enough to just add this user, something like:
as described in the pg_isready documentation? |
@roskakori Did replacing |
It didn’t help me, now I have this error: ERROR: cannot drop index sentry_groupedmessage_project_id_id_515aaa7e_uniq because constraint sentry_groupedmessage_project_id_id_515aaa7e_uniq on table sentry_groupedmessage requires it |
Fix worked for me. |
most likely this is an unrelated problem, maybe you just didn't have this INDEX or I don't know why my postgres can't bite the INDEX |
@toto4ds What version of self-hosted are you upgrading from? I'm wondering if that error may be due to coming off of an older version of Sentry that requires that index. |
@hubertdeng123 From 24.1.1 to 24.1.2
|
I didn't try. I just saw that the diff was rather big for such a seemingly simple issue, took a look at the Sorry to hear that it did not work. |
This did not work for me. |
@hubertdeng123 |
Is there any way to have this use the Django connection details in the future, rather than assuming that your database is running in Docker? We're using an external database (RDS). |
This improves the logic to wait for postgres server to be up and running. It also fixes a typo 😬
It seems like using
pg_isready
in the install script was not a reliable way to wait for the postgres server to be up and ready to accept connections. So, I used a few lines that were previously working from theupgrade-postgres.sh
script. Additionally, theexec
command was missing when removing the specific db index causing issues.Follow up to #2758