Skip to content
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

max_active_runs doesn't seem to work anymore (in 1.10.14) #13802

Closed
jsmodic opened this issue Jan 20, 2021 · 3 comments
Closed

max_active_runs doesn't seem to work anymore (in 1.10.14) #13802

jsmodic opened this issue Jan 20, 2021 · 3 comments
Labels
kind:bug This is a clearly a bug

Comments

@jsmodic
Copy link

jsmodic commented Jan 20, 2021

Apache Airflow version:

1.10.14

Environment:

Regular Airflow setup:
Python 3.6.2
Airflow 1.10.14
Celery 4.3.0

What happened:

max_active_runs isn't limiting DAG runs on DAGs when None schedule_interval (unsure about with a schedule, I don't use them). I set it to 20 but more than 20 are running.

It used to work on older versions of 1.10.

What you expected to happen:

DAG Runs to be limited to what I set in max_active_runs

Anything else we need to know:

I've had "max_active_runs" set as a DAG parameter for a long time and it always worked fine until this latest update I went from 1.10.12 -> 1.10.14.

I didn't see anything relevant in the upgrade changelogs, so I didn't realize it wasn't working until I look into some problems.

More so, the 0/20 doesn't seem to display in the RBAC UI, but that could be a change in the new UI since I just switched to that as well.

@jsmodic jsmodic added the kind:bug This is a clearly a bug label Jan 20, 2021
@jsmodic
Copy link
Author

jsmodic commented Jan 21, 2021

@jsmodic
Copy link
Author

jsmodic commented Jan 21, 2021

Looks like it broke here: cb8d53f

@kaxil
Copy link
Member

kaxil commented Jan 21, 2021

closed by #13803

@kaxil kaxil closed this as completed Jan 21, 2021
abhishekbafna pushed a commit to twitter-forks/airflow that referenced this issue Aug 25, 2021
…runs

* EWT-797: Fixing max_active_runs to control the number of runs running simultaneously

* Bumped the version

Co-authored-by: Shruti Mantri <smantri@twitter.com>

I referred to the git issue: apache#9975 which in its first line itself tells that the issue that happens related to max_active_runs in 1.10.14 is a separate one and is discussed here: apache#13802

This issue was resolved but the fix went in the 1.10.15 version. I took the same fix: https://github.com/apache/airflow/pull/13803/files and have applied it in this commit (5e87232).

The resolution worked and I did the testing on gke devel cluster: https://airflow-smantri--devel--etl-workflow-users.service.qus1.twitter.biz/admin/airflow/tree?dag_id=bq_dal_integration_dag

Prior to the fix, if the max_active_runs = 1, and if you start more than 1 run simultaneously, all of them will start their tasks, and would not honour max_active_runs configuration.

With this fix, if the max_active_runs = 1, and one of the runs is going on while the second run is triggered, the second run starts with the start_date being the time when it is triggered, but the second run won't start any of its tasks until the prior run is complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

2 participants