You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/04/22 00:11:08 UTC

[GitHub] [incubator-superset] SamEBae opened a new issue #9606: dashboard_slice_table depends on column "position_json" during `superset db upgrade`

SamEBae opened a new issue #9606:
URL: https://github.com/apache/incubator-superset/issues/9606


   `superset db upgrade` command fails with with some DB constraint regarding:
   `dashboard_slice_table` when upgrading the DB schema from superset `0.22.1` to `0.35.2`
   
   ### Expected results
   
   successful `superset db upgrade`
   
   ### Actual results
   
   ```
   INFO  [alembic.runtime.migration] Running upgrade 7fcdcde0761c -> 0c5070e96b57, add user attributes table
   INFO  [alembic.runtime.migration] Running upgrade 0c5070e96b57 -> 1a1d627ebd8e, position_json
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
       cursor, statement, parameters, context
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 536, in do_execute
       cursor.execute(statement, parameters)
   psycopg2.NotSupportedError: cannot alter type of a column used by a view or rule
   DETAIL:  rule _RETURN on view dashboard_slice_table depends on column "position_json"
   ```
   
   #### Screenshots
   
   ```
   2020-04-21 23:47:08,606:INFO:root:logging was configured successfully
   2020-04-21 23:47:08,789:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
   2020-04-21 23:47:09,043:DEBUG:asyncio:Using selector: EpollSelector
   INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade bddc498dd179 -> 4451805bbaa1, remove double percents
   INFO  [alembic.runtime.migration] Running upgrade bddc498dd179 -> 3dda56f1c4c6, Migrate num_period_compare and period_ratio_type
   INFO  [alembic.runtime.migration] Running upgrade 3dda56f1c4c6 -> 1d9e835a84f9, empty message
   INFO  [alembic.runtime.migration] Running upgrade 4451805bbaa1, 1d9e835a84f9 -> 705732c70154, empty message
   INFO  [alembic.runtime.migration] Running upgrade 4451805bbaa1, 1d9e835a84f9 -> fc480c87706c, empty message
   INFO  [alembic.runtime.migration] Running upgrade fc480c87706c -> bebcf3fed1fe, Migrate dashboard position_json data from V1 to V2
   scanning dashboard (1/186) >>>>
   ...
   INFO  [alembic.runtime.migration] Running upgrade bebcf3fed1fe, 705732c70154 -> ec1f88a35cc6, empty message
   INFO  [alembic.runtime.migration] Running upgrade 4451805bbaa1, 1d9e835a84f9 -> e3970889f38e, empty message
   INFO  [alembic.runtime.migration] Running upgrade 705732c70154, e3970889f38e -> 46ba6aaaac97, empty message
   INFO  [alembic.runtime.migration] Running upgrade 46ba6aaaac97, ec1f88a35cc6 -> c18bd4186f15, empty message
   INFO  [alembic.runtime.migration] Running upgrade c18bd4186f15 -> 7fcdcde0761c, Reduce position_json size by remove extra space and component id prefix
   ....
   INFO  [alembic.runtime.migration] Running upgrade 7fcdcde0761c -> 0c5070e96b57, add user attributes table
   INFO  [alembic.runtime.migration] Running upgrade 0c5070e96b57 -> 1a1d627ebd8e, position_json
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
       cursor, statement, parameters, context
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 536, in do_execute
       cursor.execute(statement, parameters)
   psycopg2.NotSupportedError: cannot alter type of a column used by a view or rule
   DETAIL:  rule _RETURN on view dashboard_slice_table depends on column "position_json"
   ```
   
   #### How to reproduce the bug
   
   1. took snapshot of superset DB which was running superset version 0.22.1
   2. use that to bring up new superset service with this docker image (version `0.35.2`): https://github.com/amancevice/docker-superset/blob/master/Dockerfile
   3. run `superset db upgrade`
   4. See error
   5. I upgraded to latest 0.36.0. and re-do steps 1 to 4; same thing happens
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `superset version`
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   Superset 0.35.2
   -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   
   - python version: `python --version`
   Python 3.6.10
   
   - node.js version: `node -v`
   V12
   
   
   ### Checklist
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [X] I have reproduced the issue with at least the latest released version of superset.
   - [X] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   My superset server is running while this DB upgrade is happening.
   I checked for any blocked queries


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] commented on issue #9606: dashboard_slice_table depends on column "position_json" during `superset db upgrade`

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #9606:
URL: https://github.com/apache/incubator-superset/issues/9606#issuecomment-647060784


   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.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on issue #9606: dashboard_slice_table depends on column "position_json" during `superset db upgrade`

Posted by GitBox <gi...@apache.org>.
willbarrett commented on issue #9606:
URL: https://github.com/apache/incubator-superset/issues/9606#issuecomment-649100702


   @SamEBae can you share the database engine you're running for the metadata database? `psycopg2` would indicate Postgres or a derivative, but our organization has not run into this issue, and we run Postgres.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] SamEBae commented on issue #9606: dashboard_slice_table depends on column "position_json" during `superset db upgrade`

Posted by GitBox <gi...@apache.org>.
SamEBae commented on issue #9606:
URL: https://github.com/apache/incubator-superset/issues/9606#issuecomment-652023319


   @willbarrett sorry for late respose. I use Postgres version 10.7 hosted on AWS RDS
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] closed issue #9606: dashboard_slice_table depends on column "position_json" during `superset db upgrade`

Posted by GitBox <gi...@apache.org>.
stale[bot] closed issue #9606:
URL: https://github.com/apache/incubator-superset/issues/9606


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] commented on issue #9606: dashboard_slice_table depends on column "position_json" during `superset db upgrade`

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #9606:
URL: https://github.com/apache/incubator-superset/issues/9606#issuecomment-683339566


   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.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org