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 2022/04/06 06:59:50 UTC

[GitHub] [superset] villebro opened a new pull request, #19543: fix(migrations): reorder skipped 1.4 migrations

villebro opened a new pull request, #19543:
URL: https://github.com/apache/superset/pull/19543

   ### SUMMARY
   Two migrations (`b92d69a6643c` and `0ca9e5f1dacd`) had been skipped in the 1.4 release, causing errors when upgrading from 1.4 to 1.5 or master. See the different down revisions of `f9847149153d` in 1.4 and master:
   
   https://github.com/apache/superset/blob/9fc5e09cb3c5278720d455ddde959ab791713206/superset/migrations/versions/f9847149153d_add_certifications_columns_to_slice.py#L29-L30
   
   https://github.com/apache/superset/blob/156ac7dd79105bca47138d8906b50d01dc4f1cb6/superset/migrations/versions/f9847149153d_add_certifications_columns_to_slice.py#L29-L30
   
   This places the skipped migrations in front of the first migration of 1.5, making sure the migrations are applied to the metadata.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   1. Install version 1.4 of Superset, run db migrations
   2. Install 1.5.0rc1 or master branch, run db migrations and run `superset init` and see the error
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: closes #19100
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] artemonsh commented on pull request #19543: fix(migrations): reorder skipped 1.4 migrations

Posted by "artemonsh (via GitHub)" <gi...@apache.org>.
artemonsh commented on PR #19543:
URL: https://github.com/apache/superset/pull/19543#issuecomment-1400109973

   @lzfxxx Probably, there is an existing sqlite database. You can check its presence `ls ~/.superset/` and remove it `rm ~/.superset/superset.db` and try again


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] codecov[bot] commented on pull request #19543: fix(migrations): reorder skipped 1.4 migrations

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19543:
URL: https://github.com/apache/superset/pull/19543#issuecomment-1089899629

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19543?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19543](https://codecov.io/gh/apache/superset/pull/19543?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (be4dd17) into [master](https://codecov.io/gh/apache/superset/commit/156ac7dd79105bca47138d8906b50d01dc4f1cb6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (156ac7d) will **decrease** coverage by `12.87%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #19543       +/-   ##
   ===========================================
   - Coverage   66.57%   53.69%   -12.88%     
   ===========================================
     Files        1682     1682               
     Lines       64321    64321               
     Branches     6561     6561               
   ===========================================
   - Hits        42821    34538     -8283     
   - Misses      19799    28082     +8283     
     Partials     1701     1701               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `?` | |
   | presto | `52.56% <ø> (ø)` | |
   | python | `56.10% <ø> (-26.24%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `47.21% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19543?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset/key\_value/commands/upsert.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3Vwc2VydC5weQ==) | `0.00% <0.00%> (-89.59%)` | :arrow_down: |
   | [superset/key\_value/commands/update.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `0.00% <0.00%> (-89.37%)` | :arrow_down: |
   | [superset/key\_value/commands/delete.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZS5weQ==) | `0.00% <0.00%> (-85.30%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
   | [superset/key\_value/commands/delete\_expired.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZV9leHBpcmVkLnB5) | `0.00% <0.00%> (-80.77%)` | :arrow_down: |
   | [superset/dashboards/commands/importers/v0.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9pbXBvcnRlcnMvdjAucHk=) | `14.79% <0.00%> (-75.15%)` | :arrow_down: |
   | [superset/datasets/commands/importers/v0.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvaW1wb3J0ZXJzL3YwLnB5) | `24.82% <0.00%> (-68.80%)` | :arrow_down: |
   | [superset/databases/commands/test\_connection.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3Rlc3RfY29ubmVjdGlvbi5weQ==) | `31.42% <0.00%> (-68.58%)` | :arrow_down: |
   | [superset/datasets/commands/update.py](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvdXBkYXRlLnB5) | `25.88% <0.00%> (-68.24%)` | :arrow_down: |
   | ... and [264 more](https://codecov.io/gh/apache/superset/pull/19543/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19543?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19543?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [156ac7d...be4dd17](https://codecov.io/gh/apache/superset/pull/19543?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] betodealmeida commented on pull request #19543: fix(migrations): reorder skipped 1.4 migrations

Posted by GitBox <gi...@apache.org>.
betodealmeida commented on PR #19543:
URL: https://github.com/apache/superset/pull/19543#issuecomment-1090673944

   I'm running `superset db upgrade` and master right now, with a clean DB, and no migrations are applied:
   
   ```
   % psql master
   psql (14.2)
   Type "help" for help.
   
   master=# \dt
                   List of relations
    Schema |          Name           | Type  | Owner
   --------+-------------------------+-------+-------
    public | ab_permission           | table | beto
    public | ab_permission_view      | table | beto
    public | ab_permission_view_role | table | beto
    public | ab_register_user        | table | beto
    public | ab_role                 | table | beto
    public | ab_user                 | table | beto
    public | ab_user_role            | table | beto
    public | ab_view_menu            | table | beto
   (8 rows)
   
   master=#
   ```
   
   Nothing happens on `superset db upgrade`:
   
   ```
   % superset db upgrade
   Loaded your LOCAL configuration at [/Users/beto/Projects/incubator-superset/superset_config.py]
   --------------------------------------------------------------------------------
                                       WARNING
   --------------------------------------------------------------------------------
   A Default SECRET_KEY was detected, please use superset_config.py to override it.
   Use a strong complex alphanumeric string and use a tool to help you generate
   a sufficiently random sequence, ex: openssl rand -base64 42
   --------------------------------------------------------------------------------
   --------------------------------------------------------------------------------
   logging was configured successfully
   2022-04-06 12:24:03,523:INFO:superset.utils.logging_configurator:logging was configured successfully
   2022-04-06 12:24:03,536:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
   Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   2022-04-06 12:24:03,542:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   2022-04-06 12:24:03,548:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   ```


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] villebro commented on pull request #19543: fix(migrations): reorder skipped 1.4 migrations

Posted by GitBox <gi...@apache.org>.
villebro commented on PR #19543:
URL: https://github.com/apache/superset/pull/19543#issuecomment-1091138003

   @betodealmeida to double check, I pulled current master, wiped my metastore and ran `superset db upgrade`, and it ran successfully. Maybe you have a lingering old migration in the `version` directory? Which reminds me that for some reason alembic error messages don't appear to work anymore (it just fails silently), making debugging very difficult 🙁 (will try to look at why that's the case at some point)


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] villebro merged pull request #19543: fix(migrations): reorder skipped 1.4 migrations

Posted by GitBox <gi...@apache.org>.
villebro merged PR #19543:
URL: https://github.com/apache/superset/pull/19543


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] lzfxxx commented on pull request #19543: fix(migrations): reorder skipped 1.4 migrations

Posted by GitBox <gi...@apache.org>.
lzfxxx commented on PR #19543:
URL: https://github.com/apache/superset/pull/19543#issuecomment-1383575742

   > I'm running `superset db upgrade` and master right now, with a clean DB, and no migrations are applied:
   > 
   > ```
   > % psql master
   > psql (14.2)
   > Type "help" for help.
   > 
   > master=# \dt
   >                 List of relations
   >  Schema |          Name           | Type  | Owner
   > --------+-------------------------+-------+-------
   >  public | ab_permission           | table | beto
   >  public | ab_permission_view      | table | beto
   >  public | ab_permission_view_role | table | beto
   >  public | ab_register_user        | table | beto
   >  public | ab_role                 | table | beto
   >  public | ab_user                 | table | beto
   >  public | ab_user_role            | table | beto
   >  public | ab_view_menu            | table | beto
   > (8 rows)
   > 
   > master=#
   > ```
   > 
   > Nothing happens on `superset db upgrade`:
   > 
   > ```
   > % superset db upgrade
   > Loaded your LOCAL configuration at [/Users/beto/Projects/incubator-superset/superset_config.py]
   > --------------------------------------------------------------------------------
   >                                     WARNING
   > --------------------------------------------------------------------------------
   > A Default SECRET_KEY was detected, please use superset_config.py to override it.
   > Use a strong complex alphanumeric string and use a tool to help you generate
   > a sufficiently random sequence, ex: openssl rand -base64 42
   > --------------------------------------------------------------------------------
   > --------------------------------------------------------------------------------
   > logging was configured successfully
   > 2022-04-06 12:24:03,523:INFO:superset.utils.logging_configurator:logging was configured successfully
   > 2022-04-06 12:24:03,536:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
   > Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   > 2022-04-06 12:24:03,542:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   > Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   > 2022-04-06 12:24:03,548:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the followinng cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
   > INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
   > INFO  [alembic.runtime.migration] Will assume transactional DDL.
   > ```
   > 
   > Not sure if it's related to this PR.
   
   @betodealmeida I'm facing the same problem, did you find the solution?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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