Alembic upgrade fails unexpectedly while using Google Cloud SQL proxy to connect #1225
Unanswered
digitalnomd
asked this question in
Usage Questions
Replies: 1 comment
-
Hi, That logging does not seem to came from alembic or sqlalchemy. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone 👋, so I’m running into a bug with running the python alembic package to perform a data migration on Google Cloud SQL. This requires first running a Cloud SQL proxy in a subprocess to connect to my instance as a prerequisite and that process is being terminated before the the alembic operation completes.
From the logs below you can see the sequence of events:
CloudSQL proxy is running on 127.0.0.1:39849 prior to beginning the Alembic process. I’m pretty sure that the error:
(2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")
is because Cloud SQL proxy has terminated before Alembic completes. Behind the scenes, I'm using thealembic.command.upgrade()
function to perform the upgrade.Any ideas of how to debug this? Cloud SQL proxy is able to run fine during all other operations which makes me think that there’s an unsurfaced error that’s happening during the alembic upgrade process and those logs just aren’t being shown.
I’ve been stuck on this for a while and any help would be appreciated. Thanks!
For reference, I'm using alembic v1.6.5.
Beta Was this translation helpful? Give feedback.
All reactions