Skip to content

No scheduling when max_active_runs is 1 #19901

Description

@alexakra

Apache Airflow version

2.2.2 (latest released)

Operating System

Debian

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

What happened

Since version 2.2 a field DAG.next_dagrun_create_after is not calculated when DAG.max_active_runs is 1.

What you expected to happen

if num_active_runs.get(dag.dag_id, 0) >= orm_dag.max_active_runs:

If this condition is evaluated when a state is "running" then it is incorrect.

How to reproduce

Create a DAG with a schedule_interval and max_active_runs=1.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions