{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-airflow/issues/1716","repository_url":"https://api.github.com/repos/apache/incubator-airflow","labels_url":"https://api.github.com/repos/apache/incubator-airflow/issues/1716/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/issues/1716/comments","events_url":"https://api.github.com/repos/apache/incubator-airflow/issues/1716/events","html_url":"https://github.com/apache/incubator-airflow/pull/1716","id":170291156,"number":1716,"title":"[AIRFLOW-78] airflow clear leaves dag_runs","user":{"login":"normster","id":6687910,"avatar_url":"https://avatars.githubusercontent.com/u/6687910?v=3","gravatar_id":"","url":"https://api.github.com/users/normster","html_url":"https://github.com/normster","followers_url":"https://api.github.com/users/normster/followers","following_url":"https://api.github.com/users/normster/following{/other_user}","gists_url":"https://api.github.com/users/normster/gists{/gist_id}","starred_url":"https://api.github.com/users/normster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normster/subscriptions","organizations_url":"https://api.github.com/users/normster/orgs","repos_url":"https://api.github.com/users/normster/repos","events_url":"https://api.github.com/users/normster/events{/privacy}","received_events_url":"https://api.github.com/users/normster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-09T23:00:36Z","updated_at":"2016-08-18T23:04:54Z","closed_at":"2016-08-10T02:39:00Z","pull_request":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/1716","html_url":"https://github.com/apache/incubator-airflow/pull/1716","diff_url":"https://github.com/apache/incubator-airflow/pull/1716.diff","patch_url":"https://github.com/apache/incubator-airflow/pull/1716.patch"},"body":"Dear Airflow Maintainers,\r\n\r\nPlease accept this PR that addresses the following issues:\r\n- https://issues.apache.org/jira/browse/AIRFLOW-78\r\n\r\nTesting Done:\r\n- Expanded the jobs.test_scheduler_verify_max_active_runs test to test if scheduler respects max_active_dag_runs\r\n\r\nFix a bug in the scheduler where dag runs cleared via CLI would be picked up without checking max_active_dag_runs first, resulting in too many simultaneous dag runs."},"comment":{"url":"https://api.github.com/repos/apache/incubator-airflow/issues/comments/240883101","html_url":"https://github.com/apache/incubator-airflow/pull/1716#issuecomment-240883101","issue_url":"https://api.github.com/repos/apache/incubator-airflow/issues/1716","id":240883101,"user":{"login":"zodiac","id":130362,"avatar_url":"https://avatars.githubusercontent.com/u/130362?v=3","gravatar_id":"","url":"https://api.github.com/users/zodiac","html_url":"https://github.com/zodiac","followers_url":"https://api.github.com/users/zodiac/followers","following_url":"https://api.github.com/users/zodiac/following{/other_user}","gists_url":"https://api.github.com/users/zodiac/gists{/gist_id}","starred_url":"https://api.github.com/users/zodiac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zodiac/subscriptions","organizations_url":"https://api.github.com/users/zodiac/orgs","repos_url":"https://api.github.com/users/zodiac/repos","events_url":"https://api.github.com/users/zodiac/events{/privacy}","received_events_url":"https://api.github.com/users/zodiac/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T23:04:54Z","updated_at":"2016-08-18T23:04:54Z","body":"@r39132 \r\n\r\n> I will say that regardless of our patch, this limitation already happens to us in some of our dags. It sounds like our \"fix\" is making the problem more pronounced.\r\n\r\nI'm not sure I understand, what is \"this limitation\"? I tested the test cases included in JIRA on the commit right before this PR, and it works as expected. I am not sure what is the best way to achieve what this PR does while avoiding the bug. I don't have a fix for it.\r\n\r\nI'm curious how you avoided running into the bug in your production environment because in my testing, once `max_active_dag_runs` is hit the state of all dagruns will always stop changing, so nothing gets scheduled."}}
{"actor":{"display_login":"zodiac"}}