-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Trino backend fails with Superset 3.0.0 #25518
Comments
This might be the root cause cfda30c |
Yup, switching to one commit pre this one fixes the issue. |
I can reproduce this on master. @giftig I will ping you on Slack to see if we can collab on fixing this quickly. |
Adding a reference to the offending PR: #24859 |
The mapped |
I just tried this on the latest master but I'm not able to reproduce the issue; I've tried running against both trino version 403 and 428 (the latest docker image) and I see query results come back fine. I also see the debug logging surrounding the async code reporting correctly:
This is using the version of the trino client library listed in superset's dependencies, which I installed by listing I've also tried with async execution both on and off. |
I've just tried against the |
@giftig I was reading through local stacktraces, and I saw this during query execution (I see the same on both async and sync execution):
I'm not able to try this locally with a proper metastore like Postgres, but the fact that it's happening on Preset (which I'm sure isn't running SQLite) would indicate to me that this is not only limited to SQLite. |
I haven't tried with SQLite, only with postgres; it looks like the update error you're seeing there is preventing us from saving the execute_thread = threading.Thread(target=_execute, args=(execute_result,))
execute_thread.start()
# Wait for a query ID to be available before handling the cursor, as
# it's required by that method; it may never become available on error.
while not cursor.query_id and not execute_result.get("complete"):
time.sleep(0.1)
logger.debug("Query %d: Handling cursor", query.id)
cls.handle_cursor(cursor, query, session) and only attempts to run the actual |
I actually just rechecked and I was wrong to assume the default docker-compose is using postgres; it starts a postgres container but doesn't use it, the default connection string is sqlite. So I was using the default sqlite setup and didn't see any issues. I've tried with postgres as well now, and I still haven't been able to reproduce it locally with either sqlite or postgres unfortunately. Ville and I did some debugging with the errors he saw but the root cause (the sqlalchemy |
Hi @hovaesco can you share how you're running superset? OS, python version, docker or native, metastore database type, feature flags, anything else which may be relevant? Currently I'm running the project's standard Would someone else be able to attempt to reproduce the issue as well and share any minimal steps required, along with platform information? |
I cloned the repo and installed it directly from there. I run superset using the below command:
I'm able to reproduce the issue in MacOS 13.5.1, Python 3.11.5 and Trino running in the other container. Let me know how else I can assist. |
I don't have access to a Mac to see if that's the issue, though I know @villebro is also on a mac. Are you able to try with python 3.9? That's the version the docker image is built against: https://github.com/apache/superset/blob/master/Dockerfile#L21 Alternatively could you try running with docker and see if you still have problems? You said you're seeing the issue in Preset as well, and I'm guessing that's not going to be in a mac environment, so the most obvious difference is python version, I don't see any version-locking for
So far we've only been able to see an sqlite-specific error on @villebro 's setup so I'm also curious if there are different errors on your Preset setup, which presumably has a production backend like postgres. |
I'm on 3.10. Let me try with 3.9 to see if that changes things. |
Update: I see the same issue on 3.9 🙁 |
Can you check your |
@giftig it's the same as you: >>> import sqlite3
>>> sqlite3.version
'2.6.0' I'm running on Mac (I haven't been able to test on linux/k8s yet) |
Hi @hovaesco, I've raised a new PR to reinstate the patch and add a small config fix for sqlite to resolve the issue you reported here, do you have time to try running with this change? If you're overriding |
@giftig I've just tested and it works fine ! thank you for the fix |
Hi I have similar issue about trino Connection.
I'm trying to upgrade superset version(1.4 to 3.0.2), there is no other issue. Superset version : 3.0.2 Is any advice for me? Thanks |
@devery59 try checking you're using the recommended trino driver version. Your error complains that |
@giftig You're right! That error is trino version issue. Now I'm fine after edit my version. |
From the sound of it, we're all well and good here? Hope I'm not being too optimistic, but I'm closing this one. Maybe we can regroup on a new issue if there's more to be done here. |
Trino backend fails with the below error while running with Superset 3.0.0. The issue occurs in Preset as well.
Downgrading Superset to 2.1.0 version solves the issue.
The text was updated successfully, but these errors were encountered: