Skip to content

chore(superset): bump superset version to 2.*#195

Merged
xmnlab merged 10 commits intothegraphnetwork:mainfrom
luabida:superset-update
Aug 28, 2023
Merged

chore(superset): bump superset version to 2.*#195
xmnlab merged 10 commits intothegraphnetwork:mainfrom
luabida:superset-update

Conversation

@luabida
Copy link
Copy Markdown
Contributor

@luabida luabida commented Aug 23, 2023

No description provided.

@luabida
Copy link
Copy Markdown
Contributor Author

luabida commented Aug 23, 2023

image


2023-08-23 20:47:18,936:WARNING:superset.db_engine_specs:Unable to load dialect <class 'sqlalchemy.dialects.mssql.pyodbc.MSDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
Unable to load dialect <class 'sqlalchemy.dialects.mssql.pyodbc.MSDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
2023-08-23 20:47:18,937:WARNING:superset.db_engine_specs:Unable to load dialect <class 'sqlalchemy.dialects.mssql.pyodbc.MSDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
Unable to load dialect <class 'sqlalchemy.dialects.mysql.pyodbc.MySQLDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
2023-08-23 20:47:18,940:WARNING:superset.db_engine_specs:Unable to load dialect <class 'sqlalchemy.dialects.mysql.pyodbc.MySQLDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
Unable to load dialect <class 'sqlalchemy.dialects.sybase.pyodbc.SybaseDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
2023-08-23 20:47:18,944:WARNING:superset.db_engine_specs:Unable to load dialect <class 'sqlalchemy.dialects.sybase.pyodbc.SybaseDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
Unable to load dialect <class 'sqlalchemy.dialects.sybase.pyodbc.SybaseDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
2023-08-23 20:47:18,944:WARNING:superset.db_engine_specs:Unable to load dialect <class 'sqlalchemy.dialects.sybase.pyodbc.SybaseDialect_pyodbc'>: libodbc.so.2: cannot open shared object file: No such file or directory
Unable to load SQLAlchemy dialect <class 'sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2'>: The 'enum34' distribution was not found and is required by the application
2023-08-23 20:47:19,032:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect <class 'sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2'>: The 'enum34' distribution was not found and is required by the application
Unable to load SQLAlchemy dialect <class 'shillelagh.backends.apsw.dialects.safe.APSWSafeDialect'>: libodbc.so.2: cannot open shared object file: No such file or directory
2023-08-23 20:47:19,040:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect <class 'shillelagh.backends.apsw.dialects.safe.APSWSafeDialect'>: libodbc.so.2: cannot open shared object file: No such file or directory

fixed libodbc.so.2: cannot open shared object file


http://0.0.0.0:8088/superset/welcome/:

2023-08-23 20:58:05,121:WARNING:superset.views.base:HTTPException
Traceback (most recent call last):
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask/app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask/app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask/scaffold.py", line 322, in send_static_file
    return send_from_directory(
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask/helpers.py", line 676, in send_from_directory
    return werkzeug.utils.send_from_directory(  # type: ignore
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/werkzeug/utils.py", line 586, in send_from_directory
    raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-08-23 20:58:05,123:INFO:werkzeug:172.21.0.1 - - [23/Aug/2023 20:58:05] "GET /static/appbuilder/css/font-awesome.min.css HTTP/1.1" 404 -

image
image

Comment thread containers/superset/superset_config.py Outdated
DB_PASS = os.getenv("POSTGRES_PASSWORD")
DB_DATABASE = os.getenv("POSTGRES_DB")
SQLALCHEMY_DATABASE_URI = (
f"postgresql://{DB_HOST}:{DB_PASS}@{DB_HOST}:{DB_PORT}/{DB_DATABASE}"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any problem of using the postgres container database to store superset core data?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think so

Copy link
Copy Markdown
Member

@xmnlab xmnlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the superset dep from conda-forge, instead of the pypi, if possible.
normally the package from pypi is always bugged and we need to fix it on conda-forge.

Comment thread conda/superset.yaml Outdated
- jsonschema<5,>=3
# dependencies from superset 1.5.*
# dependencies from superset 2.*
- cryptography<39.0.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- cryptography<39.0.0

Comment thread conda/superset.yaml Outdated
- markupsafe==2.0.1
- 'six>=1.16'
- 'apache-superset>=1.5.0,<2.0.0'
- 'apache-superset>=2.0.0,<3.0.0'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'apache-superset>=2.0.0,<3.0.0'

Comment thread conda/superset.yaml Outdated
- enum34
- packaging
- webencodings
- 'msgpack<1.1,>=1.0.0'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'msgpack<1.1,>=1.0.0'

Comment thread conda/superset.yaml Outdated
- packaging
- webencodings
- 'msgpack<1.1,>=1.0.0'
- markupsafe==2.0.1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- markupsafe==2.0.1

Comment thread conda/superset.yaml Outdated
- 'apache-superset>=1.5.0,<2.0.0'
- 'apache-superset>=2.0.0,<3.0.0'
# https://github.com/apache/superset/issues/23742
- 'sqlparse==0.4.3'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'sqlparse==0.4.3'

Comment thread conda/superset.yaml Outdated
- 'apache-superset>=2.0.0,<3.0.0'
# https://github.com/apache/superset/issues/23742
- 'sqlparse==0.4.3'
- marshmallow-enum
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- marshmallow-enum

Comment thread conda/superset.yaml Outdated
- webencodings
- 'msgpack<1.1,>=1.0.0'
- markupsafe==2.0.1
- 'six>=1.16'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'six>=1.16'

Comment thread conda/superset.yaml Outdated
- enum34
- packaging
- webencodings
- 'msgpack<1.1,>=1.0.0'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'msgpack<1.1,>=1.0.0'

Comment thread conda/superset.yaml
- sqlalchemy
- jsonschema<5,>=3
# dependencies from superset 1.5.*
# dependencies from superset 2.*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# dependencies from superset 2.*
# dependencies from superset 2.*
- superset 2.1.0

Comment thread scripts/prepare-host.sh

set -ex

# superset
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you planning to move the core data from sqlite to postgresql?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this issue, superset is dropping support for SQLite apache/superset#9748

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks for the explanation

@luabida
Copy link
Copy Markdown
Contributor Author

luabida commented Aug 24, 2023

ERROR w/ Flask-SQLAlchemy >= 3.0:

Traceback (most recent call last):
  File "/opt/conda/envs/epigraphhub/bin/superset", line 6, in <module>
    from superset.cli.main import superset
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/__init__.py", line 21, in <module>
    from superset.app import create_app
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/app.py", line 23, in <module>
    from superset.initialization import SupersetAppInitializer
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/initialization/__init__.py", line 27, in <module>
    from flask_appbuilder import expose, IndexView
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask_appbuilder/__init__.py", line 5, in <module>
    from .api import ModelRestApi  # noqa: F401
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask_appbuilder/api/__init__.py", line 23, in <module>
    from flask_appbuilder.models.sqla import Model
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask_appbuilder/models/sqla/__init__.py", line 5, in <module>
    from flask_sqlalchemy import (
ImportError: cannot import name '_QueryProperty' from 'flask_sqlalchemy' (/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py)

ERROR w/ sqlalchemy >= 2.0

Traceback (most recent call last):
  File "/opt/conda/envs/epigraphhub/bin/superset", line 6, in <module>
    from superset.cli.main import superset
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/__init__.py", line 21, in <module>
    from superset.app import create_app
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/app.py", line 23, in <module>
    from superset.initialization import SupersetAppInitializer
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/initialization/__init__.py", line 33, in <module>
    from superset.extensions import (
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/superset/extensions/__init__.py", line 119, in <module>
    db = SQLA()
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 758, in __init__
    _include_sqlalchemy(self, query_class)
  File "/opt/conda/envs/epigraphhub/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py", line 112, in _include_sqlalchemy
    for key in module.__all__:
AttributeError: module 'sqlalchemy' has no attribute '__all__'

Fixed by pinning deps

@luabida luabida force-pushed the superset-update branch 4 times, most recently from 1bb5d75 to 82034e0 Compare August 25, 2023 19:56
@luabida luabida marked this pull request as ready for review August 28, 2023 12:02
@luabida luabida requested a review from xmnlab August 28, 2023 12:21
Copy link
Copy Markdown
Member

@xmnlab xmnlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks @luabida

@xmnlab xmnlab merged commit 76cd35c into thegraphnetwork:main Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants