-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Overview
There are pages in the Airflow UI which are specific to particular Executors.
Examples
- 6a) Kube yaml can be rendered in the UI for KubernetesExecutor and CeleryKubernetesExecutor, at the
/rendered-k8surl.
Views code:Line 1480 in 27e2101
if not settings.IS_K8S_OR_K8SCELERY_EXECUTOR:
Associated TI code:airflow/airflow/models/taskinstance.py
Line 2161 in 26f94c5
def get_rendered_k8s_spec(self, session: Session = NEW_SESSION): - 6b) A warning popup is show in the UI when using the SequentialExecutor.
Views code:Line 532 in 26f94c5
extra_args['sequential_executor_warning'] = conf.get('core', 'executor') == 'SequentialExecutor'
Associated message in dags.html:airflow/airflow/www/templates/airflow/dags.html
Lines 115 to 120 in fb741fd
{% if sequential_executor_warning | default(false) %} {% call show_message(category='warning', dismissible=false) %} Do not use <b>SequentialExecutor</b> in production. <a href={{ get_docs_url("executor/index.html") }}><b>Click here</b></a> for more information. {% endcall %} {% endif %}
Proposal
A pluggable mechanism for Executor subclasses to vend UI views to then be used in views.py. This would allow all Executors to have UI components without needing to modify core Airflow code. There are not many instance of this coupling and it would be a more involved implementation which might not be used often. It isn't as high priority as other coupling types, but should still be addressed. There are also projects underway to migrate Airflow UI to a different framework, which would likely affect how this coupling would be solved.