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/02/27 03:07:24 UTC

[GitHub] [airflow] mik-laj opened a new pull request #7563: [AIRFLOW-6939] Executor configuration via import path

mik-laj opened a new pull request #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563
 
 
   I want to use it with MockExecutor.
   
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [ ] Description above provides context of the change
   - [ ] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   <sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
   
   ---
   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).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

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


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563#discussion_r385076603
 
 

 ##########
 File path: UPDATING.md
 ##########
 @@ -61,6 +61,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Custom executors is loaded using full import path
+
+In previous versions of Airflow it was possible to use plugins to load custom executors. It is still
+possible, but the configuration has changed. Now you don't have to create a plugin to configure a
+custom executor, but you need to provide the full path to the module in the `executor` option
+in the `core` section. The purpose of this change is to simplify the plugin mechanism and make
+it easier to configure executor.
+
+If your module was in the path `my_acme_company.executors.MyCustomExecutor`  and the plugin was
+called `my_plugin` then your configuration looks like this
+
+```ini
+[core]
+executor = my_plguin.MyCustomExecutor
 
 Review comment:
   More importantly for updating -- did we ever publish executors-via- plugin to 1.10 release, if not then these updating instructions don't make sense.

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


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563#discussion_r385131154
 
 

 ##########
 File path: UPDATING.md
 ##########
 @@ -61,6 +61,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Custom executors is loaded using full import path
+
+In previous versions of Airflow it was possible to use plugins to load custom executors. It is still
+possible, but the configuration has changed. Now you don't have to create a plugin to configure a
+custom executor, but you need to provide the full path to the module in the `executor` option
+in the `core` section. The purpose of this change is to simplify the plugin mechanism and make
+it easier to configure executor.
+
+If your module was in the path `my_acme_company.executors.MyCustomExecutor`  and the plugin was
+called `my_plugin` then your configuration looks like this
+
+```ini
+[core]
+executor = my_plguin.MyCustomExecutor
 
 Review comment:
   Oh wow missed that one totally!

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


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563#discussion_r385085663
 
 

 ##########
 File path: UPDATING.md
 ##########
 @@ -61,6 +61,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Custom executors is loaded using full import path
+
+In previous versions of Airflow it was possible to use plugins to load custom executors. It is still
+possible, but the configuration has changed. Now you don't have to create a plugin to configure a
+custom executor, but you need to provide the full path to the module in the `executor` option
+in the `core` section. The purpose of this change is to simplify the plugin mechanism and make
+it easier to configure executor.
+
+If your module was in the path `my_acme_company.executors.MyCustomExecutor`  and the plugin was
+called `my_plugin` then your configuration looks like this
+
+```ini
+[core]
+executor = my_plguin.MyCustomExecutor
 
 Review comment:
   II haven't tested it, but the code looked like it had a chance to work.  In the documentation, we have information:
   https://airflow.readthedocs.io/en/1.10.6/plugins.html

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


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj merged pull request #7563: [AIRFLOW-6939] Executor configuration via import path

Posted by GitBox <gi...@apache.org>.
mik-laj merged pull request #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563
 
 
   

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


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io commented on issue #7563: [AIRFLOW-6939] Executor configuration via import path

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563#issuecomment-591771407
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=h1) Report
   > Merging [#7563](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/835d8596a3d8752a4900d7153e2a75efdbb79668?src=pr&el=desc) will **decrease** coverage by `0.25%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7563/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7563      +/-   ##
   ==========================================
   - Coverage   86.81%   86.56%   -0.26%     
   ==========================================
     Files         896      896              
     Lines       42656    42657       +1     
   ==========================================
   - Hits        37033    36926     -107     
   - Misses       5623     5731     +108
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/executors/executor\_loader.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9leGVjdXRvcnMvZXhlY3V0b3JfbG9hZGVyLnB5) | `100% <100%> (+21.05%)` | :arrow_up: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0%> (-45.08%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.69% <0%> (-25.26%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   | [airflow/plugins\_manager.py](https://codecov.io/gh/apache/airflow/pull/7563/diff?src=pr&el=tree#diff-YWlyZmxvdy9wbHVnaW5zX21hbmFnZXIucHk=) | `89.13% <0%> (+2.17%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=footer). Last update [835d859...c865908](https://codecov.io/gh/apache/airflow/pull/7563?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

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


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7563: [AIRFLOW-6939] Executor configuration via import path
URL: https://github.com/apache/airflow/pull/7563#discussion_r385075833
 
 

 ##########
 File path: UPDATING.md
 ##########
 @@ -61,6 +61,29 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Custom executors is loaded using full import path
+
+In previous versions of Airflow it was possible to use plugins to load custom executors. It is still
+possible, but the configuration has changed. Now you don't have to create a plugin to configure a
+custom executor, but you need to provide the full path to the module in the `executor` option
+in the `core` section. The purpose of this change is to simplify the plugin mechanism and make
+it easier to configure executor.
+
+If your module was in the path `my_acme_company.executors.MyCustomExecutor`  and the plugin was
+called `my_plugin` then your configuration looks like this
+
+```ini
+[core]
+executor = my_plguin.MyCustomExecutor
 
 Review comment:
   Did this even work before? I thought we only looked at a specific hard-coded list?

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


With regards,
Apache Git Services