-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add external executors -> Plugin manager #3
Comments
For operators, you can derive BaseOperator anywhere outside of the Airflow code and use them in your DAGs (we do that internally for operators that aren't relevant to the open source community). For executors they are a little more deeply embedded in the code as you pointed out. If you need a hook in https://github.com/mistercrunch/airflow/blob/master/airflow/executors/__init__.py I'll be happy to accept it. Could be something like:
And then somehow have this take precedence over the if statements underneath. Then all you need is a airflow_custom.py module in your environment that defines DEFAULT_EXECUTOR as a derivative of BaseExecutor. |
To ease a community development of operators,i think that a plugin I can fork the project and propose such solution with a pull request if you Le sam. 6 juin 2015 00:21, Maxime Beauchemin [email protected] a
|
Sounds perfect. Would the folder structure go |
+1 for plugin architecture via Yapsy. |
@osallou , I just read about Yapsy and this sounds like a great idea. We can squeeze a Internally we were mentioned the possibility of having plugins that would have UI components to them. Seems like it'd be doable too eventually. |
I used Yapsy in several of my projects, it is really easy and you can group plugins by "type" (operators, executors, ...). Then you only need to match your config with available plugins. Do you want me to code it and send a pull request or do you prefer to manage it yourself? |
Regarding structure and Yapsy use, I think that all plugins could go directly in a plugin dir (defined in config or $airhome/plugins by default) then you load the one defined in config file (for operator).
|
Sounds like we'd need a bit of code in I'm not sure how it's usually done, but it seems like it'd be nice to have them integrated in airflow.operators (same goes for executors and macros) |
A plugin system would be useful. I just wrote a hook and sensor operator for RabbitMQ so I could fire off a task when a queue became empty. master...codewithcheese:rabbitmq_hook_sensor |
I'm going to work on a plugin system over the next week, seems pretty straightforward. @codewithcheese, we support defining pool of tasks in Airflow, can your use case be handled by Airflow pools? http://pythonhosted.org/airflow/concepts.html#pools |
Actually I am using rabbitmq for data processing in a different project and need to run some bash commands when it is complete. I was sharing that to demonstrate that a plugin system for hooks and not so necessarily operators would be useful to me. |
I'm starting work on a plugin system using yapsy, I'll paste a link to the PR here when it's baked. I'm planning on integrating hooks, operators, macros, webviews, executors and I think that's it for now. We have use cases internally so that justifies the work. |
👍 |
Merged 22ac771 Let me know what you think |
It's out on pypi (v1.1.0) |
Sounds nice and fitting needs. Le mer. 17 juin 2015 03:09, Maxime Beauchemin [email protected] a
|
Sweeet thanks!. ill try it out. Now i can stop maintaining a fork for my deployment. |
… Default Retries and fix a small DAG refresh bug (apache#8) * fb64f2e: [TWTR][AIRFLOW-XXX] Twitter Airflow Customizations + Fixup job scheduling without explicit_defaults_for_timestamp * reformat * 6607e48(airflow:master): [AIRFLOW-3160] Load latest_dagruns asynchronously, speed up front page load time apache#4005 * a93d550: * a93d550: (HEAD, twitter/1.10+twtr) [TWTR][[AIRFLOW-4939]] Add Default Retries and fix a small DAG refresh bug (apache#3) (2 weeks ago) * flake8 fix
* Added tests for the MarqueDag library
Would be nice to be able to add other executors "out of airflow codebase".
List of executors is hard coded in airflow/executors/init.py
A kinda plugin mechanism could allow to add other executors.
The text was updated successfully, but these errors were encountered: