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 2018/07/24 07:08:42 UTC

[GitHub] john-bodley opened a new pull request #5471: [migration] Fix migration 3dda56f1c

john-bodley opened a new pull request #5471: [migration] Fix migration 3dda56f1c
URL: https://github.com/apache/incubator-superset/pull/5471
 
 
   This PR fixes a number of issues with the 3dda56f1c migration which we experienced whilst trying to upgrade our production database. Part of the issues are due to the lack of validation/sanitizing in the form-data and thus erroneous fields may be present. 
   
   Specifically this PR:
   - Removes the `isodate` package which is installed via an already pinned package.
   - Adds the missing time grains. Note it's unfortunate that we have both `week_start_` and `week_starting_`. Ideally there should only be `week_starting_` which is consistent with `week_ending_`.
   - Fixes the granularity field lookup. Due to erroneous fields we've witnesses form-data with both `granularity` (Druid) and `time_grain_sqla` (SQLA) defined (possibly due to switching of datasources). Rather than using the first _truthy_ value it uses the the appropriate field associated with the datasource type.  
   - Fixes the period ratio type logic. The `period_ratio_type` field could be `None` and thus `params.get('period_ratio_type', 'growth')` would return `None` which would result in an exception when trying to call `lower()`. The fix is simply `params.get('period_ratio_type') or 'growth'` to ensure that `growth is the fallback value.
   
   to:  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

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