You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/03 10:45:37 UTC

[GitHub] [airflow] mik-laj opened a new issue #10129: Warning about unsafe migration

mik-laj opened a new issue #10129:
URL: https://github.com/apache/airflow/issues/10129


   Helllo,
   
   We currently have two migrations that cannot always be successful, which can lead to database corruption. All modern RDMSs should handle this case correctly and roll back the migrations, but ... it would be better if we detected these situations before starting the migration and not run the migration if we know that the operation will fail. This will also allow you to display much more user-friendly messages.
   https://github.com/apache/airflow/blob/master/UPDATING.md#database-schema-changes
   
   A similar check should be part of the [airflow upgrade-check](https://github.com/apache/airflow/issues/8765), but this command will be available in Airflow 1.10 and will not be run before migration starts.
   
   Therefore, I propose that we write two small functions that will detect these two cases before starting the migration.
   https://github.com/apache/airflow/blob/master/airflow/utils/db.py#L612
   When this happens, we should display a message to the end-user along with an instruction describing the manual steps they have to do on their side.
   Please note that if we do not have a table in the database, we should allow the migration to run. In other words, we should handle the case where the table does not exist in the database, so we cannot check for problematic database entries.
   
   Best regards,
   Kamil BreguĊ‚aa


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



[GitHub] [airflow] mik-laj commented on issue #10129: Warning about unsafe migrations

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #10129:
URL: https://github.com/apache/airflow/issues/10129#issuecomment-668107825


   Done :-D Only 5 hours the task waiting for you to find it. I am very happy that we have such an active community. :-D 


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



[GitHub] [airflow] khyurri commented on issue #10129: Warning about unsafe migrations

Posted by GitBox <gi...@apache.org>.
khyurri commented on issue #10129:
URL: https://github.com/apache/airflow/issues/10129#issuecomment-668105699


   Please, assign to me.


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



[GitHub] [airflow] khyurri commented on issue #10129: Warning about unsafe migrations

Posted by GitBox <gi...@apache.org>.
khyurri commented on issue #10129:
URL: https://github.com/apache/airflow/issues/10129#issuecomment-670971058


   I've created PR. 
   
   Not sure, how to add this functionality into  `airflow upgrade-check`, we can move this functions to a more suitable place.


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



[GitHub] [airflow] mik-laj closed issue #10129: Warning about unsafe migrations

Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #10129:
URL: https://github.com/apache/airflow/issues/10129


   


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



[GitHub] [airflow] khyurri edited a comment on issue #10129: Warning about unsafe migrations

Posted by GitBox <gi...@apache.org>.
khyurri edited a comment on issue #10129:
URL: https://github.com/apache/airflow/issues/10129#issuecomment-699821152


   @mik-laj 
   Please, review the PR: https://github.com/apache/airflow/pull/10254


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



[GitHub] [airflow] khyurri commented on issue #10129: Warning about unsafe migrations

Posted by GitBox <gi...@apache.org>.
khyurri commented on issue #10129:
URL: https://github.com/apache/airflow/issues/10129#issuecomment-699821152


   @mik-laj 
   Please, review PR: https://github.com/apache/airflow/pull/10254


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