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/06/04 14:28:22 UTC

[GitHub] [airflow] Patil2099 opened a new pull request #16268: Improve Regex For Inclusive Words

Patil2099 opened a new pull request #16268:
URL: https://github.com/apache/airflow/pull/16268


   Fixes #15994


-- 
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] potiuk commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -3921,7 +3921,7 @@ def test_do_schedule_max_active_runs_upstream_failed(self):
             schedule_interval='@once',
             max_active_runs=1,
         ) as dag:
-            # Can't use DummyOperator as that goes straight to success
+            # Can't use NoOpOperatoras that goes straight to success

Review comment:
       Agree with @turbaszek 




-- 
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] turbaszek commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: .pre-commit-config.yaml
##########
@@ -340,7 +340,8 @@ repos:
         language: pygrep
         name: Check for language that we do not accept as community
         description: Please use "deny_list" or "allow_list"  instead.
-        entry: "(?i)(black|white)[_-]?list"
+        entry: "(?i)(\bmaster\b|\bhe\b|\bshe\b|\bhis\b|\bher\b|
+          \bslave\b|\bsanity\b|\bdummy\b|\bwhite\b|\bblack\b)"

Review comment:
       Right, good catch @potiuk! 




-- 
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] potiuk commented on pull request #16268: Change Regex For Inclusive Words

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


   I am afraid there is an extra whitespace that needs to be fixed (I recommend actually installing and running the pre-commit that you just changed :))


-- 
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] turbaszek commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: airflow/models/dagrun.py
##########
@@ -737,13 +737,13 @@ def schedule_tis(self, schedulable_tis: Iterable[TI], session: Session = None) -
 
         Each element of ``schedulable_tis`` should have it's ``task`` attribute already set.
 
-        Any DummyOperator without callbacks is instead set straight to the success state.
+        Any NoOpOperatorwithout callbacks is instead set straight to the success state.

Review comment:
       ```suggestion
           Any NoOpOperator without callbacks is instead set straight to the success state.
   ```

##########
File path: airflow/models/dagrun.py
##########
@@ -737,13 +737,13 @@ def schedule_tis(self, schedulable_tis: Iterable[TI], session: Session = None) -
 
         Each element of ``schedulable_tis`` should have it's ``task`` attribute already set.
 
-        Any DummyOperator without callbacks is instead set straight to the success state.
+        Any NoOpOperatorwithout callbacks is instead set straight to the success state.
 
         All the TIs should belong to this DagRun, but this code is in the hot-path, this is not checked -- it
         is the caller's responsibility to call this function only with TIs from a single dag run.
         """
         # Get list of TI IDs that do not need to executed, these are
-        # tasks using DummyOperator and without on_execute_callback / on_success_callback
+        # tasks using NoOpOperatorand without on_execute_callback / on_success_callback

Review comment:
       ```suggestion
           # tasks using NoOpOperator and without on_execute_callback / on_success_callback
   ```

##########
File path: airflow/models/dagrun.py
##########
@@ -769,7 +769,7 @@ def schedule_tis(self, schedulable_tis: Iterable[TI], session: Session = None) -
                 .update({TI.state: State.SCHEDULED}, synchronize_session=False)
             )
 
-        # Tasks using DummyOperator should not be executed, mark them as success
+        # Tasks using NoOpOperatorshould not be executed, mark them as success

Review comment:
       ```suggestion
           # Tasks using NoOpOperator should not be executed, mark them as success
   ```




-- 
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 #16268: Change Regex For Inclusive Words

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


   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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] Patil2099 commented on pull request #16268: Change Regex For Inclusive Words

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


   I will finish this by today making two prs


-- 
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 #16268: Change Regex For Inclusive Words

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


   


-- 
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] mik-laj commented on a change in pull request #16268: Change Regex For Inclusive Words

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #16268:
URL: https://github.com/apache/airflow/pull/16268#discussion_r645702863



##########
File path: UPDATING.md
##########
@@ -409,7 +409,7 @@ The following table shows changes in import paths.
 |-------------------------------------|----------------------------|
 | airflow.hooks.base_hook.BaseHook | airflow.hooks.base.BaseHook |
 | airflow.hooks.dbapi_hook.DbApiHook | airflow.hooks.dbapi.DbApiHook |
-| airflow.operators.dummy_operator.DummyOperator | airflow.operators.dummy.DummyOperator |
+| airflow.operators.dummy_operator.NoOpOperator| airflow.operators.dummy.NoOpOperator|

Review comment:
       We should keep it, because it is related to released version. 




-- 
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] turbaszek commented on pull request #16268: Change Regex For Inclusive Words

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


   Hey @Patil2099 do you need any help to finish this PR?


-- 
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] potiuk commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: UPDATING.md
##########
@@ -409,7 +409,7 @@ The following table shows changes in import paths.
 |-------------------------------------|----------------------------|
 | airflow.hooks.base_hook.BaseHook | airflow.hooks.base.BaseHook |
 | airflow.hooks.dbapi_hook.DbApiHook | airflow.hooks.dbapi.DbApiHook |
-| airflow.operators.dummy_operator.DummyOperator | airflow.operators.dummy.DummyOperator |
+| airflow.operators.dummy_operator.NoOpOperator| airflow.operators.dummy.NoOpOperator|

Review comment:
       Yeah. We should only deprecate it. and also we should change package name as well.




-- 
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] turbaszek commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -3921,7 +3921,7 @@ def test_do_schedule_max_active_runs_upstream_failed(self):
             schedule_interval='@once',
             max_active_runs=1,
         ) as dag:
-            # Can't use DummyOperator as that goes straight to success
+            # Can't use NoOpOperatoras that goes straight to success

Review comment:
       ```suggestion
               # Can't use NoOpOperator as that goes straight to success
   ```
   And in other places - it seems to be badly performed replacement. In general I would suggest to separate this PR into two PRs:
   - replace non-inclusive words
   - rename `DummyOperator` - this change is a big one and we should probably first reach consensu on the new name




-- 
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] turbaszek commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -3921,7 +3921,7 @@ def test_do_schedule_max_active_runs_upstream_failed(self):
             schedule_interval='@once',
             max_active_runs=1,
         ) as dag:
-            # Can't use DummyOperator as that goes straight to success
+            # Can't use NoOpOperatoras that goes straight to success

Review comment:
       ```suggestion
               # Can't use NoOpOperator as that goes straight to success
   ```
   And in other places - it seams to be badly performed replacement. In general I would suggest to separate this PR into two PRs:
   - replace non-inclusive words
   - rename `DummyOperator` - this change is a big one and we should probably first reach consensu on the new name




-- 
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 a change in pull request #16268: Change Regex For Inclusive Words

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #16268:
URL: https://github.com/apache/airflow/pull/16268#discussion_r645702863



##########
File path: UPDATING.md
##########
@@ -409,7 +409,7 @@ The following table shows changes in import paths.
 |-------------------------------------|----------------------------|
 | airflow.hooks.base_hook.BaseHook | airflow.hooks.base.BaseHook |
 | airflow.hooks.dbapi_hook.DbApiHook | airflow.hooks.dbapi.DbApiHook |
-| airflow.operators.dummy_operator.DummyOperator | airflow.operators.dummy.DummyOperator |
+| airflow.operators.dummy_operator.NoOpOperator| airflow.operators.dummy.NoOpOperator|

Review comment:
       We should keep it, because it is related to released versions. 




-- 
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] Patil2099 commented on pull request #16268: Change Regex For Inclusive Words

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


   I think it is ready now @turbaszek @potiuk. 


-- 
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] Patil2099 commented on pull request #16268: Change Regex For Inclusive Words

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


   I think it is ready now @turbaszek @potiuk. 


-- 
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] potiuk commented on pull request #16268: Change Regex For Inclusive Words

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


   I am afraid there is an extra whitespace that needs to be fixed (I recommend actually installing and running the pre-commit that you just changed :))


-- 
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] potiuk commented on a change in pull request #16268: Change Regex For Inclusive Words

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



##########
File path: UPDATING.md
##########
@@ -409,7 +409,7 @@ The following table shows changes in import paths.
 |-------------------------------------|----------------------------|
 | airflow.hooks.base_hook.BaseHook | airflow.hooks.base.BaseHook |
 | airflow.hooks.dbapi_hook.DbApiHook | airflow.hooks.dbapi.DbApiHook |
-| airflow.operators.dummy_operator.DummyOperator | airflow.operators.dummy.DummyOperator |
+| airflow.operators.dummy_operator.NoOpOperator| airflow.operators.dummy.NoOpOperator|

Review comment:
       Yeah. We should only deprecate it. and also we should chnage package name as well.




-- 
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] potiuk commented on pull request #16268: Change Regex For Inclusive Words

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


   You need to split the regexp to be multi-line. There are some examples of other regexps split in similar way in other parts of the file.


-- 
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 #16268: Improve Regex For Inclusive Words

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


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