-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Fix max_active_tis_per_dagrun
for Dynamic Task Mapping
#31406
Fix max_active_tis_per_dagrun
for Dynamic Task Mapping
#31406
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
Would you be able to add a unit test to make sure this doesn't break again, or is that a major operation for a query like this? |
I have a problem with running tests locally and I'm not experienced with python. So I found a bug and fixed it, but writing tests may be a problem. |
It’s easier to run tests with Docker and our internal tool Breeze. See documentation for details: https://github.com/apache/airflow/blob/main/BREEZE.rst |
Yes. Running tests should be really straightforward. And it should be part of the PR @mdembiczak Breeze give you a setup that does not require any special setup/env (except docker and docker compose installed) so you should be able to just install it. Run It might seem not needed if you look at it from your side @mdembiczak but this is crucial part of the fix to also provide a unit test for it. Whe we absolutely need tests ? Because when we cherry-pick the changes to released airflow we run the tests to see if the cherry-picked fix is actually still working there. It might be that it is breaking something else in that branch so only having a unit test together with the change is a way to see if it still works after we cherry-pick it. Also we might in the future introduce other changes that might cause regressions and having unit tests is the way to prevent the regressions. We are as much into fixing the issues as we are about preventing them from re-occuring in the future. If you need any help with that and if you describe what problems you had when trying to run the tests and add a new one, we will be happy to help, but we need the test for the above reasons. |
Also please fix the code style according to static checks. |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* assign filter output to variable * add tests for max_active_tis_per_dagrun * fix tests and code style (cherry picked from commit 342b4fe)
* assign filter output to variable * add tests for max_active_tis_per_dagrun * fix tests and code style (cherry picked from commit 342b4fe)
In reference to #29084 and #29094
This PR fixes a new operator parameter
max_active_tis_per_dagrun
to control the number of task instances of the task that can be running in parallel in the same DagRun. In the previous implementation filtering byrun_id
didn't affect on variable. Themax_active_tis_per_dagrun
setting was not working properly