Skip to content

Commit

Permalink
fix: don't create examples db on 'superset init' (#9881)
Browse files Browse the repository at this point in the history
* chore: don't create examples db on 'superset init'

* fix isort
  • Loading branch information
mistercrunch authored May 22, 2020
1 parent 3e8e441 commit ee99196
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ combine_as_imports = true
include_trailing_comma = true
line_length = 88
known_first_party = superset
known_third_party =alembic,apispec,backoff,bleach,cachelib,celery,click,colorama,contextlib2,croniter,cryptography,dataclasses,dateutil,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,geohash,geopy,humanize,isodate,jinja2,markdown,markupsafe,marshmallow,msgpack,numpy,pandas,parsedatetime,pathlib2,polyline,prison,pyarrow,pyhive,pytz,retry,selenium,setuptools,simplejson,sphinx_rtd_theme,sqlalchemy,sqlalchemy_utils,sqlparse,werkzeug,wtforms,wtforms_json,yaml
known_third_party =alembic,apispec,backoff,bleach,cachelib,celery,click,colorama,contextlib2,croniter,cryptography,dateutil,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,geohash,geopy,humanize,isodate,jinja2,markdown,markupsafe,marshmallow,msgpack,numpy,pandas,parsedatetime,pathlib2,polyline,prison,pyarrow,pyhive,pytz,retry,selenium,setuptools,simplejson,sphinx_rtd_theme,sqlalchemy,sqlalchemy_utils,sqlparse,werkzeug,wtforms,wtforms_json,yaml
multi_line_output = 3
order_by_type = false

Expand Down
1 change: 0 additions & 1 deletion superset/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def make_shell_context(): # pylint: disable=unused-variable
@with_appcontext
def init():
"""Inits the Superset application"""
utils.get_example_database()
appbuilder.add_permissions(update_perms=True)
security_manager.sync_role_definitions()

Expand Down
2 changes: 1 addition & 1 deletion superset/db_engine_specs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
# pylint: disable=unused-argument
import dataclasses
import hashlib
import json
import logging
Expand All @@ -33,7 +34,6 @@
Union,
)

import dataclasses
import pandas as pd
import sqlparse
from flask import g
Expand Down
3 changes: 1 addition & 2 deletions superset/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
# specific language governing permissions and limitations
# under the License.
# pylint: disable=too-few-public-methods,invalid-name
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, Optional

from dataclasses import dataclass


class SupersetErrorType(str, Enum):
"""
Expand Down
2 changes: 1 addition & 1 deletion superset/sql_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# specific language governing permissions and limitations
# under the License.
import logging
from dataclasses import dataclass
from typing import List, Optional, Set
from urllib import parse

import sqlparse
from dataclasses import dataclass
from sqlparse.sql import Identifier, IdentifierList, remove_quotes, Token, TokenList
from sqlparse.tokens import Keyword, Name, Punctuation, String, Whitespace
from sqlparse.utils import imt
Expand Down
2 changes: 1 addition & 1 deletion superset/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import dataclasses
import functools
import logging
import traceback
from datetime import datetime
from typing import Any, Dict, List, Optional

import dataclasses
import simplejson as json
import yaml
from flask import abort, flash, g, get_flashed_messages, redirect, Response, session
Expand Down
2 changes: 1 addition & 1 deletion superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Superset can render.
"""
import copy
import dataclasses
import hashlib
import inspect
import logging
Expand All @@ -33,7 +34,6 @@
from itertools import product
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING

import dataclasses
import geohash
import numpy as np
import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion superset/viz_sip38.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Superset can render.
"""
import copy
import dataclasses
import hashlib
import inspect
import logging
Expand All @@ -33,7 +34,6 @@
from itertools import product
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING

import dataclasses
import geohash
import numpy as np
import pandas as pd
Expand Down

1 comment on commit ee99196

@smirs
Copy link

@smirs smirs commented on ee99196 May 22, 2020

Choose a reason for hiding this comment

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

Does this break other things? Cloned a fresh copy today and can't get what I used to get yesterday. :(
Here is what I get after sudo docker-compose up on this repo:

superset_cache | /bin/sh: 0: Can't open /usr/local/bin/docker-entrypoint.sh superset_init exited with code 126 superset_node exited with code 127 superset_cache exited with code 127 superset_worker exited with code 126 superset_app exited with code 126 superset_db exited with code 126
which is nagging about lacking access to a file which doe not exist on the mentioned address? :/
I dunnu, I thought I may have to leave this comment here, before more testing and opening an issue..

Please sign in to comment.