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/12/11 12:59:35 UTC

[GitHub] [airflow] ashb opened a new pull request #13012: Don't suggest change to users that will break dags on 1.1o.x

ashb opened a new pull request #13012:
URL: https://github.com/apache/airflow/pull/13012


   We don't have airflow.operators.python etc in 1.10.x, so suggesting
   users change this would break their dags currently.
   
   Closes #12895
   
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).


----------------------------------------------------------------
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] ashb merged pull request #13012: Don't suggest change to users that will break dags on 1.10.x

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


   


----------------------------------------------------------------
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] ashb commented on pull request #13012: Don't suggest change to users that will break dags on 1.10.x

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #13012:
URL: https://github.com/apache/airflow/pull/13012#issuecomment-743191056


   YOLO merging, I tested this locally, and it does work.


----------------------------------------------------------------
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] kaxil commented on a change in pull request #13012: Don't suggest change to users that will break dags on 1.10.x

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



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -80,10 +82,30 @@ class ImportChangesRule(BaseRule):
         "https://github.com/apache/airflow#backport-packages"
     )
 
+    current_airflow_version = Version(__import__("airflow").__version__)
+
+    if current_airflow_version < Version("2.0.0"):
+
+        def _filter_incompatible_renames(arg):
+            new_path = arg[1]

Review comment:
       cc @Dr-Denzy 




----------------------------------------------------------------
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] eladkal commented on a change in pull request #13012: Don't suggest change to users that will break dags on 1.10.x

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



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -80,10 +82,30 @@ class ImportChangesRule(BaseRule):
         "https://github.com/apache/airflow#backport-packages"
     )
 
+    current_airflow_version = Version(__import__("airflow").__version__)
+
+    if current_airflow_version < Version("2.0.0"):
+
+        def _filter_incompatible_renames(arg):
+            new_path = arg[1]

Review comment:
       @Dr-Denzy you can use the DAG example in https://github.com/apache/airflow/issues/14258 to verify it




----------------------------------------------------------------
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] eladkal commented on a change in pull request #13012: Don't suggest change to users that will break dags on 1.10.x

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



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -80,10 +82,30 @@ class ImportChangesRule(BaseRule):
         "https://github.com/apache/airflow#backport-packages"
     )
 
+    current_airflow_version = Version(__import__("airflow").__version__)
+
+    if current_airflow_version < Version("2.0.0"):
+
+        def _filter_incompatible_renames(arg):
+            new_path = arg[1]

Review comment:
       Shouldn't this be `new_path = arg[0]` ?
   `arg[0]` is the new path while `arg[1]` is the old path.
   We want to filter out new paths that lands in ariflow.operator/sensor/hooks
   




----------------------------------------------------------------
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] Dr-Denzy commented on a change in pull request #13012: Don't suggest change to users that will break dags on 1.10.x

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on a change in pull request #13012:
URL: https://github.com/apache/airflow/pull/13012#discussion_r577222423



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -80,10 +82,30 @@ class ImportChangesRule(BaseRule):
         "https://github.com/apache/airflow#backport-packages"
     )
 
+    current_airflow_version = Version(__import__("airflow").__version__)
+
+    if current_airflow_version < Version("2.0.0"):
+
+        def _filter_incompatible_renames(arg):
+            new_path = arg[1]

Review comment:
       I will look into it.




----------------------------------------------------------------
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] ashb commented on a change in pull request #13012: Don't suggest change to users that will break dags on 1.1o.x

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



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -39,7 +39,9 @@ class ImportChange(
     )
 ):
     def info(self, file_path=None):
-        msg = "Using `{}` should be replaced by `{}`".format(self.old_path, self.new_path)
+        msg = "Using `{}` should be replaced by `{}`".format(
+            self.old_path, self.new_path
+        )

Review comment:
       (I black-formatted this)




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