Open fzhan opened 1 month ago
The issue with SQL Lab stopping working and the int()
function receiving an argument of type 'set' after upgrading to version 4.0.2 is likely related to a bug introduced in the new version. Specifically, the changelog mentions several fixes related to SQL Lab and database interactions, such as:
To resolve the error related to the int()
function receiving an argument of type 'set', you should check if there are any updates or patches available that address this specific issue. If not, you may need to manually debug the code to identify where the int()
function is being called with a 'set' type argument and correct it.
Here is a general approach to debug and fix the issue:
int()
function is being called with a 'set' type argument.int()
function is of a type that can be converted to an integer, such as a string or a number.For example, if you find code like this:
value = some_set
result = int(value)
You should change it to:
value = some_set
if isinstance(value, set):
value = list(value)[0] # or some other logic to extract a single value
result = int(value)
Additionally, there are configuration changes and migration steps required when upgrading to version 4.0.2 that could impact SQL Lab functionality. Specifically:
Deprecation of Endpoints:
/superset/sqllab
, /superset/sqllab/history
, and /sqllab/my_queries
have been removed. You should use /sqllab
, /sqllab/history
, and /savedqueryview/list/?_flt_0_user={get_user_id()}
instead [2].Deprecation of KV_STORE
Feature Flag:
KV_STORE
feature flag and its related assets such as the API endpoint and keyvalue
table have been deprecated. This affects the SHARE_QUERIES_VIA_KV_STORE
feature flag, which allows sharing SQL Lab queries without saving the query [2].Index Addition:
query.sql_editor_id
to improve performance, which may cause downtime on large deployments [2].Database Column Updates:
Removal of Deprecated Redirect Endpoint:
Review the CHANGELOG.md
and UPDATING.md
files, back up your databases, and adjust your feature flags and configurations accordingly.
To continue talking to Dosu, mention @dosu.
Hmm, something seems funny here... if you couldn't run any query in postgres/mysql, there'd be pitchforks and torches out on the streets by now. Can you give an example failing query, preferably using an example dataset?
@rusackas I do have some custom libs:
pip install sqlalchemy-bigquery redis pymssql pyodbc pymysql mysql-connector-python holidays==0.32 prophet==1.1.4 authlib celery==5.3.6 kombu==5.4.0rc3 sqlglot
Bug description
Since upgraded to version 4, currently running 4.0.2, SQL LAB has stop working on all previous functioning database connections, mariadb, postgres and mssql.
How to reproduce the bug
Here's the log:
Screenshots/recordings
Superset version
4.0.2
Python version
3.10
Node version
16
Browser
Chrome
Additional context
No response
Checklist