Skip to content

AIP-51 - Misc Executor Coupling in UI #27933

@o-nikolas

Description

@o-nikolas

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-k8s url.
    Views code:
    if not settings.IS_K8S_OR_K8SCELERY_EXECUTOR:

    Associated TI code:
    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:
    extra_args['sequential_executor_warning'] = conf.get('core', 'executor') == 'SequentialExecutor'

    Associated message in dags.html:
    {% 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AIP-51AIP-51: Remove executor coupling from Core

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions