[CP][EWT-797] Fixing max_active_runs to control the number of runs running… #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… simultaneously
closes: EWT-797
related: EWT-797
I referred 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 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 run 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.