Skip to content
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

SQL lab keeps show "rendering", no result appears #6527

Closed
3 tasks done
shizidushu opened this issue Dec 13, 2018 · 12 comments
Closed
3 tasks done

SQL lab keeps show "rendering", no result appears #6527

shizidushu opened this issue Dec 13, 2018 · 12 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days sqllab Namespace | Anything related to the SQL Lab v0.29 v0.30 v0.31

Comments

@shizidushu
Copy link
Contributor

shizidushu commented Dec 13, 2018

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Superset version

0.29.0rc7

Expected results

keep showing "rendering"

Actual results

In the query history tab, it shows 74 rows.

Steps to reproduce

docker-compose.yml

version: '3.7'
services:
  redis:
    image: redis
    ports:
      - "6379"
    networks:
      - superset-overlay
  postgres:
    image: postgres:10
    environment:
      - POSTGRES_USER=superset
      - POSTGRES_PASSWORD=superset
      - POSTGRES_DB=superset
      - PGDATA=/var/lib/postgresql/data/pgdata
    networks:
      - superset-overlay
    volumes:
      - ../persistent-data/superset/postgres:/var/lib/postgresql/data
  superset:
    image: shizidushu/superset:0.29.0rc7
    depends_on:
      - postgres
      - redis
    ports:
      - target: 8088
        published: 8088
        mode: host
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8088/health"]
      interval: 30s
      timeout: 15000s
      retries: 1
      start_period: 10s
    networks:
      - superset-overlay
    volumes:
      - ./config/superset_config.py:/etc/superset/superset_config.py
  worker:
    image: shizidushu/superset:0.29.0rc7
    depends_on:
      - postgres
      - redis
    volumes:
      - ./config/superset_config.py:/etc/superset/superset_config.py
    networks:
      - superset-overlay
    command: celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair

networks:
  superset-overlay:
    driver: overlay
    external: true

superset_config.py

import os

from werkzeug.contrib.cache import RedisCache


# MAPBOX_API_KEY = os.getenv('MAPBOX_API_KEY', '')

CACHE_CONFIG = {
    'CACHE_TYPE': 'redis',
    'CACHE_DEFAULT_TIMEOUT': 300,
    'CACHE_KEY_PREFIX': 'superset_',
    'CACHE_REDIS_HOST': 'redis',
    'CACHE_REDIS_PORT': 6379,
    'CACHE_REDIS_DB': 1,
    'CACHE_REDIS_URL': 'redis://redis:6379/1'}
SQLALCHEMY_DATABASE_URI = \
    'postgresql+psycopg2://superset:superset@postgres:5432/superset'
SQLALCHEMY_TRACK_MODIFICATIONS = True
SECRET_KEY = 'thisISaSECRET_1234'


class CeleryConfig(object):
    BROKER_URL = 'redis://redis:6379/0'
    CELERY_IMPORTS = ('superset.sql_lab', )
    CELERY_RESULT_BACKEND = 'redis://redis:6379/0'
    CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}


CELERY_CONFIG = CeleryConfig
RESULTS_BACKEND = RedisCache(
    host='redis',
    port=6379,
    key_prefix='superset_results'
)
  • run superset-init in container (docker exec -it d7a1f711b205 superset-init).
  • go the the web browser and run a query SELECT * FROM ab_permission

rendering
query history

Logs

docker logs 0eb22be57abb (superset_superset container)

[2018-12-13 10:36:21 +0000] [1] [INFO] Starting gunicorn 19.8.0
[2018-12-13 10:36:21 +0000] [1] [INFO] Listening at: http://0.0.0.0:8088 (1)
[2018-12-13 10:36:21 +0000] [1] [INFO] Using worker: sync
[2018-12-13 10:36:21 +0000] [8] [INFO] Booting worker with pid: 8
[2018-12-13 10:36:21 +0000] [9] [INFO] Booting worker with pid: 9
2018-12-13 10:36:38,368:INFO:root:Database.get_sqla_engine(). Masked URL: postgresql+psycopg2://superset:XXXXXXXXXX@postgres:5432/superset
2018-12-13 10:37:07,201:INFO:root:Database.get_sqla_engine(). Masked URL: postgresql+psycopg2://superset:XXXXXXXXXX@postgres:5432/superset
2018-12-13 10:37:11,906:DEBUG:root:[stats_logger] (incr) sql_json
2018-12-13 10:37:11,910:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
2018-12-13 10:37:11,951:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
2018-12-13 10:37:11,964:INFO:root:Triggering query_id: 1
2018-12-13 10:37:11,995:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
2018-12-13 10:37:11,996:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
2018-12-13 10:37:12,003:INFO:root:Set query to 'running'
2018-12-13 10:37:12,009:INFO:root:Database.get_sqla_engine(). Masked URL: postgresql+psycopg2://superset:XXXXXXXXXX@postgres:5432/superset
2018-12-13 10:37:12,019:INFO:root:Running query: 
SELECT * FROM ab_permission LIMIT 1000
2018-12-13 10:37:12,019:INFO:root:SELECT * FROM ab_permission LIMIT 1000
2018-12-13 10:37:12,020:INFO:root:Handling cursor
2018-12-13 10:37:12,023:INFO:root:Fetching data: {'changedOn': datetime.datetime(2018, 12, 13, 10, 37, 11, 998982), 'changed_on': '2018-12-13T10:37:11.998982', 'dbId': 1, 'db': 'main', 'endDttm': None, 'errorMessage': None, 'executedSql': 'SELECT * FROM ab_permission LIMIT 1000', 'id': 'Jown1TcLh', 'limit': 1000, 'progress': 0, 'rows': None, 'schema': 'null', 'ctas': False, 'serverId': 1, 'sql': 'SELECT * FROM ab_permission', 'sqlEditorId': 'teid-4ase', 'startDttm': Decimal('1544697431952.956000'), 'state': 'running', 'tab': 'Untitled Query', 'tempTable': '', 'userId': 1, 'user': 'admin user', 'limit_reached': False, 'resultsKey': None, 'trackingUrl': None}
2018-12-13 10:37:12,023:DEBUG:root:[stats_logger] (timing) sqllab.query.time_executing_query | 3.3427734375 
2018-12-13 10:37:12,023:DEBUG:root:[stats_logger] (timing) sqllab.query.time_fetching_results | 0.1298828125 
2018-12-13 10:37:12,023:INFO:root:Fetching cursor description

docker logs of superset_worker is empty

Edit:

Just try to run the query from another pc's browser and it works. I'm not sure it's an issue or not now.

@kristw kristw added v0.29 !deprecated-label:bug Deprecated label - Use #bug instead labels Dec 14, 2018
@kakoni
Copy link
Contributor

kakoni commented Dec 19, 2018

Possibly related, I started seeing (ir)regular
image with latest master

@amodig
Copy link

amodig commented Jan 30, 2019

I have the same issue, version 0.29.0rc7, using Google Chrome. The console doesn't show any errors.

@vylc
Copy link

vylc commented Feb 2, 2019

v0.30 also has this issue. likewise, console doesn't show any errors @mistercrunch any ideas on what could be causing this?

@vylc vylc added the v0.30 label Feb 2, 2019
@mistercrunch
Copy link
Member

Any red in the network tab? Wild guess is around not running superset init which may grant endpoint access to some roles. superset init should be executed once per deploy.

@mistercrunch
Copy link
Member

Is this consistent for some users? Users with the same role perhaps?

@qianxuanyon
Copy link

qianxuanyon commented Mar 13, 2019

Is this consistent for some users? Users with the same role perhaps?

@mistercrunch

Sqllab bug:

image

  • Firefox
    image

  • chorme show error
    image

@xtinec xtinec added the v0.31 label Mar 14, 2019
@vylc vylc added the sqllab Namespace | Anything related to the SQL Lab label Mar 21, 2019
@mistercrunch
Copy link
Member

Is this happening only on a async-configured db or both.

Haven't done any digging yet, but it may be one of these elusive PureComponent-related bug where an object is that should be treated as immutable is mutated in redux, and the re-render isn't triggered since it's a PureComponent. Just a guess. But one way to rule this out is to batch-replace s/PureComponent/Component/g in assets/src/SqlLab and see if it's still happening.

@stale
Copy link

stale bot commented May 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label May 20, 2019
@stale stale bot closed this as completed May 27, 2019
@crazyplum
Copy link

I've encountered same issues at 0.29.0rc7 as well.
My browser is Chrome and the user role is admin, so this should be a bug.
Would this be fixed in later version ?
(I install Superset from pypi so 0.29.0rc7 is the latest I could get.)

@jabas06
Copy link

jabas06 commented Jul 10, 2019

I have the same issue with 0.20.0rc7. The only way I can make the app work again is by doing the following:

  • Log out from the app
  • Clear the site data

image

@graceguo-supercat
Copy link

We had a list of bug fixes for sql lab fetching results issues: #7628, #7523 and #7575.
can you try release--0.33 ?

@Kounotori-ssbm
Copy link

Though this is not a true solution, I found how to show result after keeping show 'rendering'.
Idk you also have same effects but try once below:

  • Create a 'saved query' you want to execute and show results (In 'SQL Editor', fill your query and "Save Query")
  • Open "Saved Queries" page and open "Pop Tab Link" of the query
  • Just execute the opened saved query and then keeping show 'rendering'
  • Open "Saved Queries" page and open "Pop Tab Link" of the query AGAIN
  • Just execute the newer opened saved query and then keeping show 'rendering'
  • Click the tab of the query you executed first
  • SOMEHOW the result of first executed query was shown...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days sqllab Namespace | Anything related to the SQL Lab v0.29 v0.30 v0.31
Projects
None yet
Development

No branches or pull requests