-
Notifications
You must be signed in to change notification settings - Fork 322
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
psycopg2.errors.UndefinedTable: relation "signal_type_override" does not exist #1507
Comments
Thanks for the report! The database changed a lot during development, and we don't have a test on this. I'll add a regression test and fix it. |
Did not reproduce, what I tried:
Wasn't able to reproduce, can you check to see if it's a strange startup issue, or possible a collision with an old deployment? Can you try the "nuclear" option mentioned in CONTRIBUTING:
|
@Dcallies to flag, this is the same issue I hit while running set up for the first time. My initial suggestion in #1504 was to comment out the blueprints in the I since came back to this and found it's because the tables are initially never created, so you need to run I don't know if this is the best practice, and I haven't had time today to properly look at this and get a PR up. |
@Sam-Freeman thanks for the context! Sounds like it should repo with a clean rebuild (which I had done recently without hitting it, but I didn't try since this issue was opened). This sounds like it's an import dependency problem, which is why I'm not a huge fan of flask's module-level state. Let me try a clean build and see if I can get it to trigger. |
Okay, working with @sbruens we have a repro. The workaround: set The problem is that I don't think the database is setup by the time the code in #1499 tries to make a database call. It's not caught in testing because we we disable that flag in the tests. Let me dig some more into what's happening and see if I can regtest and fix. |
Workaround for the Docker stack. Login to the container:
Then run:
|
Looked into this issue further. This is definitively not an alambic issue, but a index cache issue, but an app set-up issue. Here:
Which will cause the app to build the cache when the app is started up, but this is not what we want when we do the db upgrade:
we do not need these processes running. as such I'll be adding a guard via env variable to this command to prevent it from running the code causing the problem. @Dcallies any thoughts on this approach? adding something along the lines of: if app.config.get("TASK_INDEX_CACHE", False) and not running_migrations: I can cut a pr in a bit. Also got the initial migration fix so we can keep track of db migrations. |
Nice work @juanmrad! Even when I disabled the TASK_INDEX_CACHE, I got the same issue unless I set up the DB. Here's the repo I've used:
This will give me a 500 for tables not existing Does setting up alembic fix this repo? If so, what do you think about these potential approaches:
|
@Dcallies Running the stack locally, when I try to hash an image (
/h/hash?...
) I run into a server error.Did something change in the database schema since I last ran it? Any thoughts?
The text was updated successfully, but these errors were encountered: