Skip to content

Policies do not run at the startup of each worker #37621

@andreyolv

Description

@andreyolv

Description

Policies do not run at the startup of each worker, only in dag processor.

Use case/motivation

I'm using some policies for dags and tasks and I noticed that the policies are executed continuously by the dagprocessor and ok that makes sense, but it is also executed in the workers when each task starts. (using KubernesExecutor)

Why do they run on workers? Is there any way for policies not to run on workers, by configuration?

We use airflow with each project in its namespace, and if any of the policies need extra permissions in kubernetes, we can just link it to the dag processor. However, if the task is executed in each namespace, we will need to have these permissions in each namespace and this may end up complicating the use of policies in addition to the project image needing specific dependencies to run the policies.

Related issues

I didn't find

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featureFeature Requestsneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions