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 2021/01/11 21:15:12 UTC

[GitHub] [airflow] yergi opened a new pull request #13622: Switch logic for rule check

yergi opened a new pull request #13622:
URL: https://github.com/apache/airflow/pull/13622


   Instead of looking just for the old class name (`change.old_class`),
   look for the full import path instead
   (`change.old_path`)
   
   closes: #13570 


----------------------------------------------------------------
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] boring-cyborg[bot] commented on pull request #13622: Switch logic for rule check

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on pull request #13622:
URL: https://github.com/apache/airflow/pull/13622#issuecomment-758229203


   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (flake8, pylint and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/master/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/master/BREEZE.rst) for testing locally, itโ€™s a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#coding-style-and-best-practices).
   Apache Airflow is a community-driven project and together we are making it better ๐Ÿš€.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


----------------------------------------------------------------
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] github-actions[bot] commented on pull request #13622: Switch logic for rule check

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


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


----------------------------------------------------------------
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] yergi commented on pull request #13622: Switch logic for rule check

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


   Yes, I'll work on those!


----------------------------------------------------------------
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 pull request #13622: Switch logic for rule check

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #13622:
URL: https://github.com/apache/airflow/pull/13622#issuecomment-758230469


   Can you add tests to avoid regression?


----------------------------------------------------------------
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 pull request #13622: Switch logic for rule check

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


   Rebasing to latest v1-10-stable should now run the tests


----------------------------------------------------------------
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] github-actions[bot] closed pull request #13622: Switch logic for rule check

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #13622:
URL: https://github.com/apache/airflow/pull/13622


   


----------------------------------------------------------------
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] SamWheating commented on a change in pull request #13622: Switch logic for rule check

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



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -113,7 +113,7 @@ def _check_file(file_path):
         with open(file_path, "r") as file:
             content = file.read()
             for change in ImportChangesRule.ALL_CHANGES:
-                if change.old_class in content:
+                if change.old_path in content:

Review comment:
       While the old version of this was subject to false positives, such as throwing a warning on
   `from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator` 
   due to the match on `KubernetesPodOperator`
   
   I think that this version will produce false negatives, as we are now searching the file for the full import path (`airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator`)
   
   Which means that something like `from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator` won't be caught as there is no exact match. 




----------------------------------------------------------------
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 edited a comment on pull request #13622: Switch logic for rule check

Posted by GitBox <gi...@apache.org>.
kaxil edited a comment on pull request #13622:
URL: https://github.com/apache/airflow/pull/13622#issuecomment-765707507


   Rebasing to latest v1-10-stable should now run all the tests


----------------------------------------------------------------
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] SamWheating commented on a change in pull request #13622: Switch logic for rule check

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



##########
File path: airflow/upgrade/rules/import_changes.py
##########
@@ -113,7 +113,7 @@ def _check_file(file_path):
         with open(file_path, "r") as file:
             content = file.read()
             for change in ImportChangesRule.ALL_CHANGES:
-                if change.old_class in content:
+                if change.old_path in content:

Review comment:
       The old version of this was subject to false positives, such as throwing a warning on
   `from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator` 
   due to the match on `KubernetesPodOperator`
   
   While this fixes that case, I think that this version will produce false negatives, as we are now searching the file for the full import path (`airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator`)
   
   Which means that something like `from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator` won't be caught as there isn't an exact match. 




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