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 2022/02/18 16:50:59 UTC

[GitHub] [airflow] dstandish opened a new pull request #21670: Fix migrations for sqlite

dstandish opened a new pull request #21670:
URL: https://github.com/apache/airflow/pull/21670


   Have to disable foreign key constraints temporarily
   


-- 
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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] uranusjr commented on a change in pull request #21670: Fix some migrations

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #21670:
URL: https://github.com/apache/airflow/pull/21670#discussion_r810840843



##########
File path: airflow/migrations/versions/30867afad44a_rename_concurrency_column_in_dag_table_.py
##########
@@ -36,13 +36,20 @@
 
 def upgrade():
     """Apply Rename concurrency column in dag table to max_active_tasks"""
+    conn = op.get_bind()
+    is_sqlite = bool(conn.dialect.name == "sqlite")

Review comment:
       Why the additional `bool()` call?




-- 
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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] dstandish commented on a change in pull request #21670: Fix some migrations

Posted by GitBox <gi...@apache.org>.
dstandish commented on a change in pull request #21670:
URL: https://github.com/apache/airflow/pull/21670#discussion_r812423844



##########
File path: airflow/migrations/versions/30867afad44a_rename_concurrency_column_in_dag_table_.py
##########
@@ -36,13 +36,20 @@
 
 def upgrade():
     """Apply Rename concurrency column in dag table to max_active_tasks"""
+    conn = op.get_bind()
+    is_sqlite = bool(conn.dialect.name == "sqlite")

Review comment:
       > Why the additional bool() call? 
   
   just a copy paste, no original work here :)




-- 
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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] uranusjr commented on a change in pull request #21670: Fix some migrations

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #21670:
URL: https://github.com/apache/airflow/pull/21670#discussion_r810841511



##########
File path: airflow/migrations/versions/30867afad44a_rename_concurrency_column_in_dag_table_.py
##########
@@ -36,13 +36,20 @@
 
 def upgrade():
     """Apply Rename concurrency column in dag table to max_active_tasks"""
+    conn = op.get_bind()
+    is_sqlite = bool(conn.dialect.name == "sqlite")

Review comment:
       BTW this `conn.dialect.name` check appears much too often in our migrations files (not just those modified in this PR but generally) maybe we should extract the logic to somewhere like `airflow.utils.db`.




-- 
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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] dstandish merged pull request #21670: Fix some migrations

Posted by GitBox <gi...@apache.org>.
dstandish merged pull request #21670:
URL: https://github.com/apache/airflow/pull/21670


   


-- 
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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] github-actions[bot] commented on pull request #21670: Fix some migrations

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #21670:
URL: https://github.com/apache/airflow/pull/21670#issuecomment-1047375302


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] dstandish commented on a change in pull request #21670: Fix some migrations

Posted by GitBox <gi...@apache.org>.
dstandish commented on a change in pull request #21670:
URL: https://github.com/apache/airflow/pull/21670#discussion_r812425970



##########
File path: airflow/migrations/versions/30867afad44a_rename_concurrency_column_in_dag_table_.py
##########
@@ -36,13 +36,20 @@
 
 def upgrade():
     """Apply Rename concurrency column in dag table to max_active_tasks"""
+    conn = op.get_bind()
+    is_sqlite = bool(conn.dialect.name == "sqlite")

Review comment:
       removed `bool`




-- 
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: commits-unsubscribe@airflow.apache.org

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