[ 
https://issues.apache.org/jira/browse/AIRFLOW-6334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17009145#comment-17009145
 ] 

ASF GitHub Bot commented on AIRFLOW-6334:
-----------------------------------------

mik-laj commented on pull request #7085: [AIRFLOW-6334] Use classes instead 
list of string in executors
URL: https://github.com/apache/airflow/pull/7085
 
 
   Most of the executors run local task jobs by running `airflow tasks run 
...`. This is achieved by passing  `['airflow', 'tasks', 'run', ...]` object to 
subprocess.check_call. 
   
   This is very limiting when creating new executors that do not necessarily 
want to start a new process when starting a new process, e.g. fork a process 
instead of create.
   
   We could achieve a similar effect if we process the argument list back, but 
this is an ugly and hack solution, so I did refactor the code and now the 
executor passes the LocalTaskJobDeferredRun object that contains all the 
detailed information. A particular executor could create a command if it needs 
it.
   
   This will facilitate the development of other executors:
   
https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-29%3A+AWS+Fargate+Executor
 (@aelzeiny)
   
https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-28%3A+Add+AsyncExecutor+option
 (@dazza-codes)
   
https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-25+The+Knative+Executor 
(@dimberman 
   https://github.com/apache/airflow/pull/6750 (@nuclearpinguin )
   This also made the DebugExecutor code simpler. (@nuclearpinguin )
   ---
   Issue link: WILL BE INSERTED BY 
[boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   - [X] Description above provides context of the change
   - [X] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = 
JIRA ID<sup>*</sup>
   - [X] Unit tests coverage for changes (not needed for documentation changes)
   - [X] Commits follow "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)"
   - [X] Relevant documentation is updated including usage instructions.
   - [X] 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:
[email protected]


> Change CommandType in executors to be a dictionary
> --------------------------------------------------
>
>                 Key: AIRFLOW-6334
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6334
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: executors
>    Affects Versions: 2.0.0
>            Reporter: Tomasz Urbaszek
>            Priority: Major
>
> Most of the executors run tasks by running 'airflow tasks run ...`. This is 
> achieved by passing  ['airflow', 'tasks', 'run', ...] object to 
> subprocess.check_call. I would love to abandon this limiting type and instead 
> use a dictionary. 
> Then such dictionary could be passed to new method that will run the task 
> without using subprocess.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to